Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

6.0 KB
Raw Blame
# ═══════════════════════════════════════════
# Mercury — Agent Configuration
# Copy this to .env and fill in your values
# ═══════════════════════════════════════════

# Agent Identity
MERCURY_NAME=Mercury
MERCURY_OWNER=

# ── LLM Providers ──

# OpenAI (also covers OpenAI-compatible: DeepSeek, Together, etc.)
OPENAI_API_KEY=
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4o-mini

# Anthropic
ANTHROPIC_API_KEY=
ANTHROPIC_MODEL=claude-sonnet-4-20250514

# DeepSeek (uses dedicated DeepSeek SDK)
DEEPSEEK_API_KEY=
DEEPSEEK_BASE_URL=https://api.deepseek.com/v1
DEEPSEEK_MODEL=deepseek-v4-flash

# Grok / xAI (OpenAI-compatible API)
GROK_API_KEY=
GROK_BASE_URL=https://api.x.ai/v1
GROK_MODEL=grok-4

# Atlas Cloud (OpenAI-compatible API)
ATLASCLOUD_API_KEY=
ATLASCLOUD_BASE_URL=https://api.atlascloud.ai/v1
ATLASCLOUD_MODEL=qwen/qwen3.5-flash

# Runcrate (OpenAI-compatible API)
RUNCRATE_API_KEY=
RUNCRATE_BASE_URL=https://api.runcrate.ai/v1
RUNCRATE_MODEL=deepseek-ai/DeepSeek-V4.1-Flash

# CloudGPU (OpenAI-compatible model API gateway)
CLOUDGPU_API_KEY=
CLOUDGPU_BASE_URL=https://cloudgpu.app/v1
CLOUDGPU_MODEL=deepseek-v4.1-flash

# AI/ML API (OpenAI-compatible API)
AIMLAPI_API_KEY=
AIMLAPI_BASE_URL=https://api.aimlapi.com/v1
AIMLAPI_MODEL=anthropic/claude-sonnet-4.6

# Ollama Cloud (API key required for ollama.com/v1)
OLLAMA_CLOUD_API_KEY=
OLLAMA_CLOUD_BASE_URL=https://ollama.com/v1
OLLAMA_CLOUD_MODEL=gpt-oss:120b

# Ollama Local (no API key required)
OLLAMA_LOCAL_BASE_URL=http://127.0.0.1:11434/api
OLLAMA_LOCAL_MODEL=gpt-oss:20b
OLLAMA_LOCAL_ENABLED=false

# OpenAI Compilations (self-hosted or third-party OpenAI-compatible API)
OPENAI_COMPAT_API_KEY=
OPENAI_COMPAT_BASE_URL=
OPENAI_COMPAT_MODEL=
OPENAI_COMPAT_ENABLED=false

# MiMo / Xiaomi (OpenAI-compatible API)
MIMO_API_KEY=
MIMO_BASE_URL=https://api.xiaomimimo.com/v1
MIMO_MODEL=mimo-v2.5-pro

# MiMo Token Plan / Xiaomi (subscription-based)
MIMO_TOKEN_PLAN_API_KEY=
MIMO_TOKEN_PLAN_BASE_URL=https://token-plan-cn.xiaomimimo.com/v1
MIMO_TOKEN_PLAN_MODEL=mimo-v2.5-pro

# LM Studio (local desktop app, no API key required)
LM_STUDIO_BASE_URL=http://127.0.0.1:1234/v1
LM_STUDIO_MODEL=
LM_STUDIO_ENABLED=false
MIMO_TOKEN_PLAN_ENABLED=false

# Default provider: deepseek | openai | anthropic | grok | atlascloud | runcrate | cloudgpu | aimlapi | mercuryCloud | ollamaCloud | ollamaLocal | openaiCompat | litellm | lmStudio | mimo | mimoTokenPlan
DEFAULT_PROVIDER=deepseek

