Recipes
Build an agent cluster
Group a chat agent and a BGO agent so they share user identity, memory, and threads.
Build an agent cluster
Group two or more agents so they share user identity, memory, and threads. The classic case: a chat agent plus a BGO agent that "feel like one" from the user's perspective.
The goal
A cluster of agents whose memory writes are visible to every member, whose threads are shared, and whose messages carry attribution (authorAgentId) so the UI can show "Wally Chat said X, Wally BGO said Y" within one conversation.
Steps
Create the agents separately.
Two agents:
wally-chat(model: a fast chat model; tools: chat-friendly) andwally-bgo(model: a stronger reasoning model; tools: code-runner, scrapers).Open the clusters page.
Sidebar -> Agent clusters -> "New cluster".
Configure.
- Name:
Wally. - Slug:
wally. - Members: pick
wally-chatandwally-bgo. The dropdown only shows agents not already in another cluster.
Save.
- Name:
Use the cluster from chat.
In a chat with
wally-chat, prompt: "Render the slides into a PDF and reply when ready." The chat agent callsspawn_bgotargeting thewally-bgomember; the BGO runs; its eventual message lands in the same thread, attributed towally-bgo.
Verify
recallfromwally-bgoreturns memories written bywally-chat(cluster scope).- The thread shows messages from both agents with their respective avatars.
- An agent in a different cluster cannot read this cluster's threads (IDOR check rejects).
Memory before vs after the cluster
Memory written before a cluster was formed stays scoped to the original agent. Cluster scope kicks in on writes that happen after the link.
Next steps
- Extract long-term memory using the cluster scope.
- Spawn a BGO for the cross-member dispatch flow.
