Agent contract as any agent you write, packaged so you can enable them without writing code. You enable them the same way you enable any agent module: name the module in the manifest, then list and run.
Enable them
Each agent lives in its own module, and importing a module is what registers its agent — so name oneagents[] entry per module. (Naming the top-level tai42_agents package alone registers nothing: it imports no submodule.) To drive agents from a UI over an SSE stream, also load the agents router.
examples/agents/enable_ready_made.yaml
include on an entry to enable a subset of a multi-agent module by name; each module here defines a single agent, so include is unnecessary above.
List and run
1
See what registered
List every registered agent, then the spec-runnable (authorable) ones.
2
Run one
Every agent runs the same way — stream a run one event frame at a time, passing the agent’s input as a JSON object. The input fields are the agent’s own
ToolInput; read a schema with tai tools schema <agent-run-tool>.examples/agents/agents_run_help.sh
The seven agents
Each worked run below passes that agent’s realToolInput fields. A run needs the server up (tai serve) with a model configured for the deployment; the stream renders each StreamEvent frame — reasoning steps, tool-call/result steps, message deltas and finals, and a run-usage frame — as it arrives.
tools_agent
The plain/advanced LangGraph tools agent. It binds the named client tools to the model up front and runs them step by step. spec_runnable — its ToolInput advertises exactly the composable fields (system_prompt, tool_names, presets, response_format) an authored variant may bake.
deep_agent
A deepagents-harness agent: planning, a per-thread scratch filesystem, skills, one level of nested sub-agents, and human-in-the-loop interrupts resumed with a LangGraph Command.
response_format (a JSON Schema with a top-level title) but produces no structured output, both faces raise rather than silently omitting the structured frame: the JSON run face raises on drain, and the streaming face raises after the stream drains — unless the run paused on a pending interrupt, which takes precedence over the missing-structured raise.
retrieval_tools_agent
A tools agent that does not bind every tool up front: it embeds each tool’s description into a vector store and exposes a retrieve_tools semantic-search tool, binding matches on demand. Useful when the tool set is large; cap the working set with tools_limit.
mcp_tools_agent
A tools agent whose tools come from an MCP server named in mcp_config. It opens a fastmcp client, converts those tools to LangChain tools, and runs with the client held open.
voting_agent
Runs N voter LLMs in parallel over one prompt, then a judge LLM decides by majority vote (breaking ties with its own reasoning). Returns a VotingOutput; only the judge streams.
refine_agent
An Evaluator↔Critic loop: the evaluator drafts, the critic reviews, and they alternate until the critic approves or the max_iterations budget is exhausted (a loud error, never an unapproved draft). Only the final approved pass streams.
vqa_agent
Visual question answering: a single multimodal completion over an image_url (a public URL or a storage id) and a query. No tools, no graph.
Structured output and trusted-caller kwargs
Every agent above accepts aresponse_format — a JSON Schema with a required top-level title (the structured-output name). When set, the run forces the model to emit matching output and returns the validated structured object; a request that produces none raises loudly rather than falling back to text.
base_url/api_key in an agent’s llm_kwargs/embedding_kwargs legitimately route to a caller-chosen model or embedding endpoint. Expose any agent carrying these kwargs only to trusted callers — an injected parent agent could redirect the call to a hostile endpoint and leak the key or context.
The exact agent set and each agent’s inputs are also listed in the ecosystem catalog; the agents package’s README carries the per-agent reference detail. For authoring your own, see Author an agent.
See also
- Agents — the
Agentcontract every ready-made agent implements. - Deep agents — sub-agents, skills, and strategies the deeper agents use.
- Ecosystem catalog — the shipped agent set and its repository.
- CLI reference — the full
tai agentssurface.

