swarms CLAUDE.md

swarms CLAUDE.md is an instructions file for Claude Code from kyegomez/swarms. It costs 8,544 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Swarms, a Python framework for building workflows where multiple AI agents cooperate. An agent is a program that performs a task using instructions and tools.

In plain words
What is it for?
Creating individual agents and multi-agent workflows that run sequentially, concurrently, as graphs, or through voting and routing patterns.
Why use it?
They show how to install the framework, configure AI providers, and choose the right workflow structure instead of assembling it from guesswork.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

About the project

Swarms is a Python framework for coordinating multiple autonomous language-model agents into workflows such as sequential, concurrent, or hierarchical systems. It is used to build multi-step applications in which agents combine language models, tools, and memory. The catalogue entries provide agent-oriented skills, instructions, and an agent for working with Swarms.

kyegomez/swarms · 7,132 stars · on GitHub · docs.swarms.world

Install

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.

agentmods
npx agentmods add instructions/kyegomez/swarms/claude-md
Clone the repo
git clone --depth 1 https://github.com/kyegomez/swarms

Made for: Claude Code.

Wrote 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.

agentmods badge for swarms CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kyegomez/swarms/claude-md.svg)](https://agentmods.dev/instructions/kyegomez/swarms/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/kyegomez/swarms/claude-md"><img src="https://agentmods.dev/badge/instructions/kyegomez/swarms/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 8,544 This file is loaded in full into every session.
When invoked 8,544 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.08544 $0.08544
Opus 5 $0.04272 $0.04272
Sonnet 5 $0.01709 $0.01709
Haiku 4.5 $0.00854 $0.00854

Measured 6d ago against content hash 92d0d1083f1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

swarms CLAUDE.md 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 6d 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.

CLAUDE.md · 1,101 lines

How it starts

The opening of the file, as written. The whole thing — 1,101 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — Swarms Framework Guide

This file teaches you how to build agents and multi-agent systems with the Swarms framework. Read it before writing any code in this repo.


Installation & Setup

pip install swarms

Set your LLM API key as an environment variable before running:

export OPENAI_API_KEY="sk-..."        # OpenAI / GPT models
export ANTHROPIC_API_KEY="sk-ant-..." # Claude models
export GROQ_API_KEY="..."             # Groq
# Any provider supported by LiteLLM works

All imports come from the top-level swarms package:

from swarms import (
    Agent,
    SequentialWorkflow,
    ConcurrentWorkflow,
    AgentRearrange,
    GraphWorkflow,
    SwarmRouter,
    MixtureOfAgents,
    HierarchicalSwarm,
    GroupChat,
    MajorityVoting,
    # ...
)

Project Layout

swarms/
├── swarms/
│   ├── structs/         # All agent + multi-agent structures (61 files)
│   │   ├── agent.py             # Core Agent class
│   │   ├── conversation.py      # Conversation / memory management
│   │   ├── sequential_workflow.py
│   │   ├── concurrent_workflow.py
│   │   ├── agent_rearrange.py
│   │   ├── graph_workflow.py
│   │   ├── swarm_router.py      # Single-entry-point router
│   │   ├── mixture_of_agents.py
│   │   ├── hiearchical_swarm.py
│   │   ├── groupchat.py
│   │   ├── majority_voting.py
│   │   ├── council_as_judge.py
│   │   ├── debate_with_judge.py
│   │   ├── heavy_swarm.py
│   │   ├── round_robin.py
│   │   ├── planner_worker_swarm.py
│   │   ├── auto_swarm_builder.py
│   │   └── multi_agent_exec.py  # run_agents_concurrently + friends
│   ├── tools/           # Tool utilities, MCP, schema conversion
│   └── utils/           # Logging, formatting helpers
├── examples/            # 586 runnable examples
│   ├── single_agent/
│   ├── multi_agent/
│   ├── tools/
│   └── guides/
└── v12_examples/        # New v12 feature examples

Look in examples/ first before writing new code — there is almost certainly an existing example close to what you need.

Read the full file on GitHub · 1,101 lines

Changes

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.

  1. 6d ago First seen · 1,101 lines · 8,544 tokens per session scan A 92d0d1083f1a

Subscribe to this mod's changes

swarms CLAUDE.md is an instructions file published in the GitHub repository kyegomez/swarms (7,132 stars, last pushed today), licensed Apache-2.0. It adds 8,544 tokens to every session, about $0.0427 per session on Opus 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.

Related

Other instructions, from other repositories

skillkit CLAUDE.md

Instructions for maxvaega/skillkit, covering skillkit, development approach, current focus (v0.4), key architectural decisions and core architecture (v0.1).

maxvaega/skillkit · 4,749 tokens

awesome-copilot copilot-instructions.md

Copilot instructions for github/awesome-copilot, covering readme updates, prompt file guide, instruction file guide, agent file guide and agent skills guide.

github/awesome-copilot · 829 tokens

opik copilot-instructions.md

Copilot instructions for comet-ml/opik, covering copilot code review instructions, project overview, 1. git workflow & branch management, branch naming convention and commit message standards.

comet-ml/opik · 5,043 tokens

spiceai copilot-instructions.md

Copilot instructions for spiceai/spiceai, covering spice.ai agent instructions, data correctness — absolute top priority, evidence — no claim without a reproduction, build, test, lint (expensive — read first) and git & prs.

spiceai/spiceai · 7,971 tokens

devops-ai-guidelines copilot-instructions.md

Instructions for VersusControl/devops-ai-guidelines, covering copilot instructions: kubernetes mcp workspace, operating rules and code style for go contributions.

VersusControl/devops-ai-guidelines · 410 tokens

claude-secure-coding-rules CLAUDE.md

Instructions for TikiTribe/claude-secure-coding-rules, covering claude.md - secure coding rules for claude code, project overview, repository structure, rule counts and rule format.

TikiTribe/claude-secure-coding-rules · 2,599 tokens