Originally published on Naveed Ahmed's Engineering Blog.
Not every AI-powered application needs a model that generates paragraphs of text.
Sometimes you need an answer that fits a specific type.
For example:
- Is an incident likely related to data loss?
- Which failure domain best matches these logs?
- How severe is a deployment risk?
- Should a tool call be sent for manual review?
TypeSafe AI's Jev is designed around this style of evaluation.
Let's look at the concepts and how they apply to DevOps.
1. What Is Jev?
Jev is a decision-oriented AI model.
Rather than generating conversational answers, it evaluates a supplied state against typed questions.
The basic flow is:
Application state
|
v
Typed questions
|
v
Jev decision model
|
v
Structured answers
|
v
Application policy
|
v
Proceed / Review / Block
The final action remains the responsibility of your application.
2. Understand Noul, Choice and Score
Jev's core question types are:
| Type | Purpose | Example |
|---|---|---|
| Noul | Evaluate a yes/no hypothesis | Does this log indicate a possible security issue? |
| Choice | Choose a defined category | Database, network, memory or authentication? |
| Score | Evaluate an ordered rubric | Low, medium or high operational risk |
The SDK also provides experimental Box functionality for some visual or spatial tasks.
3. Install the Python SDK
The official Python SDK is distributed as typesafe-sdk.
python -m pip install typesafe-sdk
Configure your API key using your environment's secret-management mechanism.
For local testing:
export TYPESAFE_API_KEY="your-api-key"
Never commit that key into a Git repository.
4. Design an Incident Classification Request
Imagine an application returns this sanitized error:
payment-service:
database connection pool exhausted
waiting connections: 180
HTTP 500 errors increasing
You could provide this text as the state and ask structured questions.
Conceptually:
{
"state": "payment-service: database connection pool exhausted",
"questions": {
"failure_domain": {
"type": "choice",
"options": [
"DATABASE",
"NETWORK",
"MEMORY",
"AUTHENTICATION",
"UNKNOWN"
]
},
"requires_review": {
"type": "noul",
"instructions": "Evidence indicates a potentially severe production incident."
}
}
}
This is an illustrative question structure, not a complete executable SDK request. Check the current TypeSafe API documentation for the exact client method and response fields.
The important idea is that the question defines what the application needs to decide.
5. Apply the Result Safely
Suppose the model classifies an incident as DATABASE.
That can help route a ticket or suggest which runbook to open.
But it shouldn't automatically restart databases or modify infrastructure.
Your workflow should validate the classification against real metrics and logs.
For higher-risk actions, use explicit authorization and human review.
6. Use Jev for CI/CD Decisions
Another useful pattern is evaluating infrastructure changes.
A pipeline could analyze a Terraform plan and flag changes that may require additional review.
For example:
Terraform plan
|
v
Deterministic policy checks
|
v
Jev advisory risk classification
|
v
GitHub protected environment
|
v
Human approval where required
|
v
Approved deployment
Do not let an AI confidence score bypass a failed deterministic policy check.
For Terraform, inspect the actual plan and apply the approved saved plan through your normal deployment process.
7. When Should You Use Jev?
Good candidates include classification, risk triage, routing and rubric-based evaluation.
A generative model remains more appropriate for writing documentation, explaining an incident in detail, or producing code.
The two approaches can complement one another.
Read the Complete Jev Guide
My full article covers the Jev architecture, Python SDK, Pydantic AI integration, command-line tools, Kubernetes event classification, and practical CI/CD examples.
Read How to Use Jev: Full DevOps & Automation Tutorial
Official resources:
What part of your infrastructure automation could benefit from typed AI decisions?
Written by Naveed Ahmed — DevOps & Platform Engineering
Top comments (0)