OpenSpace/openspace/.env.example
2026-07-17 11:43:42 +08:00

93 lines
4.1 KiB
Text

# ============================================
# OpenSpace Environment Variables
# Copy this file to .env and fill in your keys
# ============================================
# ── LLM Credentials ──────────────────────────────────────
#
# OpenSpace resolves LLM credentials in this order (first match wins):
#
# 1. OPENSPACE_LLM_* — explicit override, always highest priority
# 2. Provider-native vars — OPENROUTER_API_KEY, OPENAI_API_KEY, etc.
# 3. ~/.nanobot/config.json or ~/.openclaw/openclaw.json — fallback (only when no explicit or provider key found)
#
# For most users, setting ONE of the provider-native keys below is enough.
# LiteLLM reads them automatically. See https://docs.litellm.ai/docs/providers
#
# Full configuration guide: openspace/config/README.md
# --- Option A: Provider-native key (simplest) ---
# Set the key that matches your model's provider:
# OpenRouter (for openrouter/* models, e.g. openrouter/anthropic/claude-sonnet-4.5)
OPENROUTER_API_KEY=
# Anthropic (for anthropic/claude-* models)
# ANTHROPIC_API_KEY=
# OpenAI (for openai/gpt-* models)
# OPENAI_API_KEY=
# DeepSeek (for deepseek/* models)
# DEEPSEEK_API_KEY=
# OPENSPACE_MODEL=deepseek/deepseek-v4-pro
# OPENSPACE_LLM_API_BASE=https://api.deepseek.com
# Optional DeepSeek V4 controls. Leave unset/auto to use provider defaults.
# OPENSPACE_DEEPSEEK_THINKING=auto
# OPENSPACE_DEEPSEEK_REASONING_EFFORT=high
# OPENSPACE_DEEPSEEK_DISABLE_THINKING_ON_REQUIRED_TOOL_CHOICE=false
# --- Option B: Explicit OpenSpace override (takes priority over Option A) ---
# Use these when you need full control, e.g. custom API base or non-standard provider.
# OPENSPACE_MODEL=openrouter/anthropic/claude-sonnet-4.5
# OPENSPACE_LLM_API_KEY=sk-xxx
# OPENSPACE_LLM_API_BASE=https://openrouter.ai/api/v1
# --- Option C: Local Ollama ---
# For ollama/* models, set OPENSPACE_MODEL and the local Ollama endpoint.
#
# OPENSPACE_MODEL=ollama/qwen3-coder:30b
# OLLAMA_API_BASE=http://127.0.0.1:11434
# OLLAMA_API_KEY=ollama
# ── OpenSpace Cloud (optional) ──────────────────────────────
# Provision an owner-scoped agent key with:
# openspace-cloud-auth bootstrap-agent-key --email you@example.com --agent-name openspace-local-agent
# Enables cloud skill search & upload; local features work without it.
# OPENSPACE_CLOUD_MODE=off
# OPENSPACE_CLOUD_BASE_URL=https://open-space.cloud
# OPENSPACE_CLOUD_API_KEY=
# OPENSPACE_CLOUD_TELEMETRY_MODE=off
# ── Evolution Evidence (optional) ───────────────────────────
# Evidence collection is enabled by default. Trigger jobs are durable planning
# records only; they do not directly mutate skills.
# OPENSPACE_EVOLUTION_EVIDENCE_ENABLED=true
# OPENSPACE_EVOLUTION_TRIGGERS_ENABLED=true
# ── GUI Backend (optional) ──────────────────────────────────
# Required only if using the GUI backend (Anthropic Computer Use).
# Uses the same ANTHROPIC_API_KEY above.
# Optional backup key for rate limit fallback:
# ANTHROPIC_API_KEY_BACKUP=
# ── Embedding (optional) ────────────────────────────────────
# For remote embedding API instead of local model.
# If not set, OpenSpace uses a local embedding model (BAAI/bge-small-en-v1.5).
# EMBEDDING_BASE_URL=
# EMBEDDING_API_KEY=
# EMBEDDING_MODEL=text-embedding-3-small
# ── E2B Sandbox (optional) ──────────────────────────────────
# Required only if sandbox mode is enabled in security config.
# E2B_API_KEY=
# ── Local Server (optional) ─────────────────────────────────
# Override the default local server URL (default: http://127.0.0.1:5000)
# Useful for remote VM integration (e.g., OSWorld).
# LOCAL_SERVER_URL=http://127.0.0.1:5000
# ---- Debug (Optional) ----
# OPENSPACE_DEBUG=true