Files
memory-os/.env.example
T
ClaudioDrews 384395b78d fix: resolve all 7 Phase 1 setup/infra issues
V1.01: Add fastembed, httpx, redis to requirements.txt (now 10 lines, 9 deps)
V1.03: Create setup/setup_db.py — idempotent SQLite schema for state.db + memory_store.db
V1.04: Create .dockerignore (21 patterns — .env, *.key, __pycache__, etc.)
V1.05: Dockerfile COPY --chown=appuser:appuser (after useradd, before USER switch)
V1.06: Add EXPOSE 8000 + HEALTHCHECK (Redis ping, 30s interval)
V1.07: Document database setup as Step 2 in install.md (pip install + setup_db.py + table listing)
V1.08: Remove change-me from REDIS_PASSWORD in .env.example
V1.09: Replace gcc with build-essential + python3-dev in Dockerfile
2026-06-03 11:31:04 -03:00

111 lines
3.9 KiB
Bash

# Memory OS — Environment Variables
# Copy this file to .env and fill in your values:
# cp .env.example .env
# ── Required ──────────────────────────────────────────
# OpenRouter API key — REQUIRED only when EMBEDDING_API_BASE points to OpenRouter.
# For local providers (Ollama, vLLM, llama.cpp) leave unset or comment out.
OPENROUTER_API_KEY=sk-or-...
# Redis password (generate with: openssl rand -hex 16)
REDIS_PASSWORD=
# ── Paths ─────────────────────────────────────────────
# Where Icarus writes fabric entries (absolute path required — systemd does not expand ~)
FABRIC_DIR=/home/your-user/vault/fabric
# Vault root for Vault Curator, wiki, and backfill scripts
VAULT_PATH=/home/your-user/vault
# Wiki directory for Qdrant ingestion
WIKI_ROOT=/home/your-user/vault/wiki
# Hermes home (usually ~/.hermes)
HERMES_HOME=/home/your-user/.hermes
# State database path (SQLite with FTS5 for session search)
STATE_DB_PATH=/home/your-user/.hermes/state.db
# Logs directory
HERMES_LOGS_DIR=/home/your-user/.hermes/logs
# DLQ (Dead Letter Queue) state file
HERMES_DLQ_PATH=/home/your-user/.hermes/wiki_ingest_failures.json
# DLQ report output (used by dlq_manager.py)
HERMES_DLQ_REPORT_LOG=/home/your-user/.hermes/cron/output/dlq-report.log
HERMES_DLQ_REPORT_DIR=/home/your-user/.hermes/cron/output
# Telemetry log for context_enhancer.py query tracking
TELEMETRY_LOG_PATH=/home/your-user/.hermes/logs/query-telemetry.jsonl
# Reflection trigger log path
REFLECTION_LOG_PATH=/home/your-user/.hermes/logs/reflection_trigger.log
# MaaS env path (reflection_trigger.py loads env from this location)
MAA_ENV_PATH=/home/your-user/.env
# ── Embedding Backend ─────────────────────────────────
# Default: OpenRouter with Qwen3-Embedding-8B.
# Recommended model: multilingual (excellent for non-English content),
# high-quality 4096d embeddings, fast inference, affordable pricing.
# To use a local model (Ollama, vLLM, llama.cpp), set both vars:
# EMBEDDING_API_BASE=http://host.docker.internal:11434/v1
# EMBEDDING_MODEL=nomic-embed-text
# EMBEDDING_API_BASE=https://openrouter.ai/api/v1
# EMBEDDING_MODEL=qwen/qwen3-embedding-8b
# API key for non-OpenRouter authenticated endpoints (vLLM with --api-key,
# custom hosted embedding services). Not needed for OpenRouter (uses
# OPENROUTER_API_KEY) or local unauthenticated providers.
# EMBEDDING_API_KEY=your-key-here
# ── Strongly Recommended ──────────────────────────────
# LLM extraction token limit — 1024 is too small, causes fabric truncation
ICARUS_EXTRACTION_MAX_TOKENS=4096
# LLM extraction model (any OpenRouter chat model)
ICARUS_EXTRACTION_MODEL=deepseek/deepseek-v4-flash
# Embedding dimensions — must match Qdrant collection schema
EMBEDDING_DIMS=4096
# Qdrant collection name
COLLECTION_NAME=knowledge_base
# ── Optional ──────────────────────────────────────────
# Obsidian integration
# ICARUS_OBSIDIAN=1
# OBSIDIAN_VAULT_PATH=/home/your-user/vault
# Fallback truncation limits (only used when LLM extraction fails)
# ICARUS_RESULT_MAX_CHARS=500
# ICARUS_TASK_MAX_CHARS=300
# Training/eval (Together AI)
# TOGETHER_API_KEY=tok-...
# Alternative OpenRouter keys (tried in order by context_enhancer.py)
# OPENROUTER_FULL_API_KEY=sk-or-...
# OPENROUTER_DS_API_KEY=sk-or-...
# Docker: wiki mount path inside worker container
# WIKI_PATH=/wiki
# Logging
# LOG_LEVEL=INFO
# CURATOR_LOG_LEVEL=INFO
# ARQ worker tuning
# ARQ_MAX_JOBS=10
# ARQ_JOB_TIMEOUT=300
# ARQ_KEEP_RESULT=3600
# Micro-reflection budget
# MICRO_REFLECTION_MAX_PER_HOUR=5