# Agent Squad Typescript

Use when building or modifying a Node.js / TypeScript app that uses the agent-squad npm...

- Repository: https://github.com/2FastLabs/agent-squad (7796 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-10-08
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add 2FastLabs/agent-squad --skill agent-squad-typescript -g -a claude-code -y`
Codex: `npx skills add 2FastLabs/agent-squad --skill agent-squad-typescript -g -a codex -y`
Cursor: `npx skills add 2FastLabs/agent-squad --skill agent-squad-typescript -g -a cursor -y`
Gemini CLI: `npx skills add 2FastLabs/agent-squad --skill agent-squad-typescript -g -a gemini-cli -y`

## Description

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 / Dakera), and tools (AgentTools + MCPToolProvider).

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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 `Agent` subclass + `AgentSquad` with no routing. Or skip the
  orchestrator entirely and call `agent.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 `Retriever` to any agent that supports `retriever?` in its options.

## How to install

```bash
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 |

The rest: https://github.com/2FastLabs/agent-squad/blob/HEAD/typescript/SKILL.md
