# Phantom Configuration # Copy this file to .env and fill in your values: # cp .env.example .env # ======================== # REQUIRED: provider credential # ======================== # Phantom defaults to Anthropic. Set ANTHROPIC_API_KEY for the default setup. # To use a different provider (Z.AI, OpenRouter, Ollama, vLLM, LiteLLM, custom), # configure the `provider:` block in phantom.yaml and set the matching env var # below. See docs/providers.md for the full reference. ANTHROPIC_API_KEY= # Alternative provider keys (set one that matches your provider block in phantom.yaml): # ZAI_API_KEY= # OPENROUTER_API_KEY= # LITELLM_KEY= # ======================== # OPTIONAL: Slack # ======================== # Create a Slack app: see docs/getting-started.md or use the manifest at slack-app-manifest.yaml # Slack bot token (starts with xoxb-) # SLACK_BOT_TOKEN= # Slack app token for Socket Mode (starts with xapp-) # SLACK_APP_TOKEN= # Default Slack channel ID for intro messages (starts with C) # SLACK_CHANNEL_ID= # Owner's Slack user ID (starts with U) - only this user can talk to Phantom # OWNER_SLACK_USER_ID= # ======================== # OPTIONAL: Web Chat Login # ======================== # If Slack is not configured, Phantom can send you a magic link email # to log into the web chat at /chat. Set your email and a Resend API key. # Without Resend, a bootstrap token is printed to container logs instead. # OWNER_EMAIL= # RESEND_API_KEY is also used for the phantom_email tool (see below). # ======================== # OPTIONAL: Identity # ======================== # Agent name (default: phantom) # PHANTOM_NAME=phantom # Agent role (default: swe). Options: swe, base # PHANTOM_ROLE=swe # Model for the agent brain. Keep a Claude model ID here even when using a # non-Anthropic provider: the bundled cli.js has hardcoded capability checks # against Claude model names. Use `provider.model_mappings` in phantom.yaml # to redirect the wire call to your actual model (e.g., glm-5.1). # Options: # claude-sonnet-4-6 - Fast, capable, lower cost (default, recommended) # claude-opus-4-6 - Most capable, higher cost # PHANTOM_MODEL=claude-sonnet-4-6 # Provider override via env var (alternative to editing phantom.yaml). # Options: anthropic (default), zai, openrouter, vllm, ollama, litellm, custom # PHANTOM_PROVIDER_TYPE=anthropic # PHANTOM_PROVIDER_BASE_URL= # Agent runtime implementation. Leave unset for Anthropic. # Options: anthropic (default), murph # PHANTOM_AGENT_RUNTIME=anthropic # Custom Agent SDK compatibility harness. This wins over PHANTOM_AGENT_RUNTIME. # Example: file:///path/to/runtime.mjs # PHANTOM_AGENT_SDK_MODULE= # Domain for public URL (e.g., ghostwright.dev) # When set with PHANTOM_NAME, derives public URL as https://. # PHANTOM_DOMAIN= # Explicit public URL (overrides domain-based derivation) # Use this for custom domains that don't follow the subdomain pattern. # Examples: https://ai.company.com, https://phantom.internal:8443 # PHANTOM_PUBLIC_URL= # ======================== # OPTIONAL: Ports # ======================== # HTTP server port (default: 3100) # PORT=3100 # ======================== # OPTIONAL: Memory # ======================== # Qdrant URL (default: http://qdrant:6333 in Docker, http://localhost:6333 on bare metal) # QDRANT_URL=http://qdrant:6333 # Ollama URL (default: http://ollama:11434 in Docker, http://localhost:11434 on bare metal) # OLLAMA_URL=http://ollama:11434 # Embedding model (default: nomic-embed-text) # EMBEDDING_MODEL=nomic-embed-text # ======================== # OPTIONAL: Docker # ======================== # Docker group ID on the host. The Phantom container needs this to access # the Docker socket for creating sibling containers. # Find yours with: # Linux: stat -c '%g' /var/run/docker.sock # macOS: stat -f '%g' /var/run/docker.sock # Default 988 works for most Hetzner and cloud VMs. # DOCKER_GID=988 # ======================== # OPTIONAL: Email (Resend) # ======================== # Resend API key for sending email. If set, the agent can send email as # {PHANTOM_NAME}@ghostwright.dev (or {PHANTOM_NAME}@{PHANTOM_DOMAIN}). # Get a key at: https://resend.com/api-keys # RESEND_API_KEY= # Maximum emails per day (default: 50) # PHANTOM_EMAIL_DAILY_LIMIT=50 # ======================== # OPTIONAL: Secret Encryption # ======================== # 64-character hex string (32 bytes) for encrypting stored credentials. # If not set, a key is auto-generated and saved to data/secret-encryption-key. # Generate one with: openssl rand -hex 32 # SECRET_ENCRYPTION_KEY=