backend/.env.
Setup
-
Copy the example file:
-
Edit
backend/.envwith your values - Restart the backend for changes to take effect
backend/.env is in .gitignore and never committed. Only .env.example is tracked in git.AI Providers
Configure one or more AI providers. Asta falls back through the provider chain (Claude → Ollama → OpenRouter) if a provider fails.Groq API key for fast inference. Get one at console.groq.com
Google Gemini API key (also accepts
GOOGLE_AI_KEY). Get one at aistudio.google.comAnthropic Claude API key. Required for Claude provider. Get one at console.anthropic.com
OpenAI API key. Get one at platform.openai.com
OpenRouter API key (access to 300+ models). Get one at openrouter.ai/keys
Hugging Face API token for image generation fallback (FLUX.1-dev). Get one at huggingface.co/settings/tokens
Ollama server URL for local models
Channels
Telegram bot token from @BotFather
Comma-separated numeric Telegram user IDs allowed to use the bot. Empty = allow all.Example:
6168747695,1234567890Workspace
Path to OpenClaw-style workspace directory (contains
AGENTS.md, USER.md, TOOLS.md, SOUL.md, and skills/).If empty, Asta uses workspace/ at project root and creates it automatically.Security
Comma-separated allowed directories for file access. No trailing slashes.Example:
/Users/you/Documents,/Users/you/notesComma-separated binary names Asta can run (e.g.
memo,things). Empty = exec disabled.Skills that need a binary show install steps on the Skills page and auto-add the bin when enabled.Exec security mode:
allowlist(default): only allowlisted bins can runfull: allow any command (dangerous; use only if you trust the agent)deny: disable exec completely
API bearer token for remote access (e.g. via Cloudflare Tunnel). Empty = no auth required.
Comma-separated extra CORS origins for LAN or Tailscale access.Example:
http://192.168.1.113:5174,http://100.x.x.x:5173Subagents
Automatically spawn background subagent runs for explicit/complex long-task prompts
Max concurrent running child sessions
Max nesting depth (1 = no nested subagents)
Max concurrent children per parent run
Auto-archive keep-mode child sessions after N minutes (0 disables)
Vision
true(default): analyze image with a vision model first, then pass analysis to the main agent modelfalse: skip preprocessor and send image directly only when the selected provider supports vision
Comma-separated vision provider order (first configured key wins)
OpenRouter vision model used by preprocessor (default is free Nemotron VL)
Voice Calls (Pingram)
Your phone number for voice reminders (E.164 format:
+15551234567)Pingram client ID from app.notificationapi.com
Pingram client secret
Optional API key from Pingram dashboard (used as Bearer for sender)
Notification template ID in Pingram
Template ID for voice calls
Memory & Search
Memory search mode:
search(default): fast lexical-first, with RAG fallback only when no local hithybrid: lexical + RAG on every query
Debug & Developer
Enable debug logging
SQLite database path
ChromaDB path for RAG memory
Show tool usage at the bottom of assistant replies (debugging)
Channels for the trace (comma-separated), e.g.
web,telegramExample Configuration
Changes to environment variables require a backend restart to take effect.
Configuration File Location
The configuration logic is defined inbackend/app/config.py. This file:
- Loads variables from
backend/.env - Provides type-safe settings via the
SettingsPydantic model - Handles defaults and validation
- Exposes settings via
get_settings()