Swarms CLI Overview
The Swarms CLI is a powerful command-line interface that provides comprehensive tools for creating, managing, and executing AI agents and swarms. It offers an intuitive way to interact with the Swarms framework directly from your terminal.Installation
The Swarms CLI is included with the main Swarms package:Quick Start
Get started with these common commands:Environment Setup
Check your environment configuration:Interactive Chat Agent
Start a chat session with an AI agent:Create a Custom Agent
Create and run a custom agent (interactive mode by default):Available Commands
The Swarms CLI provides the following command categories:Setup & Configuration
onboarding- Run environment setup checksetup-check- Comprehensive environment diagnosticsget-api-key- Retrieve API keys from the platformcheck-login- Verify authentication status
Agent Operations
agent- Create and run custom agentschat- Interactive chat agent with optimized defaultsrun-agents- Execute agents from YAML configurationload-markdown- Load agents from markdown files
Swarm Operations
autoswarm- Generate and execute autonomous swarmsheavy-swarm- Run HeavySwarm for complex task analysisllm-council- Run LLM Council with collaborative agents
Utilities
help- Display comprehensive command referencefeatures- Show all available featuresupgrade- Update Swarms to the latest version
Getting Help
For detailed information about any command:Environment Variables
The CLI uses several environment variables for configuration:OPENAI_API_KEY- OpenAI API keyANTHROPIC_API_KEY- Anthropic API keyGOOGLE_API_KEY- Google API keyCOHERE_API_KEY- Cohere API keyWORKSPACE_DIR- Directory for agent workspaces and outputs
.env file or export them directly:
Next Steps
Commands Reference
Explore all available CLI commands in detail
Configuration
Learn how to configure agents using YAML and environment variables