HttpChannel keeps the conversation on a server and reaches it with GET, POST and DELETE on one URL. Agents in different processes, or on different machines, that point at the same URL share one conversation.
Reference: HttpChannel, including the server contract.
1. Start a server
Save this aschannel_server.py and run it in its own terminal. It keeps each conversation in memory, keyed by the URL path.
2. Two agents in two processes
Run the Researcher in one terminal:A HierarchicalSwarm on a shared server
A director plans, workers report, and every step lands on the server, where a dashboard or another team’s agents can read it.User, the director’s plan and orders, and each worker’s report under its name.
SwarmRouter: switch architectures, keep the URL
SwarmRouter forwards the channel to the structure it builds, so changing swarm_type does not change where the conversation lives.
Authenticate
Pass headers to send with every call:httpx.HTTPStatusError, so a bad token fails the first read instead of running the agent without context.
Start over
Next steps
- Channels with every structure
- Write your own channel, for a store the server contract does not fit