jonaki · v0.1.0
The agent SDK you can actually test
Record a run, replay it offline, deterministically. Anthropic, OpenAI, and Google behind one interface — with runs you can replay, resume, and read.
npm install @rohhitrz/jonaki zodimport { Agent, run } from "@rohhitrz/jonaki";
const result = await run(new Agent({ name: "Assistant" }), "Say hello.");
console.log(result.output);No provider setup, no model string, no config file. Jonaki picks the provider from whichever API key is in your environment.
import { replay } from "@rohhitrz/jonaki";
import agent from "./agent.js";
it("books the cheaper flight", async () => {
const result = await replay("runs/runs/booking.json", { agent });
expect(toolCalls[1]?.args).toMatchObject({ flight: "6E-511" });
});Your tools still execute for real. Only the model is replayed — so this catches regressions in tool code, for free, in milliseconds.
The panel on the right needs no API key and no network. How replay works →
A step machine, not a while loop
step(state, deps) advances a run by one unit of work and returns new JSON state. Resume, replay, approval pauses, and tracing all fall out of that one mechanism.
Typed tools, no annotations
Zod in, JSON Schema out. The args type is inferred, and invalid arguments are repaired by the model instead of crashing the run.
Guardrails that can rewrite
Three stages, four actions — allow, block, modify, require_approval. PII never reaches the model.
Memory across restarts
Sessions outlive runs. Back it with SQLite and your chat survives a process restart.
Traces you can read
state.steps is the trace. One command prints a run as a tree with timings, tokens, and cost.
Errors that tell you the fix
Every failure is a JonakiError with a stable code, structured details, and an actionable hint.