Skip to content

Comments

Multi-agent communication graph#150

Draft
jamiepine wants to merge 7 commits intomainfrom
feat/multi-agent-communication-graph
Draft

Multi-agent communication graph#150
jamiepine wants to merge 7 commits intomainfrom
feat/multi-agent-communication-graph

Conversation

@jamiepine
Copy link
Member

@jamiepine jamiepine commented Feb 22, 2026

Summary

Foundation for 0.2.0 — adds a directed communication graph between agents so they can coordinate, delegate, escalate, and share context through explicit links with relationship semantics.

  • Agent links with direction (one-way/two-way) and relationship policies (peer/superior/subordinate). Defined via [[links]] config sections, hot-reloadable via the existing file watcher. Config is already runtime-mutable through the API so no separate database needed.
  • send_agent_message tool resolves target agent, validates link direction, constructs an InboundMessage with source: "internal", and pushes through MessagingManager::inject_message(). No new transport.
  • ROLE.md identity file for operational responsibilities — separates what the agent does from who it is (IDENTITY.md) and how it behaves (SOUL.md).
  • Org context prompt — agents see their position in the hierarchy (superiors/subordinates/peers) so they can reason about delegation vs escalation.
  • Link channel context — when a channel is an internal link channel, the prompt frames the conversation with relationship semantics.
  • Process events AgentMessageSent/AgentMessageReceived with SSE forwarding for dashboard visibility.
  • Read-only API endpoints — list links (/api/links), per-agent links (/api/agents/:id/links), topology snapshot (/api/topology) for the future React Flow graph editor.
[[links]]
from = "support"
to = "engineering"
direction = "two_way"
relationship = "subordinate"

[[links]]
from = "manager"
to = "support"
direction = "two_way"
relationship = "superior"

Directed links between agents with relationship semantics (peer/superior/subordinate),
a shared instance-level database, and a send_agent_message tool that routes through
the existing MessagingManager pipeline. Foundation for the 0.2.0 release.

- Instance database (instance.db) with separate migration path for cross-agent data
- AgentLink model with direction (one_way/two_way) and relationship policies
- LinkStore CRUD backed by instance.db
- [[links]] config section with startup sync
- send_agent_message tool: resolves target, validates link, injects InboundMessage
- ROLE.md identity file for operational responsibilities
- Org context prompt fragment (superiors/subordinates/peers hierarchy)
- Link context prompt fragment for agent-to-agent channels
- AgentMessageSent/Received process events with SSE forwarding
- Link CRUD API endpoints + topology snapshot endpoint
Links are defined in [[links]] config sections and stored in a shared
ArcSwap<Vec<AgentLink>> that hot-reloads when config.toml changes.
No separate database needed since config is already runtime-mutable
through the API.

- Remove InstanceDb, migrations_instance/, LinkStore
- Links parsed from config at startup via AgentLink::from_config()
- Shared via Arc<ArcSwap<Vec<AgentLink>>> passed to agents and API
- File watcher reloads links on config.toml changes
- API endpoints simplified to read-only (list, agent links, topology)
- Deterministic link channel IDs from sorted agent ID pairs
- ROLE.md added to file watcher identity change detection
- Added new API endpoints for creating, updating, and deleting agent links.
- Introduced data structures for managing agent links and their relationships.
- Enhanced the frontend with a TopologyGraph component to visualize agent connections.
- Updated the LiveContext to track active links based on message activity.
- Modified Overview component to integrate the new TopologyGraph and display active links.
…unctionality

- Added optional display name and role fields to the AgentInfo and TopologyAgent interfaces.
- Introduced new TopologyGroup interface and related API endpoints for creating, updating, and deleting agent groups.
- Updated CreateAgentDialog to support input for display names and roles.
- Enhanced TopologyGraph to visualize agent groups and their relationships.
- Modified API and state management to handle agent groups effectively.
- Updated ToolActivityIndicator and WebChatPanel for better layout and responsiveness.
- Introduced FloatingChatInput for a more user-friendly input experience.
- Added ThinkingIndicator for visual feedback during processing.
- Enhanced message display logic for clearer user interactions.
- Improved styling and structure for better visual consistency across components.
- Added support for managing org-level humans with CRUD operations via new API endpoints.
- Introduced TopologyHuman interface to represent humans in the topology.
- Enhanced the ApiState to include a list of humans for topology visualization.
- Updated the configuration to support human definitions and ensure persistence.
- Modified the TopologyGraph component to accommodate human nodes alongside agents.
- Improved error handling for human-related operations in the API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant