The agent framework where every run is durable, replayable, and resumable by default.
The agent framework where every run is durable, replayable, and resumable by default.
The agent framework where every run is durable, replayable, and resumable by default.
Write agents as plain async TypeScript. Every side effect — every LLM call, tool call, and HTTP request — flows through the runtime as a recorded host call. So any run can be checkpointed to disk, replayed for byte-identical output with zero LLM calls, and resumed from any pause — even in a new process after a crash. One Rust binary, an embedded pure-Rust JavaScript engine, and TypeScript + Python SDKs. No Node, no DSL, no native bindings.
Why Chidori · ⚡️ Quick Start · What You Can Build · ⚖️ Compare · Docs · Discord
Agents are non-deterministic, expensive, and long-running. That combination is what makes them miserable to build:
Most frameworks layer orchestration on top of this chaos. Chidori removes it at the source.
The trick is a single boundary. Every side effect an agent performs — every LLM call, tool call, and HTTP request — flows through the runtime as a recorded host call. Agents never touch the world directly, so the runtime sees (and records) everything:
Once the runtime sees every side effect, it can log it, cache it, replay it, pause on it, and resume from it. That one mechanism is what turns each of the four problems above into a feature:
chidori.input()
and named signals suspend the run to disk. A human (or
another agent) answers minutes or days later and the run picks up exactly
where it stopped.The payoff: you get the durability guarantees of a workflow engine and
LLM-native primitives, while writing nothing but ordinary async/await
TypeScript.
if/for/try, type-safe inputs, real imports, and full editor
tooling. If you can write a function, you can write an agent.await chidori.* is a durable, replayable
safepoint.Chidori is one self-contained binary — the runtime that runs your agents. There's nothing else to install: no Node, no Python, no Rust toolchain, no native bindings. The fastest way to get it is the prebuilt binary:
curl -fsSL https://raw.githubusercontent.com/ThousandBirdsInc/chidori/main/scripts/install.sh | shThis downloads the right binary for macOS (Apple Silicon or Intel) or Linux
(x86_64 or arm64) from the latest GitHub release,
puts it in ~/.chidori/bin, and prints a one-line PATH tweak if needed. Check it
with chidori --version. Prefer to grab the tarball by hand? Every release page
lists one per platform.
From crates.io — builds the binary from source, so you need a stable Rust
toolchain (1.95 or newer). Slower than the prebuilt binary, but handy if you
already have cargo:
cargo install chidori # binary lands in ~/.cargo/binFrom a checkout — also gets you the bundled examples/ used in step 4. The
repo pins its toolchain via rust-toolchain.toml, so cargo picks it up
automatically:
git clone https://github.com/ThousandBirdsInc/chidori
cd chidori
cargo build --release # binary at ./target/release/chidoriWhich package is which? The thing you install here is the runtime (the
chidoribinary). The npm and PyPI packages are the SDKs — thin, optional clients for driving the runtime over HTTP from a TypeScript or Python app. You don't need them to write or run agents (you author those in plain.tsfiles the runtime executes directly); reach for an SDK only when you want to embed Chidori in an existing service.npm i @1kbirds/chidoridoes not install the runtime.
The fastest way to feel what Chidori does: scaffold an agent that answers questions from a local docs folder, and chat with it.
chidori model-login # sign in with OpenRouter — no API key to set up
chidori init my-agent --template docs
cd my-agent
chidori chat agent.tschidori model-login opens your browser, signs you in with OpenRouter, and saves a
key to ~/.chidori/credentials.json — the zero-setup way to try things out.
Prefer your own provider key? Set ANTHROPIC_API_KEY (or OPENAI_API_KEY)
instead; explicit keys always take precedence over the OpenRouter fallback.
Then ask it things like "What is a host call?" or "How do I write a tool?".
The scaffold is a complete, readable project: a ~50-line agent.ts, a
docs/chidori.md knowledge file, and a README. The agent reads the Markdown
under docs/ with chidori.workspace.read(...) and answers from it.
What it touches: only the files in this project folder. Chidori scopes the
workspace to the project directory — the agent can't read elsewhere on your
machine — and the only thing sent to the model is your question plus the
bundled docs. Drop your own .md files into docs/ to chat with those instead.
Every turn is a recorded host call, so replaying the whole conversation costs
zero tokens. Two other starters ship too — --template chat (a plain
assistant) and --template worker (an autonomous tool-using loop); omit
--template to pick interactively.
An agent is a plain TypeScript file: import the chidori host object and the
run definer from the virtual chidori:agent module and register your handler.
Every model call is a recorded host call:
// summarizer.ts
/// <reference types="@1kbirds/chidori/agent-env" />
import { chidori, run } from "chidori:agent";
run(async (input: { document: string }) => {
const summary = await chidori.prompt("Summarize in 3 bullets:\n" + input.document);
const actionItems = await chidori.prompt("Extract action items:\n" + summary);
return { summary, actionItems };
});That's a complete, durable agent. Both prompts are recorded; replay returns them for free.
chidori:agent is a virtual module the runtime injects at execution time —
there is no npm package behind it, so the runtime needs nothing installed. The
/// <reference …> line is what gives your editor and tsc its types: they
ship in the @1kbirds/chidori
npm package (npm install -D @1kbirds/chidori, or add
"types": ["@1kbirds/chidori/agent-env"] to your tsconfig.json instead of
the per-file directive). See the
TypeScript SDK README for the full story.
# The OpenRouter sign-in from step 1 is all you need. Prefer your own key?
# export ANTHROPIC_API_KEY=sk-ant-... # or OPENAI_API_KEY=...
chidori run summarizer.ts \
--input document="Rust is a systems programming language..."Any OpenAI-compatible provider (DeepSeek, Groq, Ollama, vLLM, LiteLLM…).
Point Chidori at any endpoint that speaks the OpenAI chat-completions
protocol, and pick the model with --model (or the CHIDORI_MODEL env var —
prompts that don't set model in code default to claude-sonnet-4-6
otherwise):
export CHIDORI_OPENAI_COMPAT_URL=https://api.deepseek.com # /v1 optional
export CHIDORI_OPENAI_COMPAT_KEY=sk-...
chidori run summarizer.ts --model deepseek-chat \
--input document="Rust is a systems programming language..."OPENAI_BASE_URL (alongside OPENAI_API_KEY) works too, and
LITELLM_API_URL/LITELLM_API_KEY remain as legacy aliases of the
CHIDORI_OPENAI_COMPAT_* pair.
chidori run asks before powerful effects by default: tool calls, network
access (chidori.fetch), and workspace writes pause for a one-keypress
approval at the terminal (LLM prompts and pure compute never ask). That's the
safe default for running code you didn't write; for your own agents, in
scripts, or in CI — where there is no terminal to ask at, so gated effects
fail closed — pass --trusted:
chidori run my_agent.ts --trustedRe-run the same agent with chidori resume summarizer.ts <run_id> to replay it
byte-for-byte with zero model calls (the run id is printed when the run
starts, and lives under .chidori/runs/). The run's model travels with it —
a --model deepseek-chat run resumes under deepseek-chat with no extra
flags — and crash recovery of a trusted, tool-using run mirrors run's
flags: chidori resume my_agent.ts <run_id> --trusted.
From a checkout of the repo (the build-from-source option in step 0),
chidori demo is an interactive picker of runnable examples. The LLM-backed
ones use whatever provider you've configured — or prompt you to sign in with
OpenRouter on the spot (chidori model-login) if you have no key set:
chidori demo # interactive pickerSeveral examples need no provider at all (pure compute and local tools), so they run with zero setup:
chidori run examples/agents/hello.ts --input name=Colton # no LLM calls
chidori run examples/agents/tool_use.ts \
--input query=chidori # defineTool, no LLM(The second example defines its tool inline with defineTool and calls it —
no directory, no --tools. See Running modes for
the approval model.)
For
No open issues yet, or sync has not completed.