Files
openbrain-mcp/.env.example
Agent Zero 38b1150838 feat(config): add TruthConfig for truth scoring engine (#30)
Add TruthConfig struct to config.rs with all truth engine parameters:
- enabled, scoring_interval_seconds, batch_size, rescore_after_seconds
- pln_base_confidence, ecan_decay_rate, ecan_spread_factor
- contradiction_threshold, verification_threshold, cross_ref_limit

All settings configurable via OPENBRAIN__TRUTH__* env vars with sensible defaults.
Update .env.example with full documentation of new variables.
Update Config::load() builder and Default impl.

Part of #29
2026-04-04 02:05:36 +00:00

69 lines
2.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenBrain MCP Server Configuration
# Copy this to .env and fill in your values
# Server Configuration
OPENBRAIN__SERVER__HOST=0.0.0.0
OPENBRAIN__SERVER__PORT=3100
# Database Configuration (PostgreSQL with pgvector)
# This role should own the OpenBrain database objects that migrations manage.
OPENBRAIN__DATABASE__HOST=localhost
OPENBRAIN__DATABASE__PORT=5432
OPENBRAIN__DATABASE__NAME=openbrain
OPENBRAIN__DATABASE__USER=openbrain_svc
OPENBRAIN__DATABASE__PASSWORD=your_secure_password_here
OPENBRAIN__DATABASE__POOL_SIZE=10
# Embedding Configuration
# Path to ONNX model directory (all-MiniLM-L6-v2)
OPENBRAIN__EMBEDDING__MODEL_PATH=models/all-MiniLM-L6-v2
OPENBRAIN__EMBEDDING__DIMENSION=384
# Hybrid query scoring
OPENBRAIN__QUERY__VECTOR_WEIGHT=0.6
OPENBRAIN__QUERY__TEXT_WEIGHT=0.4
# Backward-compatible plain env aliases
# VECTOR_WEIGHT=0.6
# TEXT_WEIGHT=0.4
# Ingest deduplication
OPENBRAIN__DEDUP__THRESHOLD=0.90
# Backward-compatible plain env alias
# DEDUP_THRESHOLD=0.90
# TTL / transient facts
# Background cleanup interval in seconds. Set to 0 to disable automatic cleanup.
OPENBRAIN__TTL__CLEANUP_INTERVAL_SECONDS=300
# Authentication (optional)
OPENBRAIN__AUTH__ENABLED=false
# Comma-separated list of persistent API keys
# OPENBRAIN__AUTH__API_KEYS=prod_live_key,smoke_test_key
# Logging
RUST_LOG=info,openbrain_mcp=debug
# Truth Engine (optional)
# Enable the background truth scoring worker. When enabled, stored memories
# are continuously evaluated for truthfulness using PLN deduction, ECAN
# attention economy, and cross-referencing against related memories.
OPENBRAIN__TRUTH__ENABLED=false
# Seconds between scoring cycles (default: 300 = 5 minutes)
OPENBRAIN__TRUTH__SCORING_INTERVAL_SECONDS=300
# Number of memories to score per cycle (default: 50)
OPENBRAIN__TRUTH__BATCH_SIZE=50
# Seconds before a scored memory is re-evaluated (default: 86400 = 24 hours)
OPENBRAIN__TRUTH__RESCORE_AFTER_SECONDS=86400
# PLN base confidence for deduction chains (0.01.0, default: 0.85)
OPENBRAIN__TRUTH__PLN_BASE_CONFIDENCE=0.85
# ECAN STI decay rate per cycle (0.01.0, default: 0.95)
OPENBRAIN__TRUTH__ECAN_DECAY_RATE=0.95
# ECAN attention spread factor (default: 0.05)
OPENBRAIN__TRUTH__ECAN_SPREAD_FACTOR=0.05
# Similarity threshold for contradiction detection (0.01.0, default: 0.85)
OPENBRAIN__TRUTH__CONTRADICTION_THRESHOLD=0.85
# Truth value threshold for "verified" categorization (0.01.0, default: 0.8)
OPENBRAIN__TRUTH__VERIFICATION_THRESHOLD=0.8
# Max related memories to cross-reference per scoring (default: 10)
OPENBRAIN__TRUTH__CROSS_REF_LIMIT=10