Configuration
Configure Astreus CLI with environment variables for full customization. These settings control both the CLI itself and the underlying Astreus framework...
Configure Astreus CLI with environment variables for full customization. These settings control both the CLI itself and the underlying Astreus framework features you can use during agent development.
Environment Setup
Create a .env file in your home directory or export variables in your shell profile.
Complete Configuration
# ===== CLI SETTINGS =====
# Default provider and model
ASTREUS_PROVIDER=openai # openai, claude, gemini, ollama
ASTREUS_MODEL=gpt-4o # Default model name
# ===== LLM PROVIDERS API KEYS =====
# OpenAI
OPENAI_API_KEY=sk-your-openai-api-key-here
OPENAI_VISION_API_KEY=sk-your-vision-api-key-here # Optional
OPENAI_EMBEDDING_API_KEY=sk-your-embedding-api-key # Optional
# Anthropic Claude
ANTHROPIC_API_KEY=your-anthropic-api-key-here
ANTHROPIC_VISION_API_KEY=your-vision-api-key-here # Optional
# Google Gemini
GEMINI_API_KEY=your-gemini-api-key-here
GEMINI_VISION_API_KEY=your-vision-api-key-here # Optional
GEMINI_EMBEDDING_API_KEY=your-embedding-api-key # Optional
# Ollama (for local models)
OLLAMA_HOST=http://localhost:11434
# ===== DATABASE CONFIGURATION =====
# Main Application Database (Agents, Memory, Tasks, etc.)
DB_URL=sqlite://./astreus.db
# PostgreSQL (production recommended)
# DB_URL=postgresql://username:password@localhost:5432/astreus_db
# ===== KNOWLEDGE/RAG SYSTEM =====
# Knowledge Vector Database (PostgreSQL with pgvector required)
KNOWLEDGE_DB_URL=postgresql://username:password@localhost:5432/knowledge_db
# ===== APPLICATION SETTINGS =====
NODE_ENV=development # development | production | test
LOG_LEVEL=info # debug | info | warn | error | silent
# ===== DATABASE ENCRYPTION =====
ENCRYPTION_ENABLED=true
ENCRYPTION_MASTER_KEY=your-256-bit-encryption-key-here
ENCRYPTION_ALGORITHM=aes-256-gcmRequired Variables
At minimum, you need one LLM provider API key:
# Choose one:
export OPENAI_API_KEY=sk-...
# or
export ANTHROPIC_API_KEY=...
# or
export GEMINI_API_KEY=...
# or just run Ollama locallyDefault Provider & Model
Set your preferred defaults:
# Always start with Claude
export ASTREUS_PROVIDER=claude
export ASTREUS_MODEL=claude-sonnet-4-20250514
# Or start with local Ollama
export ASTREUS_PROVIDER=ollama
export ASTREUS_MODEL=llama3Database Configuration
SQLite (Default)
For local development, SQLite works out of the box:
DB_URL=sqlite://./astreus.dbPostgreSQL (Production)
For production or shared environments:
DB_URL=postgresql://user:password@localhost:5432/astreus_dbKnowledge Database
If using RAG/Knowledge features, you need PostgreSQL with pgvector:
KNOWLEDGE_DB_URL=postgresql://user:password@localhost:5432/knowledge_dbSecurity Settings
Encryption
Enable encryption for sensitive data:
ENCRYPTION_ENABLED=true
ENCRYPTION_MASTER_KEY=your-256-bit-key-here
ENCRYPTION_ALGORITHM=aes-256-gcmGenerate a secure key:
openssl rand -hex 32Logging
Control log verbosity:
# Options: debug | info | warn | error | silent
LOG_LEVEL=infoShell Profile Setup
Add to your ~/.bashrc, ~/.zshrc, or ~/.profile:
# Astreus CLI Configuration
export OPENAI_API_KEY="sk-your-key"
export ASTREUS_PROVIDER="openai"
export ASTREUS_MODEL="gpt-4o"Then reload:
source ~/.zshrc # or ~/.bashrcVerify Configuration
Check your configuration:
# Start CLI and check settings
astreus
/settingsThis opens the settings panel showing your current configuration.
Agent Development Workflow
For the best agent development experience:
1. Set Up Multiple Providers
Configure multiple API keys so you can test your agents across different LLMs:
# All providers configured
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GEMINI_API_KEY="..."2. Use Project Attachments
When working on an agent project, attach the folder for full context:
astreus
/attach ./my-agent-projectThe CLI will understand your project structure, existing code, and configurations.
3. Iterate with Sessions
Your development sessions are automatically saved. Return to continue where you left off:
astreus
/sessions # See and restore previous sessions4. Test Different Models
Once your agent code is generated, test how it behaves with different underlying models:
/provider claude # Test with Claude
/provider openai # Test with GPT-4o
/provider ollama # Test locallyLast updated: May 26, 2026