ALFRED_ENV=dev ALFRED_ACCESS_MODE=trusted # limited | approval | trusted PORT=9001 # ── Paths ────────────────────────────────────────────────────────────────────── # Leave ALFRED_HOME blank to preserve the current source-checkout layout. # Setting it opts into private user state; the default product location will be ~/.alfred. ALFRED_HOME= # Optional project directory granted to file/shell tools; defaults to the launch directory. ALFRED_PROJECT_ROOT= ALFRED_ENABLE_EXTENSIONS=false # user-space code; enable only with reviewed extensions # ── API auth ─────────────────────────────────────────────────────────────────── # Protects the web UI and all /v1/* API routes. # If unset, Alfred auto-generates one on first startup and writes it here. ALFRED_API_KEY= # ── LLM providers — set at least one ────────────────────────────────────────── # Provider: openai | anthropic | gemini | ollama | lmstudio | openrouter | codex ALFRED_LLM_PROVIDER=gemini # Hosted API-key providers (set the key for whichever API-key provider you choose) ANTHROPIC_API_KEY= GEMINI_API_KEY= OPENAI_API_KEY= OPENROUTER_API_KEY= OPENROUTER_BASE_URL=https://openrouter.ai/api # code appends /v1/chat/completions — do NOT set the /api/v1 form OPENROUTER_REASONING_ENABLED=auto # auto | true | false OPENROUTER_REASONING_EFFORT= # none|minimal|low|medium|high|xhigh|max (model-dependent) OPENROUTER_REASONING_MAX_TOKENS= # alternative to EFFORT; do not set both OPENROUTER_REASONING_EXCLUDE=false # hide returned reasoning while retaining internal reasoning # Codex subscription provider — authentication is owned by the installed Codex # App Server. Use `pnpm alfred auth login openai` (or `--device-code`). # To isolate Alfred from your normal Codex CLI login, set CODEX_HOME to a # dedicated absolute directory and set cli_auth_credentials_store="file" in # that directory's config.toml. See docs/operations/chatgpt_subscription.md. # CODEX_HOME=/absolute/path/to/alfred-codex-home # Local providers (OpenAI-compatible — no API key needed) OLLAMA_BASE_URL=http://localhost:11434 LMSTUDIO_BASE_URL=http://localhost:1234 # LM Studio's local server # Model selection (Codex validates the global default against its live App Server catalog; # /model and /reasoning provide session-scoped chat overrides; restart after .env changes.) # For lmstudio/ollama, use the model id the local server reports (e.g. gemma-4-31b-it-qat). ALFRED_MODEL_SMART=gemini-2.0-flash # main agent loop ALFRED_MODEL_FAST=gemini-2.0-flash-lite # fast/cheap calls # ── Telegram ─────────────────────────────────────────────────────────────────── TELEGRAM_BOT_TOKEN= TELEGRAM_ALLOWED_USER_IDS= # comma-separated numeric user IDs TELEGRAM_ALERT_CHAT_ID= # chat ID for proactive agent-event pushes (approval gates etc.); leave blank to disable # ── Agent event webhook (POST /api/events/agent) ────────────────────────────── # Shared secret for external agents/terminal wrappers posting lifecycle events. # When unset, the endpoint accepts loopback callers only (127.0.0.1 / ::1). ALFRED_AGENT_EVENT_TOKEN= # ── Search ───────────────────────────────────────────────────────────────────── SEARXNG_BASE_URL=http://127.0.0.1:8888 SEARXNG_SEARCH_PATH=/search SEARXNG_HEALTH_PATH=/ SEARXNG_START_CMD= # leave blank if using Docker SEARXNG_START_TIMEOUT_MS=15000 SEARXNG_RETRY_INTERVAL_MS=1000 SEARXNG_HEALTH_RETRIES=4 SEARXNG_HEALTH_RETRY_DELAY_MS=500 SEARXNG_HEALTH_GRACE_MS=60000 BRIGHTDATA_SEARCH_API_KEY= BRIGHTDATA_SEARCH_BASE_URL=https://api.brightdata.com BRIGHTDATA_SEARCH_PATH=/request BRIGHTDATA_SEARCH_ZONE= BRIGHTDATA_SEARCH_ENGINE=duckduckgo BRIGHTDATA_SEARCH_COUNTRY=us BRIGHTDATA_SEARCH_TIMEOUT_MS=12000 BRAVE_SEARCH_API_KEY= # ── Pinchtab (real-browser scraping, optional) ───────────────────────────────── ALFRED_ENABLE_PINCHTAB=false PINCHTAB_BASE_URL=http://127.0.0.1:9867 PINCHTAB_START_CMD= # e.g. pinchtab # ── Agent runtime ────────────────────────────────────────────────────────────── ALFRED_WORKSPACE_DIR=./workspace/alfred ALFRED_SEARCH_MAX_RESULTS=15 ALFRED_FAST_SCRAPE_COUNT=10 ALFRED_ENABLE_PLAYWRIGHT=true ALFRED_CONCURRENCY=2 ALFRED_AGENT_MAX_DURATION_MS=600000 ALFRED_AGENT_MAX_TOOL_CALLS=18 ALFRED_AGENT_MAX_PARALLEL_TOOLS=3 # ── Autonomous scheduler (disabled by default) ─────────────────────────────── ALFRED_SCHEDULER_ENABLED=false ALFRED_SCHEDULER_TICK_MAX_MS=15000 ALFRED_SCHEDULER_MAX_CONCURRENCY=1 ALFRED_SCHEDULER_GLOBAL_WAKE_INTERVAL_MS=30000