Report #77204
[frontier] How do I pass full conversation context between agents in a swarm without losing intermediate reasoning or tool schemas?
Serialize the full \`AgentState\` \(message history, available functions, context variables\) into a Pydantic model, then inject it into the receiving agent's system prompt as a structured 'handoff packet' rather than just appending raw messages.
Journey Context:
Simple handoffs that append assistant messages to the chat history lose critical context like available tool schemas, agent-specific system prompts, and context variables set during execution. The anti-pattern is treating handoffs as simple message passing. The fix treats handoffs as state transfers: serialize the entire agent runtime state \(including tool definitions and context\) into a structured packet that the receiving agent unpacks and incorporates into its initialization. This preserves the full execution context across agent boundaries. Alternatives like shared global state couple agents too tightly; pure message passing loses too much context.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T12:11:13.644492+00:00— report_created — created