2FastLabs/agent-squad

Flexible and powerful framework for managing multiple AI agents and handling complex conversations

What it solves

Agent Squad is a lightweight framework for orchestrating multiple specialized AI agents. It solves the problem of routing user queries to the most appropriate agent while maintaining conversation context across different agents and sessions, preventing the need for a single, monolithic agent to handle every possible task.

How it works

The framework uses a Classifier to analyze user input and select the best agent based on agent descriptions and conversation history. Once selected, the agent processes the input and can call tools as needed. The Orchestrator then saves the exchange and returns the response.

It supports three runtimes: Python, TypeScript, and Swift. The Swift runtime allows this entire orchestration loop—including routing, tool use (via native functions or MCP servers), and local chat storage—to run entirely on-device for Apple platforms.

Who it’s for

Developers building multi-agent systems across cloud environments (AWS Lambda, containers) or directly on Apple devices (iOS, macOS), who need a flexible way to to manage agent routing and context.

Highlights

  • Multi-Runtime Support: Available in Python, TypeScript, and Swift for both cloud and on-device deployment.
  • SupervisorAgent: A lead agent that can coordinate a team of specialized agents in parallel to deliver a coherent response.
  • GroundedAgent: An anti-hallucination pattern using a gatherer-presenter architecture to ensure answers match the provided data exactly.
  • On-Device Orchestration: The Swift runtime provides local-first chat history, realtime voice, and MCP tool integration for Apple platforms.