reduce
Synthesize multiple outputs into one coherent result using a custom prompt. Accepts plain text or structured agent objects for flexible combination.
Instructions
Synthesise multiple results into one. Accepts plain strings or structured AgentResult objects (auto-extracts .text fields), so you can pipe par/map output directly without manual unwrapping.
Args: results: JSON array — either plain strings ["text1", "text2"] or AgentResult objects [{"text": "...", ...}]. synthesis_prompt: Instructions for how to synthesise the results. sandbox: Named sandbox spec or inline JSON. network: Whether the container has network access (default: true — needed for API calls). tools: Comma-separated list of allowed Claude tools. model: Claude model to use (default: sonnet). timeout: Max execution time in seconds (default: 120). mcps: JSON array of MCP server names to attach to the reducer agent. system_prompt: System prompt for the reducer agent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | ||
| synthesis_prompt | Yes | ||
| sandbox | No | ||
| network | No | ||
| tools | No | Read,Write,Glob,Grep,Bash | |
| model | No | sonnet | |
| timeout | No | ||
| system_prompt | No | ||
| mcps | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |