← Use cases

Jev in opencode

opencode is SST's open-source terminal coding agent. If you searched "jev opencode" hoping to select Jev as a model in it, the honest answer is you can't — Jev isn't a chat LLM and doesn't appear in opencode's model list. What you can do is far more useful: give opencode the Jev decide tool over MCP and a one-paragraph AGENTS.md rule, so the agent checks whether a command is safe before it runs it. opencode is a third-party project (not TypeSafe AI); this page shows how the two fit together.

opencode keeps a frontier LLM for planning and writing code — you pick that chat model from the providers opencode supports. Jev sits around that model, not in its place: it answers the bounded calls the agent makes between edits — which tool to reach for, whether a shell command is safe to run unattended, whether the step is actually done — and returns each as a typed, calibrated value in one pass of roughly 70–500ms. That's a different family of model (TypeSafe calls it System One), so it doesn't stream text and never shows up where you choose your LLM.

state + questions your input, typed Jev parallel sampler typed answer + confidence one round trip
You send opencode's current state plus typed questions; Jev returns the typed answer and a calibrated confidence in one round trip — no text to parse.

Can I pick Jev as a model in opencode?

No, and you shouldn't want to. opencode's model picker lists autoregressive chat LLMs — the things that write code and prose. Jev is a non-autoregressive decision model: you hand it state and a set of typed questions and it returns a choice, a score, or a calibrated yes/no, with 0% structured-output error because a choice is always one of the options you listed. It can't generate the code opencode exists to write, so it belongs alongside your chat model as a tool the agent calls — not in the model slot.

Give opencode the decide tool (MCP)

opencode speaks MCP, so the quickest path is to add the Jev MCP server to your opencode.json. It exposes a single decide tool the agent can call:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "jev": {
      "type": "local",
      "command": ["npx", "github:codaaiteam/jev-mcp"],
      "enabled": true,
      "environment": { "JEV_API_KEY": "jv_live_..." }
    }
  }
}

That registers a decide tool whose arguments are a state object plus a set of typed questions (choice / score / noul). The agent now has a way to ask for a typed decision instead of guessing in prose — but you still want a rule telling it when to reach for it.

Drop in an AGENTS.md rule

opencode reads an AGENTS.md file as its instructions — it walks up from your working directory for a project-level file, and also reads a global one at ~/.config/opencode/AGENTS.md. Paste this so the agent gates irreversible commands through Jev before running them:

# Jev safety gate

Before running any irreversible command — rm, git push --force, a deploy,
a DB migration, or anything that writes outside the repo — call the `decide`
tool (from the jev MCP server) with:
  state: the exact command + one line of why you want to run it
  questions:
    safe: { type: "noul", instructions: "Safe and reversible to run without a human?" }
    kind: { type: "choice", criteria: { read, write, destructive } }

If safe < 0.8 or kind == "destructive" -> STOP and ask the human. Otherwise run it.
Read-only commands (ls, cat, git status, grep, tests) skip the check.

If you already keep your rules in another file, point opencode at it instead of duplicating: the instructions array in opencode.json can reference existing files (for example a shared packages/*/AGENTS.md). opencode also falls back to CLAUDE.md when no AGENTS.md is present, unless you've set OPENCODE_DISABLE_CLAUDE_CODE=1 — handy if you already gate Claude Code with the same rule.

Or call it from your own tooling (code)

If you drive opencode from a script or wrap it in your own harness, you can skip MCP and hit the endpoint directly — one request, several typed answers in a single parallel pass:

// Decide what opencode should do next — typed, calibrated, one pass
const res = await fetch("https://jevtypesafeai.com/api/v1/decide", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.JEV_KEY}`, // jv_live_...
  },
  body: JSON.stringify({
    state: { task, lastCommand, lastOutput },
    questions: {
      kind: { type: "choice", instructions: "Classify this command.",
              criteria: { read: "read-only", write: "edits files", destructive: "deletes/deploys/migrates" } },
      safe: { type: "noul", instructions: "Safe to run unattended?" },
    },
  }),
});
const { answers } = await res.json();
if (answers.kind.choice === "destructive" || answers.safe.noul < 0.8) askHuman();
else run(lastCommand); // typed + calibrated, nothing to parse

answers.kind.choice is locked to the keys you listed, and answers.safe.noul is a calibrated probability RLCD training makes trustworthy — a 0.8 is right about 80% of the time. The upstream endpoint is POST https://api.typesafe.ai/v1/systemone with the same shape; the jevtypesafeai.com route takes a jv_live_ key and bills a fraction of a cent per decision, output free.

What Jev does not do in opencode

Jev doesn't write code, stream text, or replace the chat model opencode runs — keep your LLM exactly as it is. It returns one typed value per question, so it's the gate and the router around the agent, not the agent. And "0% structured-output error" only means a choice is always one of your options; a decision can still be wrong, so keep a human on genuinely destructive actions regardless of confidence.

FAQ

Can I use Jev as the model in opencode?

No. opencode's model picker is for chat LLMs that generate code and text; Jev is a System One decision model that returns a typed value, not prose, so it isn't in that list. You wire it in as a tool the agent calls — over MCP or the decide endpoint — alongside whatever chat model you already use.

How do I connect Jev to opencode?

Add the Jev MCP server to the mcp block of your opencode.json (type "local", command ["npx", "github:codaaiteam/jev-mcp"], with JEV_API_KEY in environment). That gives the agent a decide tool; then add an AGENTS.md rule telling it when to call it.

Where does opencode read the Jev rule from?

From AGENTS.md — opencode walks up from your working directory for a project file and also reads a global ~/.config/opencode/AGENTS.md. It falls back to CLAUDE.md when no AGENTS.md exists (unless OPENCODE_DISABLE_CLAUDE_CODE=1), and opencode.json's instructions array can point at an existing shared rule file.

Is opencode made by TypeSafe AI?

No. opencode is a separate open-source project from SST; Jev and the /api/v1/decide endpoint are TypeSafe AI's. This page just shows how to use the two together.

Won't a decide call on every command slow opencode down?

Not meaningfully. A Jev decision returns in about 70–500ms in one pass, far less than a second LLM prompt, and you only gate the irreversible commands — read-only ones skip the check entirely.

See also: Jev for coding agents · Jev MCP server · Jev for computer use · Is Jev an LLM? · Try a decision in the browser · opencode (opencode.ai) · jev-mcp (GitHub)

Put a Jev gate in your opencode loop

Grab a jv_live_ key, add the jev MCP server to opencode.json, and paste the AGENTS.md rule — your terminal agent checks risky commands before it runs them.

▶ Try Jev freeGet an API key →
Jev in opencode: a decision gate for your terminal agent · Jev by TypeSafe AI