Agent Context, Output Format & Prompt Inspector
Control how context flows between Swarm agents, override structured output, map variables with {{Node Label}}, and inspect prompts after each run.
Power-user controls for multi-agent workflows — inspired by community builders running marketing and consulting systems on Swarm Canvas.
How context passes between agents
When an agent runs, it receives a text context blob built from upstream nodes that already executed on the same path. Each block looks like:
code[Researcher 1] <that node's output> [Merge Results] <merged output>
In the Inspector, set Context Scope:
- All upstream — full execution trail (default)
- Previous node only — just the last step before this agent
- Selected nodes — pick specific upstream nodes via checkboxes
Output format (Structured vs Custom vs JSON)
By default, agents append a Structured format (Situation → Diagnosis → Plan → Metrics → Risks) so the next workflow step gets actionable handoffs.
- Custom — your instructions control the response shape (great for briefs, creative copy)
- JSON — model returns JSON only; paste a schema hint in the Inspector
Input mapping with {{Node Label}}
Use Input Mapping to inject specific upstream outputs into a template:
codeUse only findings from {{Researcher 1}} to draft a client-ready marketing brief.
Prompt inspector & run comparison
After you Run a workflow, select any agent and open Last Run in the Inspector. You will see:
- Full input (instructions + context) — no truncation
- Prompt → System and Prompt → User sent to the model
- Previous run prompts when something changed between runs
Workspace defaults
Managers can set default Structured Output and Context Scope (including Selected nodes) under Settings → Workspace → Swarm defaults. New agents dropped on the canvas inherit these automatically unless you override per node.
