Skip to content

Building with an AI assistant

The repo ships SKILL.md — a single, assistant-agnostic guide at the root of the swift/ directory. It covers:

  • Mental model — when to reach for Agent vs. GroundedAgent, single-agent vs. classifier routing, text vs. voice
  • Real API signaturesOrchestrator, Agent, GroundedAgent, LLMClassifier, ChatCompletionsClient, storage and tracing types
  • Module map — what each import (AgentSquad, AgentSquadMCP, AgentSquadAudio) pulls in
  • Task recipes — the AsyncThrowingStream<AgentEvent, any Error> loop, routing between agents, wiring tools, custom protocol conformances
  • GotchasmaxToolRounds defaults, JSONValue integer decoding, storage scoping, tracing lifecycle, realtime teardown

Tell your assistant once, before it writes any AgentSquad code:

Read SKILL.md before writing any AgentSquad code.

That is all. The file is self-contained — no context beyond it is required.

This works with any assistant: Claude, Cursor, GitHub Copilot, or anything else that can read a file.

Claude Code users can register SKILL.md so it is loaded automatically whenever the assistant works on AgentSquad code. Copy the file into your project’s skills directory:

Terminal window
mkdir -p .claude/skills/agent-squad-swift
cp swift/SKILL.md .claude/skills/agent-squad-swift/SKILL.md

After that, Claude Code picks it up without an explicit instruction on every session.

SKILL.md is guidance and a map, not an API reference. It tells you what to use, when, and what to watch out for. For exact signatures, read the sources under swift/Sources/AgentSquad/. For worked examples, see the rest of this doc site — in particular: