288 lines
12 KiB
Plaintext
288 lines
12 KiB
Plaintext
# Honcho Environment Variables Template
|
|
# Copy this file to .env and fill in the appropriate values
|
|
#
|
|
# Required variables are marked with (REQUIRED)
|
|
# Optional variables have default values and can be left commented out
|
|
|
|
# =============================================================================
|
|
# Application Settings
|
|
# =============================================================================
|
|
LOG_LEVEL=INFO
|
|
# SESSION_OBSERVERS_LIMIT=10
|
|
# GET_CONTEXT_MAX_TOKENS=100000
|
|
# MAX_FILE_SIZE=5242880 # Bytes
|
|
# MAX_MESSAGE_SIZE=25000 # Characters
|
|
|
|
# Embedding settings
|
|
# EMBED_MESSAGES=true
|
|
# MAX_EMBEDDING_TOKENS=8192
|
|
# MAX_EMBEDDING_TOKENS_PER_REQUEST=300000
|
|
|
|
# LANGFUSE_HOST=
|
|
# LANGFUSE_PUBLIC_KEY=
|
|
|
|
# COLLECT_METRICS_LOCAL=false
|
|
# LOCAL_METRICS_FILE=metrics.jsonl
|
|
# REASONING_TRACES_FILE=traces.jsonl # Path to JSONL file for reasoning traces
|
|
|
|
# NAMESPACE="honcho"
|
|
|
|
# =============================================================================
|
|
# Database Settings (REQUIRED)
|
|
# =============================================================================
|
|
# Connection URI for PostgreSQL database with pgvector support
|
|
# Must use postgresql+psycopg prefix for SQLAlchemy compatibility
|
|
DB_CONNECTION_URI=postgresql+psycopg://testuser:testpwd@localhost:5432/honcho
|
|
|
|
# Optional database settings
|
|
# DB_SCHEMA=public
|
|
# DB_POOL_CLASS=default
|
|
# DB_POOL_SIZE=10
|
|
# DB_MAX_OVERFLOW=20
|
|
# DB_POOL_TIMEOUT=30
|
|
# DB_POOL_RECYCLE=300
|
|
# DB_POOL_PRE_PING=true
|
|
# DB_POOL_USE_LIFO=true
|
|
# DB_SQL_DEBUG=false
|
|
# DB_TRACING=false
|
|
|
|
# =============================================================================
|
|
# Authentication Settings
|
|
# =============================================================================
|
|
# Whether to enable authentication (set to true for production)
|
|
AUTH_USE_AUTH=false
|
|
|
|
# JWT secret key (REQUIRED if AUTH_USE_AUTH=true)
|
|
# Generate with: python scripts/generate_jwt_secret.py
|
|
# AUTH_JWT_SECRET=your-secret-key-here
|
|
|
|
# =============================================================================
|
|
# LLM API Keys (REQUIRED for full functionality)
|
|
# =============================================================================
|
|
# OpenAI API key for embeddings
|
|
LLM_OPENAI_API_KEY=your-openai-api-key-here
|
|
|
|
# Anthropic API key for dialectic and deriver functionality
|
|
LLM_ANTHROPIC_API_KEY=your-anthropic-api-key-here
|
|
|
|
# Google API key for summarization (if using Gemini)
|
|
# LLM_GEMINI_API_KEY=your-google-api-key-here
|
|
|
|
# Groq API key for query generation (if using Groq)
|
|
# LLM_GROQ_API_KEY=your-groq-api-key-here
|
|
|
|
# Base URL for OpenAI Compatible Requests if you want to use a different provider
|
|
# LLM_OPENAI_COMPATIBLE_BASE_URL=
|
|
# LLM_OPENAI_COMPATIBLE_API_KEY=
|
|
|
|
# Separate vLLM endpoint (for local models)
|
|
# LLM_VLLM_API_KEY=
|
|
# LLM_VLLM_BASE_URL=
|
|
|
|
# =============================================================================
|
|
# LLM Configuration
|
|
# =============================================================================
|
|
# Global LLM settings
|
|
# LLM_DEFAULT_MAX_TOKENS=2500
|
|
# LLM_EMBEDDING_PROVIDER=openai
|
|
# LLM_MAX_TOOL_OUTPUT_CHARS=10000 # Max chars for tool output (~2500 tokens)
|
|
# LLM_MAX_MESSAGE_CONTENT_CHARS=2000 # Max chars per message in tool results
|
|
|
|
# =============================================================================
|
|
# Deriver (Background Worker) Settings
|
|
# =============================================================================
|
|
# DERIVER_ENABLED=true
|
|
# DERIVER_WORKERS=1
|
|
# DERIVER_POLLING_SLEEP_INTERVAL_SECONDS=1.0
|
|
# DERIVER_STALE_SESSION_TIMEOUT_MINUTES=5
|
|
# DERIVER_QUEUE_ERROR_RETENTION_SECONDS=2592000 # 30 days
|
|
# DERIVER_PROVIDER=google
|
|
# DERIVER_MODEL=gemini-2.5-flash-lite
|
|
# DERIVER_TEMPERATURE=
|
|
# DERIVER_DEDUPLICATE=true
|
|
# DERIVER_MAX_OUTPUT_TOKENS=4096
|
|
# DERIVER_THINKING_BUDGET_TOKENS=1024
|
|
# DERIVER_LOG_OBSERVATIONS=false
|
|
# DERIVER_MAX_INPUT_TOKENS=23000
|
|
# DERIVER_WORKING_REPRESENTATION_MAX_OBSERVATIONS=100
|
|
# DERIVER_REPRESENTATION_BATCH_MAX_TOKENS=1024
|
|
# DERIVER_FLUSH_ENABLED=false # Bypass batch token threshold, process work immediately
|
|
# DERIVER_BACKUP_PROVIDER=
|
|
# DERIVER_BACKUP_MODEL=
|
|
|
|
# =============================================================================
|
|
# Peer Card Configuration
|
|
# =============================================================================
|
|
# PEER_CARD_ENABLED=true
|
|
|
|
# =============================================================================
|
|
# Dialectic Settings
|
|
# =============================================================================
|
|
# Global dialectic settings
|
|
# DIALECTIC_MAX_OUTPUT_TOKENS=8192
|
|
# DIALECTIC_MAX_INPUT_TOKENS=100000
|
|
# DIALECTIC_HISTORY_TOKEN_LIMIT=8192
|
|
# DIALECTIC_SESSION_HISTORY_MAX_TOKENS=4096
|
|
|
|
# Per-level settings (reasoning_level parameter in API)
|
|
# Each level can have its own provider, model, thinking budget, tool iterations, and max output tokens
|
|
# MAX_OUTPUT_TOKENS is optional per level; if not set, uses global DIALECTIC_MAX_OUTPUT_TOKENS
|
|
|
|
# Minimal level
|
|
# DIALECTIC_LEVELS__minimal__PROVIDER=google
|
|
# DIALECTIC_LEVELS__minimal__MODEL=gemini-2.5-flash-lite
|
|
# DIALECTIC_LEVELS__minimal__THINKING_BUDGET_TOKENS=0
|
|
# DIALECTIC_LEVELS__minimal__MAX_TOOL_ITERATIONS=1
|
|
# DIALECTIC_LEVELS__minimal__MAX_OUTPUT_TOKENS=250 # Reduced output for cost savings
|
|
|
|
# Low level
|
|
# DIALECTIC_LEVELS__low__PROVIDER=google
|
|
# DIALECTIC_LEVELS__low__MODEL=gemini-2.5-flash-lite
|
|
# DIALECTIC_LEVELS__low__THINKING_BUDGET_TOKENS=0
|
|
# DIALECTIC_LEVELS__low__MAX_TOOL_ITERATIONS=5
|
|
# DIALECTIC_LEVELS__low__MAX_OUTPUT_TOKENS=8192 # Optional: override global default
|
|
|
|
# Medium level
|
|
# DIALECTIC_LEVELS__medium__PROVIDER=anthropic
|
|
# DIALECTIC_LEVELS__medium__MODEL=claude-haiku-4-5
|
|
# DIALECTIC_LEVELS__medium__THINKING_BUDGET_TOKENS=1024
|
|
# DIALECTIC_LEVELS__medium__MAX_TOOL_ITERATIONS=2
|
|
# DIALECTIC_LEVELS__medium__MAX_OUTPUT_TOKENS=8192 # Optional: override global default
|
|
# DIALECTIC_LEVELS__medium__TOOL_CHOICE=
|
|
|
|
# High level
|
|
# DIALECTIC_LEVELS__high__PROVIDER=anthropic
|
|
# DIALECTIC_LEVELS__high__MODEL=claude-haiku-4-5
|
|
# DIALECTIC_LEVELS__high__THINKING_BUDGET_TOKENS=1024
|
|
# DIALECTIC_LEVELS__high__MAX_TOOL_ITERATIONS=4
|
|
# DIALECTIC_LEVELS__high__MAX_OUTPUT_TOKENS=8192 # Optional: override global default
|
|
|
|
# Max level
|
|
# DIALECTIC_LEVELS__max__PROVIDER=anthropic
|
|
# DIALECTIC_LEVELS__max__MODEL=claude-haiku-4-5
|
|
# DIALECTIC_LEVELS__max__THINKING_BUDGET_TOKENS=2048
|
|
# DIALECTIC_LEVELS__max__MAX_TOOL_ITERATIONS=10
|
|
# DIALECTIC_LEVELS__max__MAX_OUTPUT_TOKENS=8192 # Optional: override global default
|
|
# Optional backup per level (must set both or neither):
|
|
# DIALECTIC_LEVELS__max__BACKUP_PROVIDER=google
|
|
# DIALECTIC_LEVELS__max__BACKUP_MODEL=gemini-2.5-pro
|
|
|
|
# =============================================================================
|
|
# Summary Settings
|
|
# =============================================================================
|
|
# SUMMARY_ENABLED=true
|
|
# SUMMARY_MESSAGES_PER_SHORT_SUMMARY=20
|
|
# SUMMARY_MESSAGES_PER_LONG_SUMMARY=60
|
|
# SUMMARY_PROVIDER=google
|
|
# SUMMARY_MODEL=gemini-2.5-flash
|
|
# SUMMARY_MAX_TOKENS_SHORT=1000
|
|
# SUMMARY_MAX_TOKENS_LONG=4000
|
|
# SUMMARY_THINKING_BUDGET_TOKENS=512
|
|
# SUMMARY_BACKUP_PROVIDER=
|
|
# SUMMARY_BACKUP_MODEL=
|
|
|
|
# =============================================================================
|
|
# Dream Settings
|
|
# =============================================================================
|
|
# DREAM_ENABLED=true
|
|
# DREAM_DOCUMENT_THRESHOLD=50
|
|
# DREAM_IDLE_TIMEOUT_MINUTES=60
|
|
# DREAM_MIN_HOURS_BETWEEN_DREAMS=8
|
|
# DREAM_ENABLED_TYPES=["omni"]
|
|
# DREAM_PROVIDER=anthropic
|
|
# DREAM_MODEL=claude-sonnet-4-20250514
|
|
# DREAM_MAX_OUTPUT_TOKENS=16384
|
|
# DREAM_THINKING_BUDGET_TOKENS=8192
|
|
# DREAM_MAX_TOOL_ITERATIONS=20
|
|
# DREAM_HISTORY_TOKEN_LIMIT=16384
|
|
# DREAM_BACKUP_PROVIDER=
|
|
# DREAM_BACKUP_MODEL=
|
|
|
|
# Specialist models (use same provider as main model)
|
|
# DREAM_DEDUCTION_MODEL=claude-haiku-4-5
|
|
# DREAM_INDUCTION_MODEL=claude-haiku-4-5
|
|
|
|
# Dream Surprisal Settings (Tree-based observation sampling for targeted reasoning)
|
|
# DREAM_SURPRISAL__ENABLED=false
|
|
# DREAM_SURPRISAL__TREE_TYPE=kdtree # Options: kdtree, balltree, rptree, covertree, lsh, graph, prototype
|
|
# DREAM_SURPRISAL__TREE_K=5 # Number of neighbors for kNN-based trees
|
|
# DREAM_SURPRISAL__SAMPLING_STRATEGY=recent # Options: recent, random, all
|
|
# DREAM_SURPRISAL__SAMPLE_SIZE=200 # Number of observations to sample for tree building
|
|
# DREAM_SURPRISAL__TOP_PERCENT_SURPRISAL=0.10 # Top percentage of observations (0.10 = top 10%)
|
|
# DREAM_SURPRISAL__MIN_HIGH_SURPRISAL_FOR_REPLACE=10 # Hybrid mode: min observations to replace standard questions
|
|
# DREAM_SURPRISAL__INCLUDE_LEVELS=["explicit","deductive"] # Observation levels to include
|
|
|
|
# =============================================================================
|
|
# Webhook Settings
|
|
# =============================================================================
|
|
# WEBHOOK_SECRET=
|
|
# WEBHOOK_MAX_WORKSPACE_LIMIT=10
|
|
|
|
# =============================================================================
|
|
# Monitoring and Observability (Optional)
|
|
# =============================================================================
|
|
# Sentry error tracking
|
|
# SENTRY_ENABLED=false
|
|
# SENTRY_DSN=your-sentry-dsn-here
|
|
# SENTRY_RELEASE=your-release-semver
|
|
# SENTRY_ENVIRONMENT=development
|
|
# SENTRY_TRACES_SAMPLE_RATE=0.1
|
|
# SENTRY_PROFILES_SAMPLE_RATE=0.1
|
|
|
|
# =============================================================================
|
|
# Prometheus Metrics Settings (Pull-based metrics)
|
|
# =============================================================================
|
|
# METRICS_ENABLED=false
|
|
# METRICS_NAMESPACE=honcho # Inherits from NAMESPACE if not set
|
|
|
|
# =============================================================================
|
|
# CloudEvents Telemetry Settings (Analytics events)
|
|
# =============================================================================
|
|
# TELEMETRY_ENABLED=false
|
|
# TELEMETRY_ENDPOINT=https://telemetry.honcho.dev/v1/events
|
|
# TELEMETRY_HEADERS={"Authorization": "Bearer your-token"} # JSON string for auth headers
|
|
# TELEMETRY_BATCH_SIZE=100
|
|
# TELEMETRY_FLUSH_INTERVAL_SECONDS=1.0
|
|
# TELEMETRY_FLUSH_THRESHOLD=50
|
|
# TELEMETRY_MAX_RETRIES=3
|
|
# TELEMETRY_MAX_BUFFER_SIZE=10000
|
|
# TELEMETRY_NAMESPACE=honcho # Inherits from NAMESPACE if not set
|
|
|
|
# =============================================================================
|
|
# Cache
|
|
# =============================================================================
|
|
# CACHE_ENABLED=false
|
|
# CACHE_URL="redis://localhost:6379/0?suppress=true"
|
|
# CACHE_NAMESPACE="honcho" # Inherits from NAMESPACE if not set
|
|
# CACHE_DEFAULT_TTL_SECONDS=300
|
|
# CACHE_DEFAULT_LOCK_TTL_SECONDS=5
|
|
|
|
# =============================================================================
|
|
# Vector Store Settings
|
|
# =============================================================================
|
|
# Vector store type: "pgvector", "turbopuffer", or "lancedb"
|
|
VECTOR_STORE_TYPE=pgvector
|
|
|
|
# Migration flag: set to true when migration from pgvector is complete
|
|
VECTOR_STORE_MIGRATED=false
|
|
|
|
# Global namespace prefix for all vector namespaces
|
|
# Namespaces follow the pattern: {NAMESPACE}.{type}.{hash}
|
|
# where hash is a base64url-encoded SHA-256 of the workspace/peer names
|
|
# - Documents: {NAMESPACE}.doc.{hash(workspace, observer, observed)}
|
|
# - Messages: {NAMESPACE}.msg.{hash(workspace)}
|
|
# VECTOR_STORE_NAMESPACE=honcho # Inherits from NAMESPACE if not set
|
|
|
|
# Embedding dimensions (default: 1536 for OpenAI text-embedding-3-small)
|
|
# VECTOR_STORE_DIMENSIONS=1536
|
|
|
|
# Turbopuffer-specific settings (required if TYPE is "turbopuffer")
|
|
# VECTOR_STORE_TURBOPUFFER_API_KEY=your-turbopuffer-api-key
|
|
# VECTOR_STORE_TURBOPUFFER_REGION=gcp-us-east4
|
|
|
|
# LanceDB-specific settings (local embedded mode)
|
|
# VECTOR_STORE_LANCEDB_PATH=./lancedb_data
|
|
|
|
# Reconciliation interval for background sync (default: 5 minutes)
|
|
# VECTOR_STORE_RECONCILIATION_INTERVAL_SECONDS=300
|