CLI Quickstart Tutorial
This tutorial builds a working multi-agent workflow from scratch using only the CLI — no Python required until the final optional step. By the end you’ll have a reusable agent library, a YAML pipeline, and a one-command way to run it. You’ll build: a research → write → review pipeline that takes a topic and produces a polished briefing. Time: 15–20 minutes. Prerequisites: Python 3.10+, one provider API key (OpenAI or Anthropic).Step 1 — Install and Initialize
Step 2 — Pick a Model
Before configuring agents, decide which model you’ll use. Browse the catalog:claude-opus-4-7for the writer (quality matters most)gpt-4ofor the researcher (good cost/quality tradeoff)gpt-4ofor the reviewer
Step 3 — Define the Agent Library (Markdown)
The most ergonomic way to define a reusable agent is a markdown file with YAML frontmatter. Create three files inside anagents/ folder:
agents/researcher.md
agents/writer.md
agents/reviewer.md
Step 4 — Run a Single Agent
Before chaining, sanity-check one agent in isolation:--streaming-on shows tokens arriving in real time so you can tell whether the agent is on track without waiting for the full response.
Step 5 — Chain Them: YAML Pipeline
Createpipeline.yaml:
gpt-4o + claude-opus-4-7 will be a few cents.
Step 6 — Try a Different Architecture
The same agents can run as a Concurrent Workflow (all three see the same task in parallel) or as a Mixture of Agents (workers + aggregator). Try Concurrent for a different angle:Step 7 — Auto-Generate a Swarm
When you don’t know which architecture fits, let the CLI design one:--no-run writes the generated Python file without executing it, so you can inspect it first. Open generated_swarm.py — it’s plain swarms Python code you can edit, version-control, or rerun manually.
To run it immediately, drop --no-run:
Step 8 — Deep Analysis with Heavy Swarm
For research-grade depth,heavy-swarm decomposes the task into specialist questions and runs each through a worker for multiple loops:
Step 9 — Council Debate
When the task has multiple valid answers and you want disagreement surfaced:Step 10 — Save and Resume an Agent
For long-running tasks (autonomous research, ongoing chat with memory), persist state to disk:./helios.json, the agent picks up exactly where it left off — including everything you told it.
Step 11 — Use a Tip on Every Run
Runswarms tips whenever you want a quick reminder of a flag you might have forgotten:
Step 12 — When Things Break
If a command errors out, the CLI classifies the failure and prints targeted hints. Try these intentionally to see the error system at work:Did you mean swarms agent?.
What You Built
You now have:- A reusable agent library in
agents/*.md - A repeatable sequential pipeline in
pipeline.yaml - A concurrent variant in
pipeline-concurrent.yaml - A fluency with the four most useful swarm-level commands (
run-agents,autoswarm,heavy-swarm,llm-council) - A way to persist and resume long-running agents
agents/ and pipeline.yaml to git — they’re plain text. Anyone who clones your repo can run your workflow with the same one-liner.
Next Steps
CLI Tutorial
The long-form CLI tour, including power-user tricks
Commands Reference
Every command, every flag, with examples
Configuration
YAML and markdown configuration formats in depth
Multi-Agent Architectures
Learn the architectures behind each swarm command