Chidori — Deterministic Agents as Code
Chidori is a YAML-free AI agent framework where agents are plain TypeScript — native async, typed inputs, and ordinary imports, no DSL — with checkpointing, replay, and event-driven execution built in.
Every side effect — LLM calls, tool invocations, HTTP requests, human input — goes through a fixed set of host functions on an injected chidori object the runtime can log, cache, and replay. Save a session's call log to disk, replay it later for identical output with zero LLM calls.
Why Chidori?
- Agents are TypeScript. Native async, typed inputs, ordinary imports — no template DSL, no YAML.
- Deterministic execution. Durable runs use a fixed
Date, seededMath.random, and route every side effect through a logged, cacheable host function call. - Zero-cost checkpointing. Save a session's call log, replay it for the same output at zero token cost.
- Event-driven. Run an agent as an HTTP server that reacts to webhooks, alerts, or custom events.
- Rust core, TS + Python SDKs. The runtime is a single binary. The SDKs are pure HTTP clients to
chidori serve— the Python SDK is pure-stdlib, with no dependencies.
A first agent
// agents/summarizer.ts
import type { Chidori } from "chidori";
export async function agent(input: { document: string }, chidori: Chidori) {
const summary = await chidori.prompt("Summarize in 3 bullets:\n" + input.document, { type: "summary" });
const actionItems = await chidori.prompt("Extract action items:\n" + summary, { type: "actions" });
return { summary, actionItems };
}chidori run agents/summarizer.ts --input document=@notes.txtCore Concepts
| Concept | Description | Go To |
|---|---|---|
| Agents as TypeScript | The base primitive: a .ts file that exports async function agent(input, chidori). | Read more |
| Composition | Compose agents out of sub-agents, tools, templates, and parallel fan-out. | Read more |
| Host Functions | prompt, tool, http, memory, input — the fixed surface every agent uses. | Read more |
| Event-Driven Agents | Run an agent as an HTTP server that reacts to webhooks and events. | Read more |
| SDKs & Tooling | The Rust runtime, TypeScript & Python SDKs, CLI, and how tools are defined. | Read more |
| Checkpoint & Replay | Save a session's call log and replay it later with zero LLM calls. | Read more |
Guides
| Guide | Description | Go To |
|---|---|---|
| RAG | Use memory() and search tools to ground an agent in your own data. | Read more |
| Chatbot | A conversational agent that runs as an HTTP server with per-user sessions. | Read more |
| Integrations | Wire up webhook handlers for GitHub, Slack, alerts, and other events. | Read more |
| Autonomous Agent | A deep-research agent that plans, searches in parallel, and fact-checks itself. | Read more |
| Tracing with Tael | Ship every host function call as an OTLP span into Tael (or any OTEL backend). | Read more |
