swarms
O que ela faz
Esta skill ensina o agente a escrever código com o framework Swarms para agentes de IA. Ela serve para desenvolvedores que criam agentes, ferramentas e fluxos de trabalho com vários agentes em Python.
Quando usar
- ✓Quando você quer criar um agente de IA em Python usando o Swarms.
- ✓Quando você quer que vários agentes trabalhem juntos em um fluxo de trabalho definido.
- ✓Quando você tem um código do Swarms que quebra e quer que ele seja revisado ou corrigido.
Link da skill
https://github.com/kyegomez/swarms/blob/master/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Crie uma equipe em Python com três agentes do Swarms que pesquisem, escrevam e depois revisem um relatório curto.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente usa a classe Agent do framework e suas estruturas prontas de equipe, seguindo as regras e os exemplos do framework. Quando um detalhe não bate com a versão instalada, ele consulta a documentação atual.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
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
- Import from the top level:
from swarms import Agent, neverfrom swarms.structs.agent import Agent. The one common exception isPlannerWorkerSwarm(see below). - Every agent needs a unique
agent_name— memory files and swarm routing key on it. - Default to
max_loops=1. Use a specific integer for production. Use"auto"only for genuinely open-ended work. - Pass
tools=None, nottools=[]. An empty list breaks schema generation. - Check
examples/— 586 runnable examples live there. One is probably close to what you need. - Never set
streaming_on=Trueandstreaming_callbacktogether. 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,
)
result = agent.run("Summarize the state of the semiconductor market.")
Agent.__init__ accepts 90+ parameters. These are the ones that matter:
| Parameter | Type | Default | Purpose |
|---|---|---|---|
agent_name |
str |
"swarm-worker-01" |
Unique identity; keys memory + routing |
agent_description |
str |
generic | How orchestrators decide to route to it |
system_prompt |
str |
built-in | Persona and instructions |
model_name |
str |
"gpt-5.4" |
Any LiteLLM model string |
max_loops |
int | "auto" |
1 |
Iterations, or autonomous mode |
tools |
list[Callable] |
None |
Python functions the agent may call |
temperature |
float |
0.5 |
Sampling temperature |
max_tokens |
int |
model max | Output cap per call |
top_p |
float |
None |
Nucleus sampling |
context_length |
int |
None |
Token budget; triggers compression at 90% |
output_type |
str |
"str-all-except-first" |
Return shape — see below |
streaming_on |
bool |
False |
Stream tokens to stdout |
streaming_callback |
Callable |
None |
Stream tokens to your function |
interactive |
bool |
False |
REPL — prompts the user each loop |
verbose |
bool |
False |
Debug logging |
print_on |
bool |
True |
Print the final output |
autosave |
bool |
False |
Persist agent state after each run |
retry_attempts |
int |
3 |
LLM call retries |
reasoning_effort |
str |
None |
minimal/low/medium/high/xhigh/ultra/max/none |
thinking_tokens |
int |
1024 |
Extended thinking budget (Claude) |
mcp_url / mcp_urls |
str / list[str] |
None |
MCP servers to load tools from |
handoffs |
list[Agent] |
None |
Agents this one may delegate to |
persistent_memory |
bool |
False |
Read/write MEMORY.md across restarts |
context_compression |
bool |
True |
Auto-summarize near the context limit |
plan_enabled |
bool |
False |
Plan before executing |
mode |
str |
"standard" |
"standard", "fast", "interactive" |
fallback_models |
list[str] |
None |
Models to try if the primary fails |
output_type options: "str", "list", "dict", "json", "yaml", "final", "last", "all", "str-all-except-first", "dict-all-except-first", "dict-final", "list-final".
Running
agent.run(task="...") # standard
agent.run(task="...", img="chart.png") # one
Perguntas frequentes
Preciso ser especialista em Python?
Algum conhecimento de Python ajuda, já que o código é escrito em Python. O agente faz a maior parte da programação.
O código vai acompanhar a versão mais nova da biblioteca?
A skill diz que a biblioteca pode mudar mais rápido que o guia, então o agente deve consultar a documentação atual quando os detalhes forem diferentes.
Ela também cobre agentes individuais?
Sim. Toda equipe é montada a partir de um tipo básico de agente, então as mesmas ideias valem para um único agente.
Detalhes
Descrição original do autor
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`.
repo: kyegomez/swarms
Popularidade
- Estrelas no GitHub
- 7,3 mil
- Posição no ranking
- #13288
- Licença
- Apache-2.0
- Atualizada em
- 02/11/2026
Comentários
- …
Skills parecidas
add-model-provider
394 milPermite que seu agente conecte um novo provedor de modelos de IA ao OpenClaw com comandos seguros, guarde as chaves de API com segurança e faça um teste ao vivo.
acp-router
394 milAjuda seu agente a enviar uma tarefa a um assistente de programação, como Claude Code ou Cursor, pelo OpenClaw, para que o trabalho rode nessa ferramenta.
browser-automation
394 milEnsina seu agente a controlar páginas web passo a passo, incluindo logins, abas e recuperação quando uma página para de responder.