Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 59 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,74 @@
# OpenAI — set this if using OpenAI as your primary provider.
OPENAI_API_KEY=

# Anthropic Claude — set this if using Anthropic as your primary provider.
# Anthropic Claude — standard pay-per-token API key.
# Get one at https://console.anthropic.com/settings/keys
# Format: sk-ant-api03-...
#
# NOTE: Claude Pro / Max / Claude Code subscription OAuth tokens
# (sk-ant-oat01-...) are NOT accepted here directly — LiteLLM does
# not implement the OAuth header protocol. To use a subscription,
# run a local router (see "Local LLM router" section below) and
# leave this blank.
ANTHROPIC_API_KEY=

# Google Gemini — set this if using Google as your primary provider.
GOOGLE_API_KEY=


# ── Claude subscription via local `claude` CLI (recommended) ──
#
# This is the openswarm-ai pattern. Requires:
# 1. The `claude` CLI installed (npm install -g @anthropic-ai/claude-code).
# 2. You've run `claude login` once — credentials are saved to ~/.claude.
# 3. The `claude-agent-sdk` Python package is in requirements.txt.
#
# When DEFAULT_MODEL is a Claude id and no other backend env is set,
# config.is_oauth_mode() auto-detects the SDK and routes every model
# call through claude_agent_sdk, which spawns the local `claude`
# binary. The CLI brings its own subscription auth — no API keys, no
# OAuth tokens, no router needed.
#
# Force the SDK path explicitly:
CLAUDE_USE_AGENT_SDK=
#
# Re-enable Claude Code's built-in tools (Bash, WebSearch, Edit, etc.)
# alongside agency-swarm tools. Off by default for behavior parity.
CLAUDE_USE_BUILTIN_TOOLS=


# ── Anthropic SDK pointed at a remote API or local proxy (alternative) ──
#
# Set ANTHROPIC_BASE_URL to point the Anthropic SDK at a remote
# Claude-compatible endpoint or a local router (9router, CLIProxyAPI).
# Leave blank for the recommended CLI path above.
ANTHROPIC_BASE_URL=


# ── Local OpenAI-compatible LLM router (alternative path) ──
#
# Route every model call through a local router (e.g. claude-code-router,
# 9router, ccproxy) that authenticates with your Claude Pro/Max/Claude Code
# subscription. The router exposes an OpenAI-compatible endpoint and handles
# the OAuth token + required headers internally.
#
# Example with a router on port 20128:
# OPENAI_BASE_URL=http://localhost:20128/v1
# OPENAI_API_KEY=sk-router-anything # most routers ignore this
# DEFAULT_MODEL=claude-sonnet-4-6 # whatever model id the router routes
#
# When OPENAI_BASE_URL is set, OpenAI-only options like reasoning summaries
# are automatically disabled (the router/Claude won't accept them).
OPENAI_BASE_URL=


# ── Model selection ───────────────────────────

# Override the default model for all agents (set automatically by onboarding).
# OpenAI example: DEFAULT_MODEL=gpt-5.2
# Anthropic example: DEFAULT_MODEL=litellm/claude-sonnet-4-6
# Google example: DEFAULT_MODEL=litellm/gemini/gemini-3-flash
# OpenAI example: DEFAULT_MODEL=gpt-5.2
# Anthropic (API): DEFAULT_MODEL=litellm/anthropic/claude-sonnet-4-6
# Google example: DEFAULT_MODEL=litellm/gemini/gemini-3-flash
# Via local router: DEFAULT_MODEL=claude-sonnet-4-6 (router maps the name)
DEFAULT_MODEL=


Expand Down
Loading