Guides

Guides

In-depth guides for each part of the Agent runtime.

Each guide below covers one part of the Agent runtime in chai-ai. They build on each other roughly in this order:

  1. Agents — defining tools, constructing an Agent, and how .generate() runs the tool-calling loop
  2. Streaming — consuming the same loop as live events via .stream()
  3. Sessions & Memory — persisting conversation history across calls
  4. Structured Output — validated, typed final answers via outputSchema
  5. Handoffs — transferring control to another agent mid-run
  6. Guardrails — policy checks around input, tool calls, and output
  7. Tracing — the runId/trace recorded on every run
  8. ReliabilitymodelTimeoutMs / toolTimeoutMs