Multi-Agent Systems

Agent Teams & A2A

Coordinate multiple AI agents as a team. Use the visual team builder, war room chat, capability discovery, and A2A webhooks for agent-to-agent communication.

What is an Agent Team?

An Agent Team is a group of agents configured to work together toward a shared objective. Teams support internal agents (managed in the platform) and external agents (connected via A2A webhooks). Each team has a topology, a set of capabilities, and a secure A2A secret for external communication.

Visual Team Builder

Drag-and-drop interface to assemble teams, assign roles, and connect agents.

War Room Chat

Real-time multi-agent chat with shared state, session logs, and live updates via Socket.IO.

A2A Protocol

Standardized webhook endpoints for external agents to join team sessions securely.

Team Concepts

Agent vs Agent Team

An Agent is a single execution unit with a provider, model, and capabilities. An Agent Team is a collection of agents (and optional external agents) that share a session, objective, and message log. Workflows can delegate execution to a specific agent via the Agent Call node, while teams coordinate multiple agents through the war room.

Internal vs External Agents

Internal agents are registered in the platform and managed through the Agents page. External agents connect via the A2A webhook endpoint. Each external agent must be pre-authorized in the team configuration and authenticated using the team's A2A secret.

A2A Communication vs Workflow Agent Call

A2A (Agent-to-Agent) communication happens asynchronously through the war room message broker. Any agent in the team can broadcast or send direct messages. Workflow Agent Call is a synchronous step within a workflow graph that delegates execution to a specific agent and waits for the result before continuing.

Creating a Team

Teams are created via the Agent Teams page or the API. Each team receives a unique A2A secret that external agents must present when connecting.

POST /api/agent-teams
{
  "name": "Research Squad",
  "description": "Research, analysis, and reporting team",
  "agents": ["agent_001", "agent_002"],
  "externalAgents": [
    { "name": "external-summarizer", "capabilities": ["summarize"] }
  ],
  "topology": "mesh"
}

War Room Chat

The war room is a real-time chat interface for a team session. When a team run is triggered, a session is created and the runner broadcasts status updates through Socket.IO. Users and agents can exchange messages in the shared session. All messages are persisted in the MessageLog collection.

Capability Discovery

The discovery endpoint returns the combined capabilities of all internal and external agents in a team. This allows the system (or a supervising agent) to understand what skills are available before delegating tasks.

GET /api/agent-teams/:teamId/discovery
{
  "ok": true,
  "discovery": [
    { "id": "agent_001", "name": "Researcher", "type": "internal", "capabilities": ["web_search", "summarize"] },
    { "id": "external-summarizer", "name": "External Summarizer", "type": "external", "capabilities": ["summarize"] }
  ]
}

A2A Webhook Security

External agents authenticate using the team's A2A secret, passed via the x-a2a-secret header. The webhook validates the secret against the team metadata and checks that the external agent identity is authorized for that team.

POST /webhook/a2a/:teamId
Headers:
  x-a2a-secret: <team_a2a_secret>

Body:
{
  "sessionId": "session_abc",
  "from": { "id": "external-summarizer", "type": "external" },
  "to": { "id": "broadcast", "type": "internal" },
  "type": "user_prompt",
  "content": { "result": "Summarize this report" }
}

Team Run Flow

  1. User triggers a team run via the UI or POST /api/agent-teams/:id/run.
  2. Backend creates an AgentSession with the provided objective.
  3. If a war room is active, the runner immediately broadcasts aNEW_SWARM_MESSAGE event. Otherwise, it waits up to 10 seconds for a client to join before triggering.
  4. Agents exchange messages through the Socket.IO war room.
  5. Session logs are queryable via GET /api/agent-teams/sessions/:sessionId/logs.

Security Notes

  • The A2A secret is generated once at team creation and is never returned again after the initial response.
  • All team routes require JWT authentication.
  • External agents must be explicitly listed in externalAgents to be authorized.
  • The A2A webhook endpoint (/webhook/a2a/:teamId) is public but enforces secret and identity checks.