Skills

Swarms Agents

Builds agents and multi-agent workflows with the Swarms framework.

Install

npx skills add kyegomez/swarms --skill swarms -g -a claude-code -y
Repository
kyegomez/swarms7.3k
Category
AI and agents
Updated
4d ago
License
Apache-2.0
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Build agents and multi-agent systems with the Swarms framework, the Agent class, tools, autonomous loops, memory, and the 15+ multi-agent architectures (SequentialWorkflow, ConcurrentWorkflow, GraphWorkflow, HierarchicalSwarm, SwarmRouter, and more). Use whenever writing, reviewing, or debugging code that imports `swarms`.

Swarms

Swarms is a multi-agent orchestration framework. Everything is built from one primitive, Agent, which multi-agent structures compose. This document is verified against swarms v14.0.0.

Live documentation

This skill can lag the library. When a signature here disagrees with the installed version, check the current docs:

  • Docs MCP server, no key: https://docs.swarms.world/mcp (claude mcp add --transport http swarms-docs https://docs.swarms.world/mcp)
  • Marketplace MCP server, Swarms API key for calls: https://swarms.world/mcp
  • Plain-text docs: llms.txt (index), llms-full.txt (every page)

Golden rules

  1. Import from the top level: from swarms import Agent, never from swarms.structs.agent import Agent. The one common exception is PlannerWorkerSwarm (see below).
  2. Every agent needs a unique agent_name, memory files and swarm routing key on it.
  3. Default to max_loops=1. Use a specific integer for production. Use "auto" only for genuinely open-ended work.
  4. Pass tools=None, not tools=[]. An empty list breaks schema generation.
  5. Check examples/, 586 runnable examples live there. One is probably close to what you need.
  6. Never set streaming_on=True and streaming_callback together. Pick one.

Setup

pip install -U swarms

Set the key for whichever provider you use, any LiteLLM model string works:

export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GROQ_API_KEY="..."
export WORKSPACE_DIR="agent_workspace"   # where agent state and memory land

Part 1, The Agent

from swarms import Agent

agent = Agent(
    agent_name="Analyst",
    agent_description="Analyzes market data and produces summaries.",
    system_prompt="You are a precise financial analyst.",
    model_name="gpt-5.4",
    max_loops=1,
)
Read the whole SKILL.md on GitHub

More in AI and agents