agent-squad-typescript

A guide for using the `agent-squad` package in Node.js and TypeScript applications. The package coordinates multiple AI agents, including specialists, routed agents, chained workflows, and supervising agents.

In plain words
What is it for?
Use it to build single- or multi-agent applications, route requests, connect storage and retrieval systems, use MCP tools, and keep answers tied to collected data.
Why use it?
It helps you choose an arrangement that fits the job, such as one assistant, several specialists, a fixed sequence, or answers grounded in tool results.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/2fastlabs/agent-squad/typescript
Any agent
npx skills add 2FastLabs/agent-squad --skill typescript
Clone the repo
git clone --depth 1 https://github.com/2FastLabs/agent-squad

Made for: Claude Code, Codex.

Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,310 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00087 $0.04310
Opus 5 $0.00044 $0.02155
Sonnet 5 $0.00017 $0.00862
Haiku 4.5 $0.00009 $0.00431

Measured 2d ago against content hash 3e19394a998a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-squad-typescript scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 56 executable files (eslint.config.mjs, jest.config.js, src/agentOverlapAnalyzer.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

typescript/SKILL.md · 355 lines

How it starts

The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 pipelineChainAgent: each agent's output is the next agent's input.
  • One lead LLM coordinating a teamSupervisorAgent: the lead calls sub-agents as tools.
  • External tools via MCPMCPToolProvider (async factory pattern, optional peer dep).
  • RAG context → attach a Retriever to any agent that supports retriever? 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.

Read the full file on GitHub · 355 lines

Files

What ships with it

60 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 355 lines · 87 tokens per session scan A 3e19394a998a

Subscribe to this mod's changes

agent-squad-typescript is a skill published in the GitHub repository 2FastLabs/agent-squad (7,752 stars, last pushed 5d ago), licensed Apache-2.0. It adds 87 tokens to every session and 4,310 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

aws-agentic-ai

AWS Bedrock AgentCore comprehensive expert for deploying and managing AI agents at scale. Use when working with any AgentCore service including Gateway, Runtime, Memory, Identity, Code Interpreter, Browser, Observability, Agent Registry, or Evaluations. Covers agent deployment, MCP tool integration, credential…

zxkane/aws-skills · 127 tokens

aws-sst-development

SST v4 (Ion) expert for managing AWS resources as code with the Pulumi-backed framework. Use when writing or editing sst.config.ts, building infra/ modules (sst.aws.Function/Bucket/Dynamo/Cron/Service/Router, sst.Secret, sst.Linkable, raw aws. Pulumi resources), wiring resource links, scoping IAM, or running sst…

zxkane/aws-skills · 249 tokens

schedule

Create, update, list, or run scheduled cloud agents (routines) that execute on a cron schedule.

asgeirtj/system_prompts_leaks · 24 tokens

crewai-multi-agent

Multi-agent orchestration framework for autonomous AI collaboration. Use when building teams of specialized agents working together on complex tasks, when you need role-based agent collaboration with memory, or for production workflows requiring sequential/hierarchical execution. Built without LangChain dependencies…

davila7/claude-code-templates · 61 tokens

crewai

Expert in CrewAI - the leading role-based multi-agent framework used by 60% of Fortune 500 companies. Covers agent design with roles and goals, task definition, crew orchestration, process types (sequential, hierarchical, parallel), memory systems, and flows for complex workflows. Essential for building collaborative…

davila7/claude-code-templates · 89 tokens

workflow-authoring

Reference for writing a Workflow tool script (script API and gotchas, resume, quality patterns, worked examples). Load before authoring a script for a workflow the user already opted into; it does not itself authorize running one.

asgeirtj/system_prompts_leaks · 49 tokens