Swarms Api Cookbook
Description
Practical cookbook examples for the Swarms API Client. This repository is a hands-on guide to building with Swarms, showcasing single-agent and multi-agent workflows, concurrent and sequential pipelines, content generation, data analysis, health and rate checks, and more.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Swarms API Cookbook
🏠 Swarms Website • 📙 Documentation • 🔑 API Key Management
Practical cookbook examples for the Swarms API Client. This repository is a hands-on guide to building with Swarms, showcasing single-agent and multi-agent workflows, concurrent and sequential pipelines, content generation, data analysis, health and rate checks, and more. Each example is designed to be minimal yet illustrative, so you can quickly adapt patterns to your own use cases.
What you’ll find here:
- Clear, runnable examples for common tasks
- Patterns for hierarchical, concurrent, and sequential workflows
- Utilities for health checks, model discovery, logs, and rate limits
- Async usage with
AsyncSwarmsClientfor higher throughput workloads
Install
pip install swarms-client python-dotenv
Set your API Key
Use an environment variable:
export SWARMS_API_KEY="your_api_key_here"
Or create a `.env` file in your project root:
echo 'SWARMS_API_KEY=your_api_key_here' > .env
Quickstart
import os
from dotenv import load_dotenv
from swarms_client import SwarmsClient
load_dotenv()
client = SwarmsClient(api_key=os.getenv("SWARMS_API_KEY"))
response = client.swarms.run(
name="Hello Swarm",
description="Simple demo swarm",
swarm_type="SequentialWorkflow",
task="Write a concise haiku about collaborative AI.",
agents=[
{
"agent_name": "Haiku Writer",
"description": "Creates short poetic outputs",
"system_prompt": "Write a haiku that is vivid and clear.",
"model_name": "gpt-4.1",
"role": "worker",
"max_loops": 1,
"max_tokens": 256,
"tempera
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11