How It Works
Configuration
You can control how many iterations the agent loop runs per request via themax_iterations parameter:
Tool Sources
Tools can come from three sources, all merged into a single available set:- Skill tools — Defined in installed/per-request skill manifests
- Inline tools — Passed directly on the completion request via
tools[] - Built-in tools — Theo’s system tools (web search, code execution, etc.)
Inline Tool Example
Tool Execution in Response
Thetools_used array in the response shows which tools were called:
Guard Rails
- Iteration limit — prevents runaway loops (configurable per request)
- Credit checkpoint — verifies sufficient balance before each iteration
- Timeout — configurable per request via SDK
timeoutMs - If the engine hits the iteration limit, Theo forces a final synthesis response
