Chidori — Deterministic Agents as Code

Chidori is a YAML-free AI agent framework where agents are written as Starlark scripts — a deterministic Python dialect that enables checkpointing, replay, and visual editing.

Every side effect — LLM calls, tool invocations, HTTP requests, human input — goes through a fixed set of host functions the runtime can log, cache, and replay. Save a session's call log to disk, replay it later for byte-identical output with zero LLM calls.

Why Chidori?

  • Agents look like Python. Native control flow, variables, list comprehensions — no template DSL, no YAML.
  • Deterministic execution. Starlark has no I/O of its own; every side effect is a logged, cacheable host function call.
  • Zero-cost checkpointing. Save a session's call log, replay it for identical output at zero token cost.
  • Event-driven. Run an agent as an HTTP server that reacts to webhooks, alerts, or custom events.
  • Rust core, Python SDK. The runtime is a single binary. The Python SDK is pure-stdlib HTTP — no pip install, no native bindings.

A first agent

# agents/summarizer.star
config(model = "claude-sonnet")

def agent(document):
    summary = prompt("Summarize in 3 bullets:\n" + document)
    actions = prompt("Extract action items:\n" + summary)
    return {"summary": summary, "action_items": actions}
chidori run agents/summarizer.star --input document=@notes.txt

Core Concepts

ConceptDescriptionGo To
Agents as StarlarkThe base primitive: a .star file with a def agent(...) function.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, Python SDK, 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?