Skip to content

Multi-Agent Systems

elsai orchestrates multiple Agent instances through several patterns — from a single agent calling a specialist as a tool, to full graphs and swarms managed by the framework.

Prerequisites

Install the core SDK:

bash
pip install --extra-index-url https://elsai-agents.elsai.ai/root/ elsai-agents==0.3.0

For Agent-to-Agent (A2A), also install the a2a extra: "elsai-agents[a2a]==0.3.0". See Installation.

Patterns

PatternDescription
GraphDeterministic pipeline — nodes and edges define execution order
SwarmAutonomous collaboration — agents hand off work dynamically
WorkflowImperative pipeline you implement in Python
Agent as ToolOne agent calls another via agent.as_tool() — use mode="spawn" or mode="queue" when the same specialist may be called twice in one turn
A2ARemote agents over the A2A protocol

Why multi-agent?

  • Parallelism — run independent tasks concurrently; for the same sub-agent called twice in one turn, see concurrent invocation modes
  • Specialisation — each agent has a focused role, tools, and system prompt
  • Context management — distribute work across smaller context windows
  • Scalability — compose complex workflows from simple building blocks

Copyright © 2026 elsai foundry.