agent-squad-typescript
Use when building or modifying a Node.js / TypeScript app that uses the agent-squad npm package — multi-agent orchestration: orchestrator, agents (all built-in types + GroundedAgent), classifier routing (Bedrock / Anthropic / OpenAI), storage (in-memory / DynamoDB / SQL), retrievers (Amazon KB / Dak
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 7766
- Лиценз
- Apache-2.0
- Последна проверка на записа
- 21.09.2026 г.
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add 2FastLabs/agent-squadСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
agent-squad TypeScript — assistant guide
Node.js / TypeScript multi-agent orchestration framework (npm package agent-squad). All public
symbols are exported from a single barrel typescript/src/index.ts. This file is guidance and a
map — not an API reference. Read exact signatures from
typescript/src/ and worked recipes from 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 +AgentSquadwith no routing. Or skip the orchestrator entirely and callagent.processRequest(...)directly. - Several specialists → multiple agents registered with
orchestrator.addAgent(agent), a classifier routes each turn. - Answers must not drift from data (prices, balances, live lookups) →
GroundedAgent: a gatherer LLM calls tools, an isolated presenter LLM speaks only from the curated results. - Fixed pipeline →
ChainAgent: each agent's output is the next agent's input. - One lead LLM coordinating a team →
SupervisorAgent: the lead calls sub-agents as tools. - External tools via MCP →
MCPToolProvider(async factory pattern, optional peer dep). - RAG context → attach a
Retrieverto any agent that supportsretriever?in its options.
How to install
npm install agent-squad
Optional peer dependencies — install only what you use:
| Package | Used by |
|---|---|
@aws-sdk/client-bedrock-runtime | BedrockLLMAgent, BedrockClassifier (already a hard dep in current releases) |
@anthropic-ai/sdk | AnthropicAgent, AnthropicClassifier (already a hard dep) |
openai | OpenAIAgent, OpenAIClassifier (already a hard dep) |
@modelcontextprotocol/sdk | MCPToolProvider — lazy await import() at connect time |
@dakera-ai/dakera | DakeraRetriever — lazy require() at construction time |
@modelcontextprotocol/sdk and @dakera-ai/dakera are the only two true optional peer deps;
everything else ships as a hard dependency at the moment.
How a turn works
routeRequest is the single entry point. It classifies the input, dispatches to the selected
agent, saves the exchange, and returns an AgentResponse. The response is either a plain string or
a Node.js Transform stream: