Quickstart
This guide gets you from a clean machine to a running Chidori agent. We'll install the runtime, write a three-line agent, and run it against an LLM.
Chidori agents are written in Starlark — a deterministic Python dialect. If
you know Python, you already know Starlark. The important differences: no
import, no while, no classes, and all side effects go through the
runtime's host functions.
Install the runtime
Chidori ships as a single Rust binary. Build from source or install with cargo.
cargo install chidoriConfigure an LLM provider
Chidori talks to LLMs directly (Anthropic, OpenAI) or through a LiteLLM-compatible proxy.
export ANTHROPIC_API_KEY=sk-ant-...Write your first agent
Create agents/summarizer.star. An agent is a .star file with a def agent(...) function — its parameters are the inputs, its return value is the JSON output.
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}Run it
chidori run agents/summarizer.star \
--input document="Rust is a systems programming language focused on safety, speed, and concurrency."The agent's return value is serialized to JSON and printed to stdout:
{
"summary": "- Rust is a systems language\n- Focused on safety and speed\n- Enables fearless concurrency",
"action_items": "- Evaluate Rust for performance-critical services\n- Identify training resources for the team"
}See the trace
Pass --trace to get a structured call log — every host function call with its arguments, result, duration, and token usage.
chidori run agents/summarizer.star --input document=@notes.txt --traceRun as a server
For event-driven agents, webhooks, or anything with sessions, run the agent as an HTTP server.
chidori serve agents/summarizer.star --port 8080This exposes:
GET /health— health checkPOST /sessions— create a session, run the agent, return the outputGET /sessions/{id}/checkpoint— the full call logPOST /sessions/{id}/replay— re-run from a checkpoint (zero LLM calls)ANY /*— any other request is passed toagent(event)as an event dict
What's next?
- Agents as Starlark — the language rules and what makes agents deterministic.
- Host Functions — the full API:
prompt,tool,http,memory,input,parallel,exec,retry. - Event-Driven Agents — turn any agent into a webhook handler.
- Checkpoint & Replay — save a session and replay it later for free.