Astreus

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-gcm

Required 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 locally

Default 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=llama3

Database Configuration

SQLite (Default)

For local development, SQLite works out of the box:

DB_URL=sqlite://./astreus.db

PostgreSQL (Production)

For production or shared environments:

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

Knowledge Database

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

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

Security Settings

Encryption

Enable encryption for sensitive data:

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

Generate a secure key:

openssl rand -hex 32

Logging

Control log verbosity:

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

Shell 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 ~/.bashrc

Verify Configuration

Check your configuration:

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

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

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:

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

Last updated: May 26, 2026