Configuration

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#

bash
# ===== 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-gcm

Required Variables#

At minimum, you need one LLM provider API key:

bash
# Choose one:
export OPENAI_API_KEY=sk-...
# or
export ANTHROPIC_API_KEY=...
# or
export GEMINI_API_KEY=...
# or just run Ollama locally

Default Provider & Model#

Set your preferred defaults:

bash
# Always start with Claude
export ASTREUS_PROVIDER=claude
export ASTREUS_MODEL=claude-sonnet-5

# Or start with local Ollama
export ASTREUS_PROVIDER=ollama
export ASTREUS_MODEL=llama3

Database Configuration#

SQLite (Default)#

For local development, SQLite works out of the box:

bash
DB_URL=sqlite://./astreus.db

PostgreSQL (Production)#

For production or shared environments:

bash
DB_URL=postgresql://user:password@localhost:5432/astreus_db

Knowledge Database#

If using RAG/Knowledge features, you need PostgreSQL with pgvector:

bash
KNOWLEDGE_DB_URL=postgresql://user:password@localhost:5432/knowledge_db

Security Settings#

Encryption#

Enable encryption for sensitive data:

bash
ENCRYPTION_ENABLED=true
ENCRYPTION_MASTER_KEY=your-256-bit-key-here
ENCRYPTION_ALGORITHM=aes-256-gcm

Generate a secure key:

bash
openssl rand -hex 32

Logging#

Control log verbosity:

bash
# Options: debug | info | warn | error | silent
LOG_LEVEL=info

Shell Profile Setup#

Add to your ~/.bashrc, ~/.zshrc, or ~/.profile:

bash
# Astreus CLI Configuration
export OPENAI_API_KEY="sk-your-key"
export ASTREUS_PROVIDER="openai"
export ASTREUS_MODEL="gpt-4o"

Then reload:

bash
source ~/.zshrc  # or ~/.bashrc

Verify Configuration#

Check your configuration:

bash
# Start CLI and check settings
astreus
/settings

This 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:

bash
# 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:

bash
astreus
/attach ./my-agent-project

The 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:

bash
astreus
/sessions  # See and restore previous sessions

4. Test Different Models#

Once your agent code is generated, test how it behaves with different underlying models:

bash
/provider claude   # Test with Claude
/provider openai   # Test with GPT-4o
/provider ollama   # Test locally