# ── Telegram ──
# Get a bot token from @BotFather on Telegram
TELEGRAM_BOT_TOKEN=

# ── Discord ──
# Get a bot token from https://discord.com/developers/applications
# 1. Go to Discord Developer Portal → Applications → New Application
# 2. Navigate to Bot → Copy Token
# 3. Enable Privileged Gateway Intents: Message Content, Server Members
# 4. Generate OAuth2 URL with scopes: bot, applications.commands
#    Bot permissions: Send Messages, Read Message History, Use Slash Commands, Attach Files, Embed Links
# 5. Invite the bot to your server using the generated URL
# 6. Optionally create a "Mercury Admin" role in your server for admin control
DISCORD_ENABLED=false
DISCORD_BOT_TOKEN=
# Restrict to a specific guild (server). Leave empty to work across all servers.
DISCORD_GUILD_ID=
# Restrict to a specific channel. Leave empty to respond in all channels.
DISCORD_CHANNEL_ID=
# Discord role name that grants admin access (default: "Mercury Admin")
DISCORD_ADMIN_ROLE_NAME=Mercury Admin
# Enable streaming responses (edit-in-place)
DISCORD_STREAMING=true

# ── Slack ──
# Create a Slack app at https://api.slack.com/apps
# 1. Click "Create New App" → "From scratch"
# 2. Under "Socket Mode", enable it and generate an App-Level Token
#    with connections:write scope → copy the xapp- token
# 3. Under "OAuth & Permissions", add Bot Token Scopes:
#    chat:write, chat:write.public, chat:write.customize,
#    channels:history, groups:history, im:history, im:write,
#    files:write, commands, app_mentions:read
# 4. Install app to workspace → copy Bot User OAuth Token (xoxb-)
# 5. Under "Event Subscriptions", enable and subscribe to:
#    message.channels, message.groups, message.im, app_mention
# 6. Under "Interactivity & Shortcuts", enable interactivity
# 7. Under "Slash Commands", create /mercury command
# 8. Under "App Home", check "Allow users to send Slash commands
#    and messages from the messages tab"
# 9. Invite the bot to your channel: /invite @Mercury
# 10. DM the bot /mercury start to become the first admin
SLACK_ENABLED=false
SLACK_BOT_TOKEN=
SLACK_APP_TOKEN=
# Restrict to a specific channel. Leave empty to respond in all channels.
SLACK_CHANNEL_ID=
# Workspace/Team ID (optional)
SLACK_TEAM_ID=
# Enable streaming responses (edit-in-place)
SLACK_STREAMING=true

# ── Memory ──
MEMORY_DIR=./memory

# ── Heartbeat ──
HEARTBEAT_INTERVAL_MINUTES=60

# ── Token Budget ──
DAILY_TOKEN_BUDGET=50000

# ── GitHub (optional) ──
# Fine-grained personal access token with repo scope
# Create at: https://github.com/settings/tokens?type=beta
GITHUB_TOKEN=
GITHUB_USERNAME=
[email protected]
# Default repo for GitHub tools (optional — you can also specify per-call)
GITHUB_DEFAULT_OWNER=
GITHUB_DEFAULT_REPO=

# ── Spotify (optional) ──
# Register your app at https://developer.spotify.com/dashboard
# Set redirect URI to http://127.0.0.1:8888/callback in your Spotify app settings
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=
SPOTIFY_REDIRECT_URI=http://127.0.0.1:8888/callback

# Opt in to on-demand plugin/MCP schemas in the main agent (default: false).
MERCURY_TOOL_DISCOVERY=false

# Chats answered at the same time (0 = automatic: up to 4, 2 on Termux/small machines).
MERCURY_MAX_CONCURRENT_TURNS=0

# Move to the next provider when one sends nothing for this long (ms; 0 = off, default 150000).
MERCURY_FIRST_RESPONSE_TIMEOUT_MS=150000