agent-squad-python
What it does
This skill is a guide for building Python applications with agent-squad, a framework for multi-agent AI systems. It explains which agent type fits each need. It is for Python developers building assistants or teams of AI agents.
When to use it
- βWhen you are building a Python app that routes requests across several specialist AI agents.
- βWhen you need a single assistant, a fixed pipeline, a supervisor team, or answers grounded in data.
- βWhen you want to connect external tool servers to an agent through the MCP protocol.
Skill link
https://github.com/2FastLabs/agent-squad/blob/main/python/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βBuild a Python app with agent-squad that routes customer questions to a billing agent and a support agent.β
5 new skills a week. 1 minute to read.
How it works
It explains when to use a single assistant, several agents with an orchestrator, a grounded agent for answers that must match data, a chain for fixed steps, or a supervisor for teams. It points you to the source and docs for exact details.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
agent-squad Python β assistant guide
Async-first, dependency-optional multi-agent orchestration framework (Python 3.11+). This is a
guide and a map β not an API reference. Read exact signatures from the source
(python/src/agent_squad/) and the docs site (docs/src/content/docs/); this file tells you
what to use, when, and what to watch out for.
When to use what
- One assistant β a single
Agentsubclass; no orchestrator needed, callprocess_requestdirectly. - Several specialists β multiple agents + an
AgentSquadorchestrator; the classifier routes each turn to the right agent automatically. - Answers must not drift from data (prices, balances, live stock) β
GroundedAgent: a gatherer LLM calls tools and sees raw results but never speaks to the user; an isolated presenter LLM writes the reply grounded only on curated facts. - Fixed pipeline β
ChainAgent: routes the output of one agent as the input to the next, sequentially. - Team coordination β
SupervisorAgent: a leadBedrockLLMAgentorAnthropicAgentdelegates to a team of sub-agents via an internal tool loop, maintaining shared context. Can itself be registered in anAgentSquad. - External tool servers β
MCPToolProvider(requiresagent-squad[mcp]) connects any number of MCP servers (stdio or SSE) and makes their tools available to any agent.
How to install
All third-party integrations are optional extras β never forced on users who don't need them.
pip install agent-squad # core only (no LLM runtime)
pip install "agent-squad[aws]" # + boto3 β BedrockLLMAgent, BedrockClassifier, DynamoDbChatStorage, etc.
pip install "agent-squad[anthropic]" # + anthropic SDK β AnthropicAgent, AnthropicClassifier
pip install "agent-squad[openai]" # + openai SDK β OpenAIAgent, OpenAIClassifier
pip install "agent-squad[sql]" # + libsql-client β SqlChatStorage (Turso/libSQL)
pip install "agent-squad[strands-agents]"# + strands-agents β StrandsAgent
pip install "agent-squad[dakera]" # + dakera β DakeraRetriever
pip install "agent-squad[mcp]" # + mcp β MCPToolProvider
pip install "agent-squad[all]" # everything except strands-agents
How a turn works
AgentSquad.route_request is the one entry point worth memorising. It is a coroutine β you must
await it.
import asyncio
from agent_squad.orchestrator import AgentSquad
from agent_squad.agents import BedrockLLMAgent, BedrockLLMAgentOptions
from agent_squad.classifiers import BedrockClassifier, BedrockClassifierOptions
orchestrator = AgentSquad(
classifier=BedrockClassifier(BedrockClassifierOptions())
)
orchestrator.add_agent(BedrockLLMAgent(BedrockLLMAgentOptions(
name="General Assistant",
description="Handles general knowledge questions",
)))
async def main():
response = await orchestrator.route_request(
user_input="What is the capital of France?",
user_id="user-123",
session_id="session-abc",
)
if response.streaming:
# response.output is an async generator of AgentStreamResponse
async for chunk in response.output:
if chunk.text:
print(chunk.text, end="", flush=True)
if chunk.final_message:
pass # full ConversationMessage β already persisted
else:
# response.output is a ConversationMessage
print(response.output.content[0]["text"])
asyncio.run(main())
AgentResponse has three fields: metadata (AgentProcessingResult), output, and streaming
(bool). Always branch on response.streaming β the type of output differs.
To stream back from route_request, pass stream_response=True:
response = await orchestrator.route_request(
user_input="...",
user_id="u1",
session_id="s1",
stream_response=True,
)
If no agent is selected and no default agent is configured, route_request returns an
AgentResponse with the NO_SELECTED_AGENT_MESSAGE text rather than raising.
The pieces
AgentSquad (orchestrator)
from agent_squad.orchestrator import AgentSquad
The top-level object. Holds an agent registry, a classifier, and a ChatStorage.
from agent_squad.types import AgentSquadConfig
orchestrator = AgentSquad(
options=AgentSquadConfig(
LOG_CLASSIFIER_OUTPUT=True,
MAX_MESSAGE_PAIRS_PER_AGENT=20,
USE_DEFAULT_AGENT_IF_NONE_IDENTIFIED=T
FAQ
Does it give the full API reference?
No. It is a guide and map. The skill directs you to the source code and documentation for exact signatures.
Which Python version is needed?
Python 3.11 or newer.
Can it connect external tools?
Yes. An optional MCP tool provider can connect any number of MCP servers so their tools are available to agents.
Details
Original description by the author
Use when building or modifying a Python app that uses the agent-squad Python package β async multi-agent orchestration for Python 3.11+: orchestrator, agents (BedrockLLMAgent, AnthropicAgent, OpenAIAgent, SupervisorAgent, GroundedAgent, ChainAgent, and more), classifier routing (Bedrock, Anthropic, OpenAI), storage (in-memory, DynamoDB, SQL/Turso), retrievers (Amazon KB, Dakera), tools (AgentTools, MCPToolProvider), and custom implementations.
repo: 2FastLabs/agent-squad
Popularity
- GitHub stars
- 7.8k
- Ranking position
- #12830
- License
- Apache-2.0
- Updated
- 10/8/2026
Comments
- β¦
More skills from this repository
agent-squad-swift
7.8kHelps your agent build Swift apps for iPhone and Mac that run several AI helpers together, with routing, tools and on-device storage.
agent-squad-typescript
7.8kHelps your agent build Node.js apps where several AI agents work together, with routing, data storage and connections to outside tools.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.