Skip to content

Environment Variables Reference

Hub Variables

Set these in the Hub's .env file:

Variable Default Description
AW_BOOTSTRAP_API_KEY auto-generated if empty Instance operator credential for Hub authentication. Format: aw_live_{32 hex chars}. A pre-multi-project value is promoted unchanged onto the instance operator plane
AW_BOOTSTRAP_PROJECT_ID (unset) Legacy bootstrap only. When explicitly present, startup creates one unbound project with this ID so a pre-multi-project installation can be bound on first open. A fresh install leaves it unset and starts with zero projects
AW_BOOTSTRAP_PROJECT_NAME Default Project Display name for the legacy bootstrap project
AW_WORKSPACE_ROOT (empty — native mode) Container-visible workspace root. When set (explicit Docker mode), project open/create/relocate accept only directories beneath this root; anything else is refused with a typed project_workspace_not_mounted diagnostic. The Hub never guesses host/container path mappings
AW_WORKSPACE_HOST_ROOT ./workspaces Docker Compose only: host directory mounted at AW_WORKSPACE_ROOT (/workspaces) inside the container. Point it at the host directory that holds your projects
AW_HOST 127.0.0.1 Interface the Hub binds to when started via the agentweave-hub console script (native/host mode). Docker always binds 0.0.0.0 inside the container regardless of this variable
AW_PORT 8000 Port the Hub listens on
AW_CORS_ORIGINS (empty) Comma-separated allowed origins for CORS. Leave empty in production if UI is served from same origin
DATABASE_URL sqlite+aiosqlite:///data/agentweave.db Database URL. SQLite default; PostgreSQL supported

CLI Variables

Set these in your shell for CLI behavior:

Variable Description
AW_LOG_LEVEL Developer tracing log level (DEBUG, INFO, WARNING, ERROR). Default: WARNING
AW_LOG_FILE Optional file path for developer tracing logs

Proxy Agent Variables

Set these in your shell before running proxy agents, or place them in a .env file at the project root:

Variable Provider
MINIMAX_API_KEY MiniMax
ZHIPU_API_KEY Zhipu GLM
YOUR_CUSTOM_VAR Any custom claude_proxy provider

AgentWeave automatically loads a .env file from the current working directory. Shell-exported variables always take precedence over .env values.

Security Notes

  • Never commit AW_BOOTSTRAP_API_KEY to version control
  • API keys for proxy agents are resolved at runtime from environment variables or a .env file in the project root
  • Only the environment variable name is stored in AgentWeave config files
  • The Docker deployment never mounts the Docker socket; project isolation comes from the single configured workspace-root mount