nudge
Typed, budget-aware language for LLM agents compiling to Python/TypeScript, with a decide{} block for Jev-family decisions.
Overview
Nudge is a programming language for LLM agents that compiles to Python and TypeScript. It treats output schemas as types checked at compile time, declares side effects such as LLM, Tool and IO in function signatures, makes every run emit a replayable trace that doubles as a regression test, enforces cost budgets in compiler and runtime, and provides structured parallelism. It runs against a deterministic fake provider by default, so no key or spend is needed to start.
Typed decisions are a first-class feature: a decide{} block asks a decision model choose, yes/no and score questions about a state in one batched call and returns distributions and confidence, which a route expression can use to escalate to a human below a confidence bar. Pointing the registry at a /v1/systemone server enables real Laya or Jev-family models; the README reports about 51 ms per decision with a live Laya encoder. The project is in a testing and preview stage.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | which team handles this? | billing · technical · security |
| Yes / no | is this urgent? | yes · no |
How it works
- Write a decide{} block with typed questions on a state.
- Compile with nudgec to Python or TypeScript.
- Run against the fake provider or a /v1/systemone server.
- Route automatically above a confidence bar, otherwise escalate; traces are recorded.
Strengths
- Decisions are typed and traced like any other effect.
- Offline, deterministic default provider.
- Decision cache avoids paying twice.
Caveats
- Preview stage; examples double as test fixtures.
- Learning a new language is a significant adoption cost.
Getting started
nudgec check first-decision.ndg && nudgec build first-decision.ndg, then python3 out/first-decision.py; set NUDGE_DECISION_SERVERS to use a real decision server.At a glance
- Type
- Project
- Status
- prototype
- Language
- Nudge (compiles to Python and TypeScript)
- Runtime
- compiler, CLI
- Has code
- yes
- Has tests
- yes
Use cases and integrations
How curated lists describe it
A typed, replayable, budget-aware programming language for LLM agents.
wh000wh000/awesome-jev-live
Frequently asked questions
How does Nudge use decision models?
Through a decide{} block that batches typed questions and returns distributions and confidence.
Do I need a key to try it?
No, a deterministic fake provider is the default.
Which decision models can it call?
Any /v1/systemone server, such as Laya or Jev-family models.
Related projects
Workflow DSL for existing agents that uses Jev for the steps that are decisions and calls an agent only when investigation is needed.
LibrarybetaTypeScriptn8n Jev Classification node that branches items by category with a Needs Review branch, plus parallel and batched requests.
ProjectbetaTypeScriptRails-native gem that defines Jev decisions as classes with typed results, confidence thresholds, guardrails, a router and test helpers.
LibrarybetaRubySwift 6 bridge putting System One models behind Apple's Foundation Models API, with Jev, Laya (incl. on-device Core ML), Clef and OpenAI.
ServicebetaSwiftSpring Boot 4 starter that injects a JevClient for asking Noul, Choice and Score questions from Spring MVC apps.
LibraryprototypeJavaOpen-source team agent platform for Slack, GitHub and more that asks Jev once per session which agent runtime and model to use.
ServicebetaTypeScript