Skip to main content
Maitai supports an infinite recursive hierarchy. A Subagent is another agent that is added as a capability to a “manager” agent.

The Manager Pattern

A high-level agent (e.g., “Customer Support Lead”) can delegate complex tasks to specialized subagents (e.g., “Billing Specialist” or “Technical Troubleshooter”).

Key Features

  • Recursive Nature: Subagents can themselves have their own subagents, allowing you to build deeply nested “Agent Trees.”
  • Shared Context: Subagents inherit relevant context from their parents but operate within their own specialized prompts and capability sets. State fields flow between them according to each field’s read/write scope.
  • Modular Design: Build and test specialized agents independently, then compose them together into a powerful multi-agent system.

Subagents and execution mode

How a subagent is invoked depends on the parent’s execution mode:
  • In reasoning mode, the orchestrator delegates a scoped objective to the subagent inside the loop, then processes its result like any other action.
  • In route mode, a subagent can be the routing target — the original conversation is passed through, and the subagent’s answer becomes the response.
The subagent runs with its own execution mode, so a routing parent can delegate to a reasoning child and vice versa.
For latency-sensitive deployments with deep hierarchies, the high_performance request flag flattens subagent capabilities into the root agent and runs everything in-process. See Execution Mode — performance options.