SuperAPI AI Directory

multi-agent-orchestrator

Agent Squad is a flexible, lightweight, open-source multi-AI agent orchestration framework, formerly named multi-agent-orchestrator, previously hosted at awslabs and now maintained by 2FastLabs. It can route each user query to the most appropriate specialized agent and maintain conversation context across multiple agents. The framework supports three runtimes—Python, TypeScript, and Swift—and provides prebuilt agents, classifiers, storage, and retrievers, while allowing custom extensions. Its core capabilities include intelligent intent classification, streaming/non-streaming responses, context management, an extensible design, as well as SupervisorAgent team coordination and the GroundedAgent anti-hallucination mode. The Swift runtime supports orchestration entirely on-device on iPhone, iPad, and Mac, including real-time voice and local chat storage. The project is licensed under Apache 2.0.

Open website

About this tool

Agent Squad is a flexible, lightweight, open-source multi-AI agent orchestration framework for managing multiple AI agents and handling complex conversations. The project was formerly named multi-agent-orchestrator, previously hosted at awslabs/agent-squad, and has now moved to 2fastlabs/agent-squad.

Primary Use Agent Squad routes each user query to the most appropriate specialized agent and maintains conversation context across multiple agents. It provides prebuilt agents, classifiers, and storage for rapid deployment, while retaining small, well-defined extension seams for integrating custom components.

Key Capabilities

  • Intelligent intent classification: routes queries based on context and content.
  • Streaming and non-streaming agent responses.
  • Context management: maintains coherent conversations across agents and sessions.
  • Extensible design: supports custom agents, classifiers, storage, and retrievers.
  • Prebuilt agents: including Bedrock, Anthropic, OpenAI, Lex, Lambda, and more.
  • Three runtimes: Python and TypeScript are feature-equivalent and can run on AWS Lambda, in containers, or locally; the newly added Swift runtime targets Apple platforms and supports fully on-device orchestration, including classifier routing, native and MCP tools, real-time voice, tracing, and local-first chat storage.

Workflow

  1. User input is analyzed by the Classifier.
  2. The Classifier selects the most suitable agent for the current turn based on agent descriptions and conversation history.
  3. The selected agent processes the input (calling tools as needed).
  4. The orchestrator saves the interaction and returns the response.

JevClassifier JevClassifier provides typed decision routing in TypeScript and Python. Instead of using an LLM, it sends agents as typed multiple-choice questions to Jev (TypeSafe AI's System One model), returning the winning agent and calibrated confidence, without parsing free text or handling tool-calling pipelines. Features include:

  • Zero additional dependencies in both runtimes: TypeScript uses built-in fetch, Python uses only the standard library, and both come with complete mock test suites.
  • Fast and low-cost: sub-second decisions, billed only by input tokens (output tokens are free), compared with each routing decisionPolicy calls are more economical with a full LLM.
  • Context-aware follow-up: even if the topic is switched mid-conversation, "yes, go ahead" can be routed back to the agent that is waiting for an answer.
  • Built-in unknown option: out-of-scope requests return no agent instead of being forced to match, and the calibrated confidence can be used for threshold decisions.
  • One-line integration: new AgentSquad({ classifier: new JevClassifier() }) or AgentSquad(classifier=JevClassifier()), and set TYPESAFE_API_KEY.

SupervisorAgent SupervisorAgent is used for team coordination: a lead agent uses an "agent-as-tool" architecture to coordinate a group of specialized agents in parallel, maintain shared context, and deliver one coherent response. It supports parallel sub-agent queries, dynamically delegates subtasks to the appropriate team members, is suitable for all agent types, and can be registered with the classifier to build hierarchical teams.

GroundedAgent GroundedAgent is available in all three runtimes and is the framework's anti-hallucination mode, using two LLMs instead of one:

  • The gatherer calls tools and sees the raw results, but never talks to the user.
  • The isolated presenter writes the reply only from the organized tool output, without using tools, tool records, or chat history. It cannot fabricate prices, ratings, or stock status that were not actually obtained.
  • Tool-free turns skip the presenter and answer in a single pass. It is suitable for scenarios where the answer must exactly match the data, such as prices, odds, balances, availability, and so on.

Swift Runtime The Swift runtime rebuilds the above orchestration model for Apple platforms as a protocol-driven Swift 6 package, with the entire loop running on-device:

  • Replaceable agents: Agent, GroundedAgent, or a custom AgentProtocol implementation, routed by an optional LLMClassifier.
  • Tools from any source: native Swift functions, declarative HTTP tools, or any MCP server, composed behind a single seam.
  • Real-time voice: natural voice conversation, with support for interrupting speech, sharing the same grounded gatherer -> presenter core.
  • First-class tracing: use OSLog during development, and export OTLP in production (Langfuse, LangSmith, Datadog, etc.).
  • Local-first chat history: device-side JSON files or SwiftData persistence, replaceable like other components.

Examples and Demos

  • Streamlit Global Demo: AI film production studio, AI travel planner, and others integrated into a single app.
  • chat-demo-app: A web chat interface with multiple specialized agents.
  • ecommerce-support-simulator: AI customer support with human handoff.
  • chat-chainlit-app: A chat app built with Chainlit.
  • fast-api-streaming: A FastAPI streaming example.
  • text-2-structured-output: Natural language to structured data.
  • bedrock-inline-agents, bedrock-prompt-routing: Bedrock examples.
  • jev-demo: A JevClassifier multi-turn routing demo, plus a latency and cost comparison between Jev and the Bedrock classifier.

Installation and Usage For Swift, you can add the package via Package.swift (or Add Package Dependencies in Xcode); full instructions are in the Swift README. Installation and usage instructions for other runtimes are not yet provided.

Assisted Development Each runtime provides a skill file as an assistant-agnostic guide, giving AI assistants a mental model, real API signatures, task recipes, and caveats. These files are not installed automatically and must be pointed to manually. For example: read python/SKILL.md before writing any agent-squad Python code. Works with any assistant (Claude, Cursor, Copilot, etc.).

Community and Contributions Questions, ideas, or show-and-tell are welcome in discussions (Show & Tell / General / Ideas sections). Contributions follow an issue-first policy: every pull request must be linked to an issue (write Fixes #123 in the PR body or use GitHub's Link an issue), and a required CI check enforcesthis. Please open an issue to discuss your proposal first, then refer to the Contributing Guide for build and test instructions for each runtime.

License The project is licensed under Apache 2.0; see the LICENSE file for details. It uses the JetBrainsMono NF font, under the SIL Open Font License 1.1.