jevpolicy
TypeScript runtime that turns Jev's probabilistic answers into versioned, replayable decisions via ordered YAML policy rules.
Overview
JevPolicy separates probabilistic judgment from deterministic application policy: code calculates, Jev judges, policy decides. An application supplies state and facts; deterministic preconditions run first; Jev, accessed through Vercel AI Gateway, answers typed questions that become normalised signals; and ordered YAML rules turn those signals into one of a declared set of decisions, with an audit trace and optional record. The host application still carries out the action.
Policies declare their decisions, questions, rules and fallbacks, for example routing provider errors, timeouts, invalid responses or no-match cases to human review. A CLI validates policies and diffs a released policy against a candidate offline, reporting added, removed, changed and reordered elements by stable IDs. The example routes support tickets into billing, technical, account or human_review. It is aimed at teams building support routing, moderation, approval gates and risk review who want replayable, observable decisions.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which support category best matches this ticket? | billing · technical · account |
How it works
- Application provides state and facts
- Deterministic preconditions are checked
- Jev answers typed questions, normalised into signals
- Ordered YAML rules select a decision; fallbacks cover errors and no match
- Decision and trace are returned to the host application
Strengths
- Policy is versioned YAML, diffable offline
- Explicit fallbacks for provider errors and timeouts
- Audit trace for every decision
Caveats
- Live evaluation requires a Vercel AI Gateway key
- Host application must implement actions
- Early project
Getting started
npm install @sanoy24/jevpolicy, then npx jevpolicy validate ./policy.yaml; set AI_GATEWAY_API_KEY for live evaluation.At a glance
- Type
- Service
- Status
- beta
- Language
- TypeScript
- Runtime
- Node.js 22.18+ library and CLI
- Has code
- yes
- License
- Apache-2.0
Use cases and integrations
How curated lists describe it
JevPolicy is an open-source TypeScript decision runtime that turns probabilistic judgments from Jev, accessed through Vercel AI Gateway, into versioned, deterministic, replayable, observable application decisions.
logicrw/awesome-jev-projectsJevPolicy is an open-source TypeScript decision runtime that turns probabilistic judgments from Jev, accessed through Vercel AI Gateway, into versioned, deterministic, replayable, observable application decisions.
hellogumbo/awesome-jev
Frequently asked questions
Does Jev make the final decision?
No. Jev answers questions; ordered policy rules decide.
What happens if the provider fails?
Declared fallbacks, such as routing to human_review, handle errors, timeouts and invalid responses.
Can I review policy changes?
Yes, the CLI diffs two policy versions offline.
Related projects
TypeScript/Python policy engine where Jev only answers declared questions and code decides routes, gates and actions.
ProjectbetaTypeScriptDeepSeek Harness bundle registering a jev_ask tool for typed noul, choice and score questions to Jev.
ProjectprototypeTypeScriptPython dialect that adds a '~' operator and jev/case blocks so a branch can ask Jev a yes/no, scale or choice question.
ProjectprototypePythonExample of using Jev as a webhook guardrail inside the agentgateway proxy to inspect model requests and responses.
ProxyproductionRustLocal desktop pal that verifies what a coding agent really did, with optional Laya or Jev double-checks of unclear test results.
ProjectbetaTypeScriptDeepSeek Harness plugin checking whether an agent's 'done' claim is true, using deterministic evidence plus one batched Jev assessment.
PluginbetaTypeScript