
Execution Modes
When you call an agent, theexecution_mode parameter controls how the agent processes the request:
route — Single-Step Routing
The agent selects one capability and returns the result. Best for simple, direct requests where a single tool call is sufficient.
reasoning — Multi-Step Orchestration
The agent enters a reasoning loop powered by Cortex, Maitai’s event-driven orchestration engine:
- Plan — An LLM orchestrator reviews the request and available capabilities, then plans which actions to run.
- Execute — The planned actions fire and produce results.
- Process — Results are summarized and progress is evaluated.
- Repeat or respond — The orchestrator decides whether more work is needed or the agent is ready to respond.
auto — Automatic Selection (Default)
The agent picks the best mode automatically. It selects reasoning if sub-agents exist or multiple actions are available; otherwise falls back to route.
Routing Strategy
Within orchestration, you can configure how routing decisions are made:- Flexible (LLM): The agent uses an LLM to intelligently select the best tool based on the user’s intent, the agent’s state, and the available capabilities.
- Deterministic (Rules): Use specific logic-based rules to route requests to specific targets. This is ideal for high-precision workflows where behavior must be strictly controlled.
Orchestration Instructions
Provide additional guidance that the LLM uses specifically during the routing/planning phase. These instructions help the agent weigh different capabilities and make the right decision when user intent is ambiguous.Performance & Chaining Options
These optional flags can be passed at request time to tune agent behavior. See Agent Call for the full parameter reference.| Parameter | Default | Description |
|---|---|---|
high_performance | false | Flattens sub-agent actions into the root agent, running everything in-process. Eliminates inter-process overhead for agents with sub-agent hierarchies. |
disable_chaining | false | When false, the orchestrator can plan multi-action chains in a single call (e.g., “fetch data, then enrich it”). When true, plans one action at a time for simpler, more predictable execution. |
disable_strategy | false | When true, skips the strategy-building step and goes straight to action planning. |
Next
- Define structured session state: Agent Form
- Full walkthrough: Build an Agent