본문으로 건너뛰기
Skillpedia
에이전트7.8k · #12830

agent-squad-python

하는 일

이 스킬은 다중 에이전트 AI 시스템을 위한 프레임워크인 agent-squad로 Python 앱을 만드는 안내서입니다. 각 필요에 어떤 에이전트 유형이 맞는지 설명합니다. 어시스턴트나 AI 에이전트 팀을 만드는 Python 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓여러 전문 AI 에이전트에 요청을 라우팅하는 Python 앱을 만들고 있을 때.
  • ✓단일 어시스턴트, 고정된 파이프라인, 감독자 팀, 데이터 기반 답변 중 무엇이 필요한지 정할 때.
  • ✓MCP 프로토콜을 통해 외부 도구 서버를 에이전트에 연결하고 싶은 경우.

스킬 링크

https://github.com/2FastLabs/agent-squad/blob/main/python/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/2FastLabs/agent-squad/blob/main/python/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“agent-squad로 고객 질문을 청구 에이전트와 지원 에이전트에 라우팅하는 Python 앱을 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

단일 어시스턴트, 오케스트레이터가 있는 여러 에이전트, 데이터와 일치해야 하는 답변을 위한 근거 기반 에이전트, 고정 단계를 위한 체인, 팀을 위한 감독자를 언제 쓸지 설명합니다. 정확한 세부 사항은 소스와 문서를 안내합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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 Agent subclass; no orchestrator needed, call process_request directly.
  • Several specialists — multiple agents + an AgentSquad orchestrator; 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 lead BedrockLLMAgent or AnthropicAgent delegates to a team of sub-agents via an internal tool loop, maintaining shared context. Can itself be registered in an AgentSquad.
  • External tool servers — MCPToolProvider (requires agent-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
자주 묻는 질문

전체 API 레퍼런스를 제공하나요?

아니요. 이 스킬은 안내서이자 지도입니다. 정확한 시그니처는 소스 코드와 문서를 보도록 안내합니다.

어떤 Python 버전이 필요한가요?

Python 3.11 이상입니다.

외부 도구를 연결할 수 있나요?

네. 선택적인 MCP 도구 제공자가 여러 MCP 서버를 연결해서 그 도구를 에이전트가 쓸 수 있게 합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
7.8k
순위
#12830
라이선스
Apache-2.0
업데이트
2026. 10. 8.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