Skip to main content
When tools are available (from skills, connectors, or inline definitions), Theo enters an iterative agent loop where the model can reason, call tools, observe results, and continue until the task is complete.

How It Works

Configuration

You can control how many iterations the agent loop runs per request via the max_iterations parameter:

Tool Sources

Tools can come from three sources, all merged into a single available set:
  1. Skill tools — Defined in installed/per-request skill manifests
  2. Inline tools — Passed directly on the completion request via tools[]
  3. Built-in tools — Theo’s system tools (web search, code execution, etc.)

Inline Tool Example

Tool Execution in Response

The tools_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