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:
- Agents — defining tools, constructing an
Agent, and how.generate()runs the tool-calling loop - Streaming — consuming the same loop as live
events via
.stream() - Sessions & Memory — persisting conversation history across calls
- Structured Output — validated, typed
final answers via
outputSchema - Handoffs — transferring control to another agent mid-run
- Guardrails — policy checks around input, tool calls, and output
- Tracing — the
runId/tracerecorded on every run - Reliability —
modelTimeoutMs/toolTimeoutMs