Agent Squad

Frameworks & SDKs 💻 Swift ⚖️ Apache-2.0 🟢 Actively maintained
7.8k stars

Agent Squad is a flexible, lightweight open-source framework for orchestrating multiple AI agents. It routes each user query to the most suitable specialized agent and maintains conversation context across them. It is for developers building multi-agent AI applications in Python, TypeScript, or Swift.

Agent Squad demo
🎞️ Demo from the project README

✨ Key features

  • Intelligent intent classification routes queries by context and content.
  • Streaming and non-streaming agent responses.
  • Context management for coherent conversations across agents and sessions.
  • Extensible design with custom agents, classifiers, storage, and retrievers.
  • Pre-built agents for Bedrock, Anthropic, OpenAI, Lex, Lambda, and more.
  • Swift runtime for on-device orchestration on Apple platforms.

🎯 Use cases

  • Build a customer support system that routes queries to specialized agents.
  • Create a travel planning app with agents for flights, hotels, and activities.
  • Develop an AI assistant that answers questions with data grounded in your tools.
  • Deploy a multi-agent chat application on AWS Lambda or containers.
  • Build an on-device assistant for iPhone or Mac with realtime voice.

📦 Installation

🧰 Requirements: Python 3.11+ for Python runtime, Node.js for TypeScript, iOS 16+ / macOS 14+ for Swift. API keys may be required for specific agents (e.g., Bedrock, OpenAI).

TypeScript

npm install agent-squad

Python

pip install "agent-squad[aws]"   # or [anthropic], [openai], [all] — see the docs

Swift

Add the package to your Package.swift (or via Xcode → Add Package Dependencies):

dependencies: [
    .package(url: "https://github.com/2FastLabs/agent-squad", branch: "main")
]

🚀 Usage

TypeScript

import { AgentSquad, BedrockLLMAgent } from "agent-squad";

const orchestrator = new AgentSquad();

orchestrator.addAgent(
  new BedrockLLMAgent({
    name: "Tech Agent",
    description: "Specializes in technology: software, hardware, AI, cybersecurity, cloud.",
    streaming: true
  })
);

const response = await orchestrator.routeRequest("What is AWS Lambda?", "user123", "session456");

console.log(`> Agent: ${response.metadata.agentName}\n`);
if (response.streaming) {
  for await (const chunk of response.output) {
    if (typeof chunk === "string") process.stdout.write(chunk);
  }
} else {
  console.log(response.output);
}

⚠️ Good to know

The project was formerly named multi-agent-orchestrator and has moved from awslabs to 2fastlabs; no other limitations are stated in the README.

❓ FAQ

What runtimes are supported?

Agent Squad supports Python (3.11+), TypeScript (Node.js), and Swift (iOS 16+ / macOS 14+).

How does Agent Squad decide which agent to use?

A classifier analyzes the user input and conversation history to select the best agent based on agent descriptions.

Can I use my own agents?

Yes, the framework is extensible by design, allowing custom agents, classifiers, storage, and retrievers.

What is GroundedAgent?

GroundedAgent is an anti-hallucination pattern using two LLMs: a gatherer that calls tools and a presenter that writes the reply only from tool output, preventing drift from data.

📊 Repository

Stars★ 7,756
Forks🍴 738
Open issues🐛 92
Last commit🕒 Sep 3, 2026
Created📅 Jul 2024
Language💻 Swift
License⚖️ Apache-2.0

🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.