AutoGPT is configured entirely through environment variables, no config files required. The table below lists every variable with its purpose, whether it is required, and which feature flag it belongs to.
| Variable | Required | Default | Description |
|---|---|---|---|
AI_PROVIDER |
No | gemini |
Active LLM provider: gemini, openai, anthropic, xai, cohere, huggingface |
AUTOGPT_WORKSPACE |
No | . (cwd) |
Workspace root where agents write generated files |
ORCHESTRATOR_ADDRESS |
CLI only | 0.0.0.0:8443 |
TCP address the orchestrator listens on |
Configure the key for your chosen provider. Only the key matching your AI_PROVIDER value is required.
# Gemini (default), requires feature: gem
export AI_PROVIDER=gemini
export GEMINI_API_KEY=<your_gemini_api_key>
# Override the Gemini model (otherwise uses first in provider list)
export GEMINI_MODEL=gemini-2.5-pro-preview-05-06
# OpenAI, requires feature: oai
export AI_PROVIDER=openai
export OPENAI_API_KEY=<your_openai_api_key>
export OPENAI_MODEL=gpt-4o # optional override
# Anthropic Claude, requires feature: cld
export AI_PROVIDER=anthropic
export ANTHROPIC_API_KEY=<your_anthropic_api_key>
export ANTHROPIC_MODEL=claude-opus-4-6 # optional override
# XAI Grok, requires feature: xai
export AI_PROVIDER=xai
export XAI_API_KEY=<your_xai_api_key>
export XAI_MODEL=grok-4 # optional override
# Cohere, requires feature: co
export AI_PROVIDER=cohere
export COHERE_API_KEY=<your_cohere_api_key>
export COHERE_MODEL=command-r-plus # optional override
# HuggingFace, requires feature: hf
export AI_PROVIDER=huggingface
export HF_API_KEY=<your_hf_api_key>
export HF_MODEL=meta-llama/Llama-3.3-70B-Instruct # optional overrideObtain a Gemini API key from Google AI Studio. Keys for other providers are available on their respective developer portals.
GenericGPT defaults to the current directory where the CLI is launched as its workspace. Set AUTOGPT_WORKSPACE to override:
export AUTOGPT_WORKSPACE=/my/project
autogpt # file operations are scoped to /my/projectFor the classic multi-agent workflow (BackendGPT, FrontendGPT, etc.), all agents write to subdirectories:
workspace/
├── architect/ # ArchitectGPT: diagram.py and generated PNGs
├── backend/ # BackendGPT: main.py, template.py, etc.
├── frontend/ # FrontendGPT: HTML/CSS/JS files
└── designer/ # DesignerGPT: image assets
GenericGPT maintains persistent state in a hidden directory inside the active workspace:
.autogpt/
├── sessions/ # Markdown conversation snapshots, auto-saved after every response
│ ├── <uuid>.md
│ └── ...
└── skills/ # Learned lessons, injected on future sessions (TOML)
├── rust.toml
├── web.toml
└── python.toml
Lesson files are plain TOML and can be viewed or manually edited. See the GenericGPT agent documentation for details.
When running in Orchestrated Mode, the orchestrator (orchgpt) needs a bind address and the agent (autogpt --net) needs to know where to connect:
# On the orchestrator host
export ORCHESTRATOR_ADDRESS=0.0.0.0:8443
# On the agent host (must point to the orchestrator)
export ORCHESTRATOR_ADDRESS=192.168.1.10:8443Enables AI-generated image creation via GetImg:
export GETIMG_API_KEY=<your_getimg_api_key>Enables email reading and sending via Nylas:
export NYLAS_SYSTEM_TOKEN=<your_nylas_system_token>
export NYLAS_CLIENT_ID=<your_nylas_client_id>
export NYLAS_CLIENT_SECRET=<your_nylas_client_secret>Persists agent memory in Pinecone vector database:
export PINECONE_API_KEY=<your_pinecone_api_key>
export PINECONE_INDEX_URL=<your_pinecone_index_url>The index URL looks like: https://my-index-abcdef.svc.us-east-1-aws.pinecone.io
.env file and load them with source .env or a tool like direnv. Never commit API keys to version control.