Agent Squad is a framework that routes each user request to an appropriate specialized AI agent while preserving conversation context. It is used to build multi-agent applications in Python, TypeScript, or Swift, with support for custom agents and pre-built integrations.
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.
npx skills add 2FastLabs/agent-squad --skill swiftgit clone --depth 1 https://github.com/2FastLabs/agent-squadWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/2fastlabs/agent-squad/swift)<a href="https://agentmods.dev/skills/2fastlabs/agent-squad/swift"><img src="https://agentmods.dev/badge/skills/2fastlabs/agent-squad/swift/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/2fastlabs/agent-squad/swift"><img src="https://agentmods.dev/badge/skills/2fastlabs/agent-squad/swift.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00091 | $0.03648 |
| Opus 5.5 | $0.00036 | $0.01459 |
| Sonnet 5.5 | $0.00018 | $0.00730 |
| Haiku 4.5 | $0.00009 | $0.00365 |
Grade A, and why
agent-squad-swift 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 1mo ago.
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.
How it starts
The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.
AgentSquad Swift — assistant guide
Protocol-driven, on-device multi-agent framework (Swift 6.2, iOS 16+ / macOS 14+; persistence via
FileChatStorage on iOS 16+, DeviceChatStorage on iOS 17+). This is guidance and
a map — not an API reference. Read the exact signatures from the source (swift/Sources/AgentSquad/)
and the worked recipes from the docs site sources (docs/src/content/docs/swift/); this file tells
you what to use, when, and what to watch out for.
When to use what
- One assistant → an
Agent(orGroundedAgent) + anOrchestratorwith no classifier. No routing hop. - Several specialists → multiple agents + an
LLMClassifier; the orchestrator routes each turn. - Answers must not drift from data (prices, stock, balances) →
GroundedAgent: a Brain calls tools, an isolated Presenter speaks only from the curated results (it can be a smaller/local model). - Voice → a
VoiceAssistant(a peer of the orchestrator, not an agent):OpenAIVoiceAssistant(single LLM + tools, speaks directly — the spoken analog ofAgent) orOpenAIGroundedVoiceAssistant(Brain → Presenter, can't drift from data — analog ofGroundedAgent).
Every component is a Sendable protocol with one built-in implementation — swap in your own anywhere.
Modules (import only what you use)
| Import | Pulls in | Contents |
|---|---|---|
AgentSquad |
nothing external | protocols, Agent, GroundedAgent, Orchestrator, LLMClassifier, ChatCompletionsClient, DakeraRetriever, FileChatStorage, DeviceChatStorage, InMemoryChatStorage, TransformingChatStorage, SummarizingChatStorage, OSLogTracer, OTLP export |
AgentSquadMCP |
MCP Swift SDK | MCPServer (= MCPToolProvider), SDKMCPClient |
AgentSquadAudio |
AVFoundation | VoiceProcessedAudioIO (capture+playback, one engine, AEC — the recommended wiring), MicCapture (voice-processed/AEC by default), AudioPlayback, VoiceProcessing, AudioSessionPolicy (needs NSMicrophoneUsageDescription) |
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.
- .gitignore 206 B
- README.md 17 KB
- Sources/AgentSquad/Agents/Agent.swift 9.3 KB
- Sources/AgentSquad/Agents/GroundedAgent.swift 6.6 KB
- Sources/AgentSquad/Core/AgentProtocol.swift 2.7 KB
- Sources/AgentSquad/Core/Classifier/Classifier.swift 1.4 KB
- Sources/AgentSquad/Core/Classifier/LLMClassifier.swift 6.6 KB
- Sources/AgentSquad/Core/JSONValue.swift 5.1 KB
- Sources/AgentSquad/Core/LLM/ChatCompletionsClient.swift 7.6 KB
- Sources/AgentSquad/Core/LLM/ChatCompletionsTransport.swift 1.8 KB
- Sources/AgentSquad/Core/LLM/ChatCompletionsWire.swift 6.4 KB
- Sources/AgentSquad/Core/LLMClient.swift 1.8 KB
- Sources/AgentSquad/Core/Message.swift 1.7 KB
- Sources/AgentSquad/Core/Presenter/Grounding.swift 1.5 KB
- Sources/AgentSquad/Core/Presenter/PresenterPrompt.swift 1.6 KB
- Sources/AgentSquad/Core/Presenter/ToolOutputCurator.swift 3.7 KB
- Sources/AgentSquad/Core/Slugify.swift 390 B
- Sources/AgentSquad/Core/Storage/ChatStorage.swift 3.2 KB
- Sources/AgentSquad/Core/Tooling/AgentTool.swift 1.6 KB
- Sources/AgentSquad/Core/Tooling/AggregateToolProvider.swift 2.8 KB
- Sources/AgentSquad/Core/Tooling/CapturingToolProvider.swift 777 B
- Sources/AgentSquad/Core/Tooling/HTTPToolGroup.swift 8.2 KB
- Sources/AgentSquad/Core/Tooling/HTTPToolSpec.swift 14 KB
- Sources/AgentSquad/Core/Tooling/Tool.swift 1.4 KB
- Sources/AgentSquad/Core/Tooling/ToolKit.swift 1.4 KB
- Sources/AgentSquad/Core/Tooling/ToolParameter.swift 3.1 KB
- Sources/AgentSquad/Core/Tooling/ToolProvider.swift 2.0 KB
- Sources/AgentSquad/Core/Tracing/BatchSpanProcessor.swift 7.5 KB
- Sources/AgentSquad/Core/Tracing/OSLogTracer.swift 2.7 KB
- Sources/AgentSquad/Core/Tracing/OTLP/OTLPExporter.swift 2.8 KB
- Sources/AgentSquad/Core/Tracing/OTLP/OTLPModel.swift 8.4 KB
- Sources/AgentSquad/Core/Tracing/ProcessingTracer.swift 3.8 KB
- Sources/AgentSquad/Core/Tracing/Redaction.swift 2.7 KB
- Sources/AgentSquad/Core/Tracing/TraceEvent.swift 2.8 KB
- Sources/AgentSquad/Core/Tracing/Tracing.swift 6.7 KB
- Sources/AgentSquad/Core/UIPayload.swift 2.6 KB
- Sources/AgentSquad/Core/Version.swift 228 B
- Sources/AgentSquad/Orchestrator.swift 5.9 KB
- Sources/AgentSquad/Retrieval/DakeraRetriever.swift 11 KB
- Sources/AgentSquad/Runtimes/Realtime/AudioIO.swift 1.5 KB
- Sources/AgentSquad/Runtimes/Realtime/AudioTruncation.swift 2.2 KB
- Sources/AgentSquad/Runtimes/Realtime/OpenAIGroundedVoiceAssistant.swift 20 KB
- Sources/AgentSquad/Runtimes/Realtime/OpenAIRealtimeSession.swift 11 KB
- Sources/AgentSquad/Runtimes/Realtime/OpenAIVoiceAssistant.swift 18 KB
- Sources/AgentSquad/Runtimes/Realtime/RealtimeRuntime.swift 4.9 KB
- Sources/AgentSquad/Runtimes/Realtime/RealtimeSessionError.swift 1.5 KB
- Sources/AgentSquad/Runtimes/Realtime/RealtimeTransport.swift 1.4 KB
- Sources/AgentSquad/Runtimes/Realtime/RealtimeWire.swift 21 KB
- Sources/AgentSquad/Runtimes/Realtime/URLSessionWebSocketTransport.swift 3.6 KB
- Sources/AgentSquad/Runtimes/Realtime/VoiceAssistant.swift 6.2 KB
- Sources/AgentSquad/Storage/DeviceChatStorage.swift 9.3 KB
- Sources/AgentSquad/Storage/FileChatStorage.swift 5.4 KB
- Sources/AgentSquad/Storage/InMemoryChatStorage.swift 2.5 KB
- Sources/AgentSquad/Storage/SummarizingChatStorage.swift 6.0 KB
- Sources/AgentSquad/Storage/TransformingChatStorage.swift 3.5 KB
- Sources/AgentSquadAudio/AudioConfiguration.swift 2.0 KB
- Sources/AgentSquadAudio/AudioPlayback.swift 4.5 KB
- Sources/AgentSquadAudio/MicCapture.swift 6.1 KB
- Sources/AgentSquadAudio/PCM16.swift 2.4 KB
- Sources/AgentSquadAudio/PlaybackClock.swift 2.7 KB
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.
- 1mo ago First seen · 170 lines · 91 tokens per session scan A 8ec7c834482d
agent-squad-swift is a skill published in the GitHub repository 2FastLabs/agent-squad (7,792 stars, last pushed 12d ago), licensed Apache-2.0. It adds 91 tokens to every session and 3,648 once invoked, about $0.0004 per session on Opus 5.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.
Other skills, from other repositories
nx-plugin-for-aws
Scaffold and build cloud-native applications on AWS using @aws/nx-plugin generators. Use when the user wants to create workspaces, generate projects, or scaffold infrastructure with the Nx Plugin for AWS.
cdkd
Install cdkd and use it safely from an AWS CDK project. Use when bootstrapping, synthesizing, diffing, deploying, inspecting, rolling back, migrating, or destroying dev/test stacks with cdkd.
create-html
A skill for turning notes, research, comparisons, plans, or reports into one responsive HTML briefing. The result is a self-contained page that can be opened and shared without a build system or external services.
inbox
Read requests the owner placed in HTML共有くん from a phone and start them on this computer. Use when the user says /inbox, $inbox, or asks to pick up phone requests.
mobile
A mobile handoff skill that sends the current coding task to a phone-review service and waits for feedback. It also explains how to retrieve and apply review comments or stop an active watcher.
app-store-optimization
Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store.