Astreus

Configuration

Environment variables and configuration options for your Astreus agent project. Learn the setup patterns, APIs, and practical examples needed to build...

Environment variables and configuration options for your Astreus agent project.

Environment Setup

After creating your project, copy the example environment file:

cp .env.example .env

Then edit .env with your configuration.

Provider-Specific Configuration

The generated .env.example depends on your selected provider:

OpenAI

OPENAI_API_KEY=your-api-key-here

Anthropic

ANTHROPIC_API_KEY=your-api-key-here

Google Gemini

GEMINI_API_KEY=your-api-key-here

Ollama

# Ollama runs locally, no API key needed
OLLAMA_HOST=http://localhost:11434

Multiple Providers

# Add API keys for providers you want to use
OPENAI_API_KEY=your-openai-key
ANTHROPIC_API_KEY=your-anthropic-key
GEMINI_API_KEY=your-gemini-key

Complete Configuration

For production deployments, you may need additional configuration:

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

Database Configuration

SQLite (Development)

Default and zero-config for development:

DB_URL=sqlite://./astreus.db

PostgreSQL (Production)

Recommended for production deployments:

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

Knowledge Database

Required for RAG features. Must be PostgreSQL with pgvector:

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

Setting up pgvector

Using Docker:

# docker-compose.yml
services:
  postgres:
    image: pgvector/pgvector:pg16
    environment:
      POSTGRES_USER: astreus
      POSTGRES_PASSWORD: password
      POSTGRES_DB: knowledge_db
    ports:
      - "5432:5432"
docker-compose up -d

Security

Encryption Keys

Generate a secure encryption key:

openssl rand -hex 32

Add to your environment:

ENCRYPTION_ENABLED=true
ENCRYPTION_MASTER_KEY=your-generated-key
ENCRYPTION_ALGORITHM=aes-256-gcm

Production Checklist

  • Use PostgreSQL instead of SQLite
  • Enable encryption
  • Set NODE_ENV=production
  • Use LOG_LEVEL=warn or error
  • Store secrets in environment, not files
  • Use a secrets manager (Vault, AWS Secrets, etc.)

Default Models by Provider

ProviderDefault Model
OpenAIgpt-4o
Anthropicclaude-sonnet-4-20250514
Googlegemini-2.0-flash
Ollamallama3

Last updated: May 26, 2026