{"skill":{"slug":"credit-mastery","displayName":"Credit Mastery","summary":"Build and orchestrate multi-agent AI systems using the Swarms API. Use when creating single agents, multi-agent swarms (sequential, concurrent, hierarchical,...","description":"---\nname: swarms-ai\ndescription: Build and orchestrate multi-agent AI systems using the Swarms API. Use when creating single agents, multi-agent swarms (sequential, concurrent, hierarchical, mixture-of-agents, majority voting, graph workflows), launching agent tokens on Solana, integrating ATP payment protocol, publishing to Swarms Marketplace, using sub-agent delegation, streaming responses, or building any multi-agent orchestration pipeline. Covers Python, TypeScript, and cURL.\n---\n\n# Swarms AI — Multi-Agent Orchestration\n\nBuild production-grade multi-agent systems using the Swarms API platform. Supports single agents, reasoning agents, and swarms of 3–10,000+ agents with 20+ architecture patterns.\n\n## Quick Reference\n\n- **Base URL:** `https://api.swarms.world`\n- **Auth:** `x-api-key` header with API key from [swarms.world/platform/api-keys](https://swarms.world/platform/api-keys)\n- **Docs index:** `https://docs.swarms.ai/llms.txt`\n- **Python SDK:** `pip install swarms-client`\n- **Marketplace:** [swarms.world](https://swarms.world)\n\n## Architecture Tiers\n\n| Tier | Name | Agents | Endpoint |\n|------|------|--------|----------|\n| 1 | Individual Agent | 1 | `/v1/agent/completions` |\n| 2 | Reasoning Agent | 1-2 internal | `/v1/reasoning-agent/completions` |\n| 3 | Multi-Agent Swarm | 3–10,000+ | `/v1/swarm/completions` |\n\n## Workflow\n\n### 1. Single Agent\n\n```python\nimport requests\n\npayload = {\n    \"agent_config\": {\n        \"agent_name\": \"MyAgent\",\n        \"description\": \"Purpose of the agent\",\n        \"system_prompt\": \"You are...\",\n        \"model_name\": \"gpt-4o\",  # or claude-sonnet-4-20250514, etc.\n        \"role\": \"worker\",\n        \"max_loops\": 1,\n        \"max_tokens\": 8192,\n        \"temperature\": 0.5,\n        \"auto_generate_prompt\": False,\n        \"tools_list_dictionary\": None\n    },\n    \"task\": \"Your task here\"\n}\n\nresponse = requests.post(\n    \"https://api.swarms.world/v1/agent/completions\",\n    headers={\"x-api-key\": API_KEY, \"Content-Type\": \"application/json\"},\n    json=payload\n)\n```\n\n### 2. Multi-Agent Swarm\n\n```python\npayload = {\n    \"name\": \"My Swarm\",\n    \"description\": \"What this swarm does\",\n    \"agents\": [\n        {\n            \"agent_name\": \"Agent1\",\n            \"description\": \"Role 1\",\n            \"system_prompt\": \"You are...\",\n            \"model_name\": \"gpt-4o\",\n            \"role\": \"worker\",\n            \"max_loops\": 1,\n            \"max_tokens\": 8192,\n            \"temperature\": 0.5\n        },\n        {\n            \"agent_name\": \"Agent2\",\n            \"description\": \"Role 2\",\n            \"system_prompt\": \"You are...\",\n            \"model_name\": \"claude-sonnet-4-20250514\",\n            \"role\": \"worker\",\n            \"max_loops\": 1,\n            \"max_tokens\": 8192,\n            \"temperature\": 0.5\n        }\n    ],\n    \"max_loops\": 1,\n    \"swarm_type\": \"SequentialWorkflow\",  # See architecture table\n    \"task\": \"Your task here\"\n}\n\nresponse = requests.post(\n    \"https://api.swarms.world/v1/swarm/completions\",\n    headers={\"x-api-key\": API_KEY, \"Content-Type\": \"application/json\"},\n    json=payload\n)\n```\n\n### 3. Token Launch (Solana)\n\n```python\npayload = {\n    \"name\": \"My Agent Token\",\n    \"description\": \"Agent description\",\n    \"ticker\": \"MAG\",\n    \"private_key\": \"[1,2,3,...]\"  # Solana wallet private key\n}\n\nresponse = requests.post(\n    \"https://swarms.world/api/token/launch\",\n    headers={\"Authorization\": \"Bearer API_KEY\", \"Content-Type\": \"application/json\"},\n    json=payload\n)\n# Returns: token_address, pool_address, listing_url\n# Cost: ~0.04 SOL\n```\n\n## Available Swarm Architectures\n\nUse the `swarm_type` parameter:\n\n| Type | Description | Best For |\n|------|-------------|----------|\n| `SequentialWorkflow` | Linear pipeline, each agent builds on previous | Step-by-step processing |\n| `ConcurrentWorkflow` | Parallel execution | Independent tasks, speed |\n| `AgentRearrange` | Dynamic agent reordering | Adaptive workflows |\n| `MixtureOfAgents` | Specialist agent selection | Multi-domain tasks |\n| `MultiAgentRouter` | Intelligent task routing | Large-scale distribution |\n| `HierarchicalSwarm` | Nested hierarchies with delegation | Complex org structures |\n| `MajorityVoting` | Consensus across agents | Decision making |\n| `BatchedGridWorkflow` | Grid pattern execution | Multi-task × multi-agent |\n| `GraphWorkflow` | Directed graph of agent nodes | Complex dependencies |\n| `GroupChat` | Agent discussion | Collaborative brainstorming |\n| `InteractiveGroupChat` | Real-time agent interaction | Dynamic collaboration |\n| `AutoSwarmBuilder` | Auto-generate optimal swarm | When unsure of architecture |\n| `HeavySwarm` | High-capacity processing | Large workloads |\n| `DebateWithJudge` | Structured debate | Adversarial evaluation |\n| `RoundRobin` | Round-robin distribution | Even load distribution |\n| `MALT` | Multi-agent learning | Training systems |\n| `CouncilAsAJudge` | Expert panel evaluation | Quality assessment |\n| `LLMCouncil` | LM council for decisions | Group decision making |\n| `AdvancedResearch` | Research workflows | Deep research |\n| `auto` | Auto-select best type | Default/unknown |\n\n## Agent Config Parameters\n\n| Param | Type | Default | Description |\n|-------|------|---------|-------------|\n| `agent_name` | string | — | Unique agent identifier |\n| `description` | string | — | Agent purpose |\n| `system_prompt` | string | — | Behavior instructions |\n| `model_name` | string | `gpt-4.1` | AI model (gpt-4o, claude-sonnet-4-20250514, etc.) |\n| `role` | string | `worker` | Agent role in swarm |\n| `max_loops` | int/string | `1` | Iterations (`\"auto\"` for autonomous) |\n| `max_tokens` | int | `8192` | Max response length |\n| `temperature` | float | `0.5` | Creativity (0.0–2.0) |\n| `auto_generate_prompt` | bool | `false` | Auto-enhance system prompt |\n| `tools_list_dictionary` | list | — | OpenAPI-style tool definitions |\n| `streaming_on` | bool | `false` | Enable SSE streaming |\n| `mcp_url` | string | — | MCP server URL |\n| `selected_tools` | list | all safe | Restrict available tools |\n\n## Rules\n\n- Always use environment variables for API keys — never hardcode.\n- Set appropriate `max_loops` — use `\"auto\"` only when sub-agent delegation is needed.\n- Match `swarm_type` to use case (see architecture table).\n- For streaming, set `streaming_on: true` and parse SSE events (metadata → chunks → usage → done).\n- Token launches cost ~0.04 SOL from the provided wallet.\n- Batch endpoint (`/v1/swarm/batch/completions`) requires Pro/Ultra/Premium tier.\n- Reasoning agents (`/v1/reasoning-agent/completions`) require Pro+ tier.\n\n## Resource Map\n\n| Topic | Reference |\n|-------|-----------|\n| Full API architecture & tiers | `references/architecture.md` |\n| Sub-agent delegation patterns | `references/sub-agents.md` |\n| ATP payment protocol (Solana) | `references/atp-protocol.md` |\n| Marketplace publishing | `references/marketplace.md` |\n| Streaming implementation | `references/streaming.md` |\n| Tools integration | `references/tools.md` |\n| All docs pages | https://docs.swarms.ai/llms.txt |\n\nRead references only when the task requires that specific depth.\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":851,"installsAllTime":32,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1772159589157,"updatedAt":1779077386216},"latestVersion":{"version":"1.0.0","createdAt":1772159589157,"changelog":"- Initial release of Swarms AI skill for building and orchestrating multi-agent systems via Swarms API.\n- Supports single agents and large-scale swarms (3–10,000+ agents) with 20+ architecture patterns.\n- Includes quick-start and reference for individual agents, multi-agent swarms, and Solana token launches.\n- Details parameters for agent configuration, swarm types, authentication, and integration best practices.\n- Provides a resource map for deeper guides on API architecture, tool integration, streaming, tokenization, and marketplace features.","license":null},"metadata":null,"owner":{"handle":"newsoulontheblock","userId":"s17env69k04my632443vg6jh4d884qvn","displayName":"NewSoulOnTheBlock","image":"https://avatars.githubusercontent.com/u/253271617?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779963435954}}