Nudge v1.0.0
Nudge v1.0 — the typed, replayable, budget-aware language for LLM agents. Write the agent once, compile it to Python or TypeScript, replay its traces as tests at zero token cost.
Highlights
- Typed LLM calls —
llm"""...""" with { schema: Report, budget: 0.04 USD, retry: 3 with repair }; schema validation with an automatic repair loop - Trace-as-test — every run records a trace;
testblocks replay it in CI at zero token cost (nudgec test) - Budget walls — per-call and per-run USD budgets, enforced deterministically against the fake provider
- Hybrid replay —
NUDGE_REPLAY_MODE=llmreplays the LLM from a trace while tools run live - Streaming —
stream letwith incremental schema validation and early abort - Checkpoint/resume —
agent/stateblocks checkpoint every write;nudgec resume <run_id>continues crashed runs - Reducer state —
l | merge rCRDT-style joins (dict union, list append-dedup) - Model routing —
route{ cheap: "m1" when cond, strong: "m2" otherwise }with the chosen label in the trace - Static cost report —
nudgec costcounts llm call sites per fn (fake pricing, retry×repair worst case) - Multi-server MCP routing —
NUDGE_MCP_SERVERSregistry, fail-fast on unknown servers - Two backends — Python (full) and TypeScript (
nudgec build-ts+ shipped TS runtime) - OTel export —
NUDGE_OTEL=<path>writes every trace record as an OTel-shaped JSONL span - Frozen trace format — v1 record schema frozen;
nudgec trace-checkvalidates conformance - A2A export —
nudgec a2aemits A2A agent cards from your agents/fns - LSP —
nudgec lspserves editor diagnostics over stdio (dependency-free)
Numbers
- 97 tests green (CI on every push) · 29-line self-testing research agent example · zero compiler dependencies
- Design doc v1.13 frozen · full roadmap complete (v0.1 MVP → v0.2 → v0.3 → v0.4 → v1.0)
Quickstart
cargo build # the nudgec compiler
export PYTHONPATH=$PWD/runtime
nudgec check examples/research_agent.ndg
nudgec test examples/research_agent.ndg # replay the committed trace — zero tokens