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.

Install the runtime

Chidori ships as a single Rust binary. Build from source or install with cargo.

cargo install chidori

Configure 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

RUN
chidori run
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 --trace

Run 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 8080

This exposes:

  • GET /health — health check
  • POST /sessions — create a session, run the agent, return the output
  • GET /sessions/{id}/checkpoint — the full call log
  • POST /sessions/{id}/replay — re-run from a checkpoint (zero LLM calls)
  • ANY /* — any other request is passed to agent(event) as an event dict

What's next?

Was this page helpful?