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, seeded Math.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.txt

Core Concepts

ConceptDescriptionGo To
Agents as TypeScriptThe base primitive: a .ts file that exports async function agent(input, chidori).Read more
CompositionCompose agents out of sub-agents, tools, templates, and parallel fan-out.Read more
Host Functionsprompt, tool, http, memory, input — the fixed surface every agent uses.Read more
Event-Driven AgentsRun an agent as an HTTP server that reacts to webhooks and events.Read more
SDKs & ToolingThe Rust runtime, TypeScript & Python SDKs, CLI, and how tools are defined.Read more
Checkpoint & ReplaySave a session's call log and replay it later with zero LLM calls.Read more

Guides

GuideDescriptionGo To
RAGUse memory() and search tools to ground an agent in your own data.Read more
ChatbotA conversational agent that runs as an HTTP server with per-user sessions.Read more
IntegrationsWire up webhook handlers for GitHub, Slack, alerts, and other events.Read more
Autonomous AgentA deep-research agent that plans, searches in parallel, and fact-checks itself.Read more
Tracing with TaelShip every host function call as an OTLP span into Tael (or any OTEL backend).Read more

Was this page helpful?