setup-check validates Python version, package install, API keys, dependencies, and workspace configuration. The checks are local: they confirm a key is set, not that the provider accepts it. It also shows whether SWARMS_API_KEY is set. That key is optional, so the row never fails.
Single-agent examples
Research agent
swarms agent \ --name "Research Assistant" \ --description "AI research specialist" \ --system-prompt "You are an expert research assistant. Provide structured, evidence-based answers." \ --task "Summarize key quantum computing breakthroughs from the last two years" \ --model-name "claude-sonnet-4-6" \ --temperature 0.1 \ --max-loops 3
Code review agent
swarms agent \ --name "Code Reviewer" \ --description "Reviews code for security issues" \ --system-prompt "You are a senior engineer focused on security and best practices." \ --task "Review this code for vulnerabilities: def process(data): return eval(data)" \ --model-name "claude-sonnet-4-6" \ --temperature 0.05 \ --max-loops 2 \ --verbose
Agent with MCP
swarms agent \ --name "MCP Agent" \ --description "Answers questions with MCP tools" \ --system-prompt "Use MCP tools when they help answer the task." \ --task "Find recent news about climate policy and summarize findings" \ --model-name "claude-sonnet-4-6" \ --mcp-url "https://your-mcp-server.example/sse" \ --max-loops 5
Multi-agent from YAML
Create research_team.yaml:
agents: - agent_name: "Data Collector" model_name: "claude-sonnet-4-6" system_prompt: "Gather and organize relevant information." temperature: 0.1 max_loops: 3 - agent_name: "Data Analyzer" model_name: "claude-sonnet-4-6" system_prompt: "Analyze data and extract insights." temperature: 0.2 max_loops: 4 - agent_name: "Report Writer" model_name: "claude-sonnet-4-6" system_prompt: "Write a clear report from the analysis." temperature: 0.3 max_loops: 3swarm_architecture: name: "Research-Team-Swarm" description: "Collect data, analyze it, and write a report" swarm_type: "SequentialWorkflow" task: "Research the current state of solid-state batteries"
Each .md file uses frontmatter for name, description, model_name, temperature, max_loops, mcp_url, and streaming_on, and a body used as the system prompt. The command builds and lists the agents without running them.
In Swarms 15.0.3, passing a directory to --markdown-path fails with Unsupported file type. Load one file at a time.
Deep analysis
swarms heavy-swarm currently fails on every run with a TypeError, because the CLI passes loops_per_agent and random_loops_per_agent to a HeavySwarm constructor that no longer accepts them. Use the Python API instead. swarms llm-council --task "..." works, and needs OpenAI, Google, Anthropic, and xAI keys for its default members.
Configuration templates
# simple_agent.yamlagents: - agent_name: "Simple Assistant" model_name: "claude-sonnet-4-6" system_prompt: "You are a helpful AI assistant." temperature: 0.7 max_loops: 1swarm_architecture: name: "Simple-Assistant-Swarm" description: "A single general-purpose assistant" swarm_type: "SequentialWorkflow" task: "Hello, world!"
Troubleshooting
Issue
What to try
Auth errors
swarms setup-check to see which keys are set, then verify them in .env