# ───────────────────────────────────────────── # OpenSwarm — environment configuration # Copy this file to .env and fill in your keys. # Run `uv run python run.py` to launch the onboarding # wizard, which fills this file automatically. # ───────────────────────────────────────────── # ── Model routing ───────────────────────────── # OpenSwarm can use multiple model/auth backends at the same time. # Subscription-backed options use your local CLI login: # subscription/codex -> `codex login` # subscription/claude -> `claude auth login` # # API-backed options use API keys below: # gpt-5.2 # litellm/anthropic/claude-sonnet-4-6 # litellm/gemini/gemini-3-flash DEFAULT_MODEL=subscription/codex # Optional per-agent overrides. Leave blank to use DEFAULT_MODEL. ORCHESTRATOR_MODEL= GENERAL_AGENT_MODEL= DEEP_RESEARCH_MODEL= DATA_ANALYST_MODEL= DOCS_AGENT_MODEL= SLIDES_AGENT_MODEL= IMAGE_AGENT_MODEL= VIDEO_AGENT_MODEL= # Optional model-call timeout in seconds. Blank/0/none disables OpenSwarm hard # model timeouts; use the TUI cancel flow to stop long-running requests. OPENSWARM_MODEL_TIMEOUT_SECONDS= # Optional request-local failover for clear quota/rate/usage limit errors. This # does not rewrite DEFAULT_MODEL or per-agent model env vars; it only retries the # current model call with an available fallback. OPENSWARM_MODEL_FAILOVER=auto OPENSWARM_MODEL_FAILOVER_ORDER=subscription/codex,subscription/claude,gpt-5.2,litellm/anthropic/claude-sonnet-4-6,litellm/gemini/gemini-3-flash OPENSWARM_MODEL_FAILOVER_MAX_ATTEMPTS=2 # Optional Security Research Swarm per-agent overrides. Leave blank to use DEFAULT_MODEL. SECURITY_RESEARCH_ORCHESTRATOR_MODEL= SECURITY_RESEARCH_LEAD_MODEL= THREAT_INTELLIGENCE_ANALYST_MODEL= VULNERABILITY_RESEARCHER_MODEL= OSINT_ENRICHMENT_SPECIALIST_MODEL= SECURITY_LAB_ANALYST_MODEL= TECHNICAL_BLOG_WRITER_MODEL= SECURITY_RESEARCH_SLIDES_AGENT_MODEL= SECURITY_VISUAL_DESIGNER_MODEL= # Optional OpenSwarm skills directory. Defaults to ./openswarm_skills. OPENSWARM_SKILLS_DIR= # ── Web research routing ───────────────────── # WebResearchSearch can use Codex and Claude Code subscription web search, # then fall back to platform/API search when configured. WEB_SEARCH_MODE=auto WEB_SEARCH_PROVIDER_ORDER=codex,claude WEB_SEARCH_DEEP_MIX=true WEB_SEARCH_PLATFORM_FALLBACK=true WEB_SEARCH_TIMEOUT_SECONDS=60 WEB_SEARCH_OPENAI_MODEL=gpt-5.2 # ── Optional model/API provider keys ────────── # OpenAI API — direct OpenAI model/API access, hosted web search fallback, # OpenAI Images, and Sora. OPENAI_API_KEY= # Anthropic API — direct Claude API access through LiteLLM. ANTHROPIC_API_KEY= # Google Gemini API — Gemini models/images and Veo video. GOOGLE_API_KEY= # ── Optional: Composio ─────────────────────── # Composio unlocks 10,000+ external integrations (Gmail, Slack, Google Calendar, # HubSpot, GitHub, and more) for the General Agent. # Get your key and user ID at https://composio.dev COMPOSIO_API_KEY= COMPOSIO_USER_ID= # ── Optional: Search ───────────────────────── # Search API key — enables SearchAPI fallback, Scholar search, and product # search across agents. # Get your key at https://www.searchapi.io SEARCH_API_KEY= # ── Optional: Images / Video ───────────────────────── # Google AI / Gemini — used for image generation, editing, and composition # (Gemini 2.5 Flash Image, Gemini 3 Pro Image) across Image Agent, Slides Agent, # and Video Agent; also required for Veo video generation (Video Agent). # Configure GOOGLE_API_KEY once in the Provider section above. # Get your key at https://aistudio.google.com/app/apikey # Pexels — stock photo search used by Slides Agent (ImageSearch tool). # Get your key at https://www.pexels.com/api PEXELS_API_KEY= # Pixabay — stock photo search used by Slides Agent (ImageSearch tool). # Get your key at https://pixabay.com/api/docs PIXABAY_API_KEY= # Unsplash — stock photo search used by Slides Agent (ImageSearch tool). # Get your key at https://unsplash.com/developers UNSPLASH_ACCESS_KEY= # fal.ai — used for Seedance 1.5 Pro video generation, video editing (Video Agent), # and background removal (Image Agent). # Get your key at https://fal.ai/dashboard/keys FAL_KEY=