AutoJev integration guide
Connect agents to hosted AutoJev through REST, remote MCP, and portable skills with one AutoJev access key.
Last updated: 2026-09-19
AutoJev is a decision layer for agents. It sends compact state and explicit questions to Jev, then returns structured choices, probabilities, and scores. It does not replace your agent's main model and does not generate long-form reasoning.
1. Get an AutoJev access key
An agent consuming the hosted AutoJev service needs only two values:
export AUTOJEV_BASE_URL="https://autojev.ai"
export AUTOJEV_API_KEY="your-autojev-access-key"Create a user-scoped key at https://autojev.ai/settings/apikeys. Keep it in a local credential store or environment variable and do not commit it to an agent project or client configuration. If a trusted local Agent reports that the credential is missing, you may explicitly ask that Agent to configure AutoJev and supply the key in that private setup conversation. The Agent should store it locally without echoing it or writing it into the project. Never send a key through a shared, public, or untrusted chat.
2. Connect the MCP server
The hosted endpoint is a stateless Streamable HTTP MCP server:
https://autojev.ai/mcpIt exports six tools:
autojev_route_model: choose from allowed models using task stakes, quality, cost, latency, context, and tool-use needs.autojev_guard_tool_call: returnallow,confirm,review, ordenybefore a proposed tool call executes.autojev_route_task: route work toproceed_fast,deep_review,split_task, orblock.autojev_check_research: accept a claim, request more verification, or reject it.autojev_review_completion: decide whether work is complete, needs verification, or is incomplete.autojev_decide: send customchoice,noul, andscorequestions.
Codex
Put your AutoJev access key in the environment, then add this to ~/.codex/config.toml or a trusted project's .codex/config.toml:
[mcp_servers.autojev]
url = "https://autojev.ai/mcp"
bearer_token_env_var = "AUTOJEV_API_KEY"
tool_timeout_sec = 30Claude Code
claude mcp add --transport http autojev https://autojev.ai/mcp \
--header "Authorization: Bearer ${AUTOJEV_API_KEY}"For shared project configuration, keep the secret in an environment variable:
{
"mcpServers": {
"autojev": {
"type": "http",
"url": "https://autojev.ai/mcp",
"headers": {
"Authorization": "Bearer ${AUTOJEV_API_KEY}"
}
}
}
}3. Install all AutoJev Skills
Run one loop from the project root to install the umbrella router and all five focused Skills. You can paste the same instruction into a local coding agent and ask it to perform the installation:
for skill in autojev autojev-task-router autojev-model-router \
autojev-tool-guard autojev-research-guard autojev-completion-review; do
mkdir -p ".agents/skills/$skill"
curl -fsSL "https://autojev.ai/skills/$skill/SKILL.md" \
-o ".agents/skills/$skill/SKILL.md"
doneThen ask the agent to read .agents/skills/autojev/SKILL.md and configure AutoJev. The Skills never grant authority. They preserve the agent's existing scope, approvals, and safety rules.
4. Route a task to a model
All API calls use Bearer authentication and return the standard { code, message, data } envelope.
curl https://autojev.ai/api/v1/decisions/model-route \
-H "Authorization: Bearer ${AUTOJEV_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"task": "Review a complex customer dispute with 100k context and tool use",
"candidates": [
{
"id": "fast-model",
"description": "Fast general model with 32k context",
"cost": "low",
"latency": "low"
},
{
"id": "reasoning-model",
"description": "Strong reasoning and 200k context with tool use",
"cost": "high",
"latency": "medium"
}
],
"priorities": ["quality", "context", "tool_use", "cost"],
"constraints": ["Customer data must remain within approved tools"],
"stakes": "high"
}'The result contains the selected candidate, probabilities for every candidate, an escalate probability, deterministic guidance, provider metadata, and usage.
5. Guard a tool call
Call this preset before an agent performs a consequential operation. AutoJev evaluates the proposed action only; it never executes the tool.
curl https://autojev.ai/api/v1/decisions/tool-guard \
-H "Authorization: Bearer ${AUTOJEV_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"tool": "issue_customer_refund",
"action": "Refund USD 680 after a disputed duplicate charge",
"arguments_summary": ["order_id=ord_7429", "amount_usd=680"],
"side_effects": ["Moves funds", "Changes the order payment state"],
"safeguards": ["Customer identity and duplicate charge verified"],
"policy": ["Refunds above USD 500 require human approval"],
"reversibility": "partially_reversible"
}'Example response shape:
{
"code": 0,
"message": "ok",
"data": {
"decision": "confirm",
"confidence": 0.94,
"probabilities": {
"allow": 0.01,
"confirm": 0.94,
"review": 0.04,
"deny": 0.01
},
"guidance": "Require explicit user confirmation before the tool call.",
"guidance_source": "autojev_preset",
"model": "typesafe/jev-1.13-20260917",
"provider": "TypeSafe"
}
}The complete answers object also includes a risk score and needs_confirmation probability. guidance is deterministic preset text selected from the returned decision. It is not a hidden chain-of-thought or a generated explanation.
Available preset paths are route, model-route, tool-guard, research, and completion.
For agents, use this order:
- MCP tool — preferred when the agent can discover tools and their schemas.
- Preset REST endpoint — preferred for application code and fixed workflows.
- Native Decisions endpoint — use only when no preset represents the decision you need.
The preset fields are AutoJev's public agent contract. They remain stable even if the underlying Jev prompt, model version, provider integration, or policy logic changes.
6. Use the native Jev protocol
AutoJev exposes two intentionally different request shapes:
/api/v1/decisionsaccepts the Jev Decisions core protocol:model,state, andquestions./api/v1/decisions/{preset}accepts an AutoJev workflow schema such astask + candidatesortool + action + policy, then converts it into Jevstate + questionson the server.
Use the native endpoint when a preset does not fit or when you are porting an OpenRouter Jev request. AutoJev accepts Jev model identifiers only and defaults to ~typesafe/jev-latest when model is omitted. A request can include up to 32 named questions.
Important: Jev is a Decisions model. OpenRouter rejects it on the generic
/api/v1/chat/completionsendpoint; use the dedicated/api/alpha/decisionscontract shown below. AutoJev exposes that contract at/api/v1/decisions.
{
"model": "~typesafe/jev-latest",
"state": {
"customer_message": "I was charged twice for order ord_7429.",
"duplicate_charge_usd": 680,
"customer_identity_verified": true,
"policy": "Refunds above USD 500 require human approval."
},
"questions": {
"action": {
"type": "choice",
"instructions": "Choose the safest next action.",
"criteria": {
"allow": "Issue the refund immediately.",
"review": "Require human approval before issuing the refund.",
"deny": "Reject the refund request."
}
},
"needs_human_review": {
"type": "noul",
"instructions": "Does this refund require human review under the stated policy?"
},
"risk": {
"type": "score",
"instructions": "Score the financial and policy risk.",
"criteria": ["Low", "Moderate", "High", "Critical"]
}
},
"session_id": "refund-review-demo"
}The model + state + questions fields go to the Jev Decisions API. AutoJev keeps its provider credential server-side and wraps the provider response in the standard AutoJev response envelope. Preset-only fields never go directly to OpenRouter; they are converted first.
Operating guidance
- Send the smallest state that still contains the decision evidence.
- Do not send passwords, provider keys, private customer data, or unrelated files.
- Treat probabilities as calibrated signals, not proof or authorization.
- Keep irreversible actions behind your normal human approval boundary.
- Re-evaluate after evidence or constraints materially change.