Files
glpi-neural-brain/.env.example
jbergner 440423c5b6
All checks were successful
release-tag / release-image (push) Successful in 2m43s
RC-3
2026-08-09 11:29:13 +02:00

279 lines
12 KiB
Plaintext

# Runtime role: brain = full knowledge system; agent = lightweight source poller using the same binary/image.
BRAIN_MODE=brain
# HTTP
# Direct binary listen address. Docker Compose listens internally on :8090 and
# exposes BRAIN_PORT on the host.
BRAIN_LISTEN_ADDR=:8090
# Docker Compose host port (not consumed by the binary itself).
BRAIN_PORT=8090
# URL that remote/source-agent containers can actually reach. Do not use
# localhost/127.0.0.1 here for a separate container.
BRAIN_PUBLIC_URL=
BRAIN_DATA_DIR=./data
BRAIN_API_KEY=
# Read-only production knowledge; comma-separated paths are supported.
BRAIN_KNOWLEDGE_DIRS=../glpi-ai-agent/knowledge
# Writable staging used only for AI-THINK drafts. The Agent does not mount this path.
BRAIN_STAGING_DIRS=../glpi-ai-knowledgebase/staging
# Optional read-only audit streams. Multiple files may be comma-separated.
BRAIN_AGENT_RUNS_FILES=../glpi-ai-agent/data/runs.jsonl
# Batched disk persistence. AI-THINK files and caches are written first;
# changed graph rows follow in one SQLite/WAL transaction. A final flush is
# attempted during shutdown.
BRAIN_PERSIST_INTERVAL=5m
# Ollama pool. OLLAMA_URLS takes precedence over legacy OLLAMA_URL.
OLLAMA_URL=http://localhost:11434
OLLAMA_URLS=http://localhost:11434
OLLAMA_NODE_NAMES=local-gpu
OLLAMA_NODE_WEIGHTS=1
OLLAMA_ROUTING_MODE=least_inflight
OLLAMA_NODE_MAX_INFLIGHT=1
OLLAMA_NODE_HEALTH_INTERVAL=15s
OLLAMA_NODE_FAILURE_COOLDOWN=30s
OLLAMA_NODE_REQUEST_TIMEOUT=8m
OLLAMA_FAILOVER_ENABLED=true
# 0 = try all configured nodes.
OLLAMA_FAILOVER_ATTEMPTS=0
OLLAMA_REQUIRE_SAME_MODEL_DIGEST=true
OLLAMA_REQUIRE_EMBEDDING_MODEL=true
OLLAMA_CHAT_MODEL=qwen3:8b
OLLAMA_EMBEDDING_MODEL=embeddinggemma
# Optional read-only GLPI Knowledge Base ingest.
GLPI_KB_ENABLED=false
GLPI_URL=https://glpi.example.invalid
GLPI_API_VERSION=v2.3
GLPI_CLIENT_ID=
GLPI_CLIENT_SECRET=
GLPI_USERNAME=
GLPI_PASSWORD=
GLPI_ALLOW_INSECURE_HTTP=false
GLPI_TIMEOUT=20s
GLPI_KB_PATH=auto
GLPI_KB_FILTER=
GLPI_KB_LIMIT=500
GLPI_KB_SYNC_INTERVAL=10m
GLPI_KB_SOURCE=GLPI Knowledge Base
# Runtime controls. Boolean/view/performance values are WebUI defaults.
# Source lists are initial WebUI defaults only; runtime-settings.json takes precedence afterwards.
# Empty lists mean unrestricted. Values must exactly match the KB JSON source field.
BRAIN_LEARNING_ENABLED=true
BRAIN_THINKING_ENABLED=true
# Initial exact source selections; empty = all sources.
BRAIN_LEARNING_SOURCES=
BRAIN_DISPLAY_SOURCES=
BRAIN_THINKING_SOURCES=
BRAIN_DEFAULT_VIEW=neural # neural | honeycomb | constellation
# 0 = unbegrenzt; Webinterface kann den Wert zur Laufzeit ändern
BRAIN_MAX_DISPLAY_NODES=0
# Browser-Rendering auf 30 FPS, geringere DPR und reduzierte Effektkosten optimieren.
BRAIN_LOW_POWER_MODE=false
# Sequential enrichment
BRAIN_AUTO_ENRICH=true
BRAIN_SCAN_INTERVAL=5m
# Safety verification: periodically parse/hash full knowledge content even when path/size/mtime are unchanged. 0 disables.
BRAIN_KNOWLEDGE_FULL_VERIFY_INTERVAL=6h
BRAIN_ENRICH_INTERVAL=90s
BRAIN_ENRICH_BATCH_SIZE=3
BRAIN_ENRICH_STEP_DELAY=3s
BRAIN_ENRICH_ANCHORS=48
# precise = vollständige Cosine-Suche; clustered = Semantic Hashing + exakte Top-K-Prüfung
BRAIN_PROCESSING_MODE=precise
BRAIN_CLUSTER_HASH_BITS=24
BRAIN_CLUSTER_HASH_TABLES=2
# Experimental mathematical Knowledge<->Knowledge layer. Reuses embeddings that
# already exist; edge scoring/layout perform no additional model call.
BRAIN_VECTOR_GRAPH_ENABLED=false
BRAIN_VECTOR_GRAPH_NEIGHBORS=4
BRAIN_VECTOR_GRAPH_CANDIDATES=96
BRAIN_VECTOR_GRAPH_MIN_SIMILARITY=0.80
BRAIN_VECTOR_GRAPH_MIN_AFFINITY=0.35
# Optional second pass for nodes left isolated after the conservative mutual-kNN pass.
BRAIN_VECTOR_GRAPH_ORPHAN_PASS=false
BRAIN_VECTOR_GRAPH_ORPHAN_NEIGHBORS=2
BRAIN_VECTOR_GRAPH_ORPHAN_CANDIDATES=256
BRAIN_VECTOR_GRAPH_ORPHAN_MIN_SIMILARITY=0.80
BRAIN_VECTOR_GRAPH_ORPHAN_MIN_AFFINITY=0.30
# Let an integrated BRAIN_MODE=agent worker calculate vector-graph CPU jobs.
# The Brain remains graph owner and validates every returned endpoint/value.
BRAIN_VECTOR_GRAPH_AGENT_OFFLOAD=false
BRAIN_VECTOR_GRAPH_AGENT_REQUIRED=false
BRAIN_VECTOR_GRAPH_AGENT_WAIT=2m
# AI-THINK consumes mathematical semantic_neighbor candidates before doing a new vector search.
BRAIN_THINKING_VECTOR_GUIDED=true
# Optional hard semantic 3D layout. Keep false unless you want an immediate full layout replacement.
BRAIN_VECTOR_GRAPH_LAYOUT=false
# Re-evaluate semantic proximity from the existing embeddings periodically without model calls.
BRAIN_VECTOR_GRAPH_REEVALUATE_INTERVAL=30m
# Gradually relax dense visual clouds toward the semantic layout instead of moving all nodes at once.
BRAIN_VECTOR_GRAPH_RELAX_LAYOUT=true
BRAIN_VECTOR_GRAPH_LAYOUT_RELAX_INTERVAL=2h
BRAIN_VECTOR_GRAPH_LAYOUT_BLEND=0.08
BRAIN_VECTOR_GRAPH_LAYOUT_MAX_SHIFT=0.035
BRAIN_CLUSTER_CANDIDATES_PER_ANCHOR=96
BRAIN_CLUSTER_ARTICLE_CANDIDATES=192
BRAIN_CLUSTER_REVIEW_EVIDENCE=8
BRAIN_CLUSTER_REVIEW_CONTEXT_CHARS=8000
# Bündelt thematisch kompatible Relationen eines THINK-Zyklus zu einem Artikeljob.
BRAIN_CLUSTER_ARTICLE_BATCHING=true
BRAIN_SIMILARITY_THRESHOLD=0.68
BRAIN_RELATION_THRESHOLD=0.72
BRAIN_TOP_K=8
BRAIN_MAX_CONTEXT_CHARS=16000
# Distributed Source-Agent inbox (Brain mode). Agent documents are queued outside
# the graph, embedded in small batches, and only promoted to candidate status when
# they match existing knowledge. Adaptive article research checks this inbox before SearXNG.
BRAIN_SOURCE_INBOX_ENABLED=true
BRAIN_SOURCE_INBOX_INTERVAL=30s
BRAIN_SOURCE_INBOX_BATCH_SIZE=12
BRAIN_SOURCE_INBOX_MIN_SIMILARITY=0.55
BRAIN_SOURCE_INBOX_MIN_PRIORITY=0.55
BRAIN_SOURCE_INBOX_NOVELTY_FLOOR=0.35
BRAIN_SOURCE_INBOX_MIN_RESULTS=2
# Freshness-sensitive article queries only reuse inbox documents newer than this.
BRAIN_SOURCE_INBOX_FRESH_MAX_AGE=168h
# Security/advisory exception: curated security candidates are not only cached.
# They enter a small proactive queue, are extracted by the article synthesis
# model, optionally enriched via direct web fetch/SearXNG, and can become an
# external security node before an article cites them.
BRAIN_SOURCE_INBOX_SECURITY_PROACTIVE=true
BRAIN_SOURCE_INBOX_SECURITY_BATCH_SIZE=2
BRAIN_SOURCE_INBOX_SECURITY_MIN_PRIORITY=0.58
BRAIN_SOURCE_INBOX_SECURITY_MIN_CONFIDENCE=0.72
BRAIN_SOURCE_INBOX_SECURITY_FETCH_MIN_CHARS=1800
BRAIN_SOURCE_INBOX_SECURITY_RESEARCH_RESULTS=3
# Optional controlled web research through your own SearXNG instance.
# Use the root URL or a URL ending in /search. Inside Docker, localhost points
# to the Brain container; use the SearXNG service name or host.docker.internal.
BRAIN_RESEARCH_ENABLED=false
SEARXNG_URL=
# Knowledge synthesis after a verified relation has formed a useful source cluster.
# Relation thinking always remains separate and only creates graph edges.
BRAIN_ARTICLE_SYNTHESIS_ENABLED=true
# Language tag for generated KB drafts (for example de-DE or en-US).
BRAIN_ARTICLE_LANGUAGE=de-DE
# Generate-then-review pipeline. Use a dedicated author model if it is available
# on at least one healthy Ollama pool node, e.g. gemma3:12b.
# The review model should be different from the author model when possible.
BRAIN_ARTICLE_SYNTHESIS_MODEL=qwen3:8b
BRAIN_ARTICLE_REVIEW_MODEL=qwen3:8b
# Number of targeted research + rewrite loops after the reviewer finds unsupported claims.
BRAIN_ARTICLE_REVIEW_REPAIR_ROUNDS=1
BRAIN_ARTICLE_MIN_SOURCES=3
BRAIN_ARTICLE_MAX_SOURCES=8
BRAIN_ARTICLE_MIN_PRODUCTION_RATIO=0.70
BRAIN_ARTICLE_MAX_GENERATION_DEPTH=2
BRAIN_ARTICLE_MIN_CONFIDENCE=0.74
BRAIN_ARTICLE_MIN_TEXT_CHARS=180
BRAIN_ARTICLE_MIN_ANSWER_CHARS=420
# Model-free pre-review. It scores depth, redundancy, source coverage and information density
# before the expensive Qwen claim/coverage review. Local CPU is the privacy-safe default;
# enable Agent offload only when that worker is trusted to receive article/source text.
BRAIN_ARTICLE_CPU_QUALITY_ENABLED=true
BRAIN_ARTICLE_CPU_QUALITY_AGENT_OFFLOAD=false
BRAIN_ARTICLE_CPU_QUALITY_AGENT_REQUIRED=false
BRAIN_ARTICLE_CPU_QUALITY_AGENT_WAIT=20s
# Web-Routing: auto = precise: always, clustered: adaptive.
# always = breite Vorabrecherche; adaptive = intern/Gemma zuerst und Web nur bei Aktualität/Evidenzlücke; review_only = Web nur auf Reviewer-Anforderung.
BRAIN_ARTICLE_RESEARCH_STRATEGY=auto
# Budget für initiale adaptive Webrunde (Aktualität oder Autor-Anforderung).
BRAIN_ARTICLE_ADAPTIVE_INITIAL_QUERIES=2
BRAIN_ARTICLE_ADAPTIVE_INITIAL_FETCH=3
# Maximal number of precise queries per research round.
BRAIN_ARTICLE_MAX_RESEARCH_QUERIES=6
# Raw SearXNG candidates per query.
BRAIN_ARTICLE_RESEARCH_RESULTS=12
# Upper research-planning budget. The active article pipeline performs one broad
# initial collection cycle; later targeted searches are driven by the reviewer.
BRAIN_ARTICLE_RESEARCH_ROUNDS=3
# Highest-ranked pages whose full content is downloaded.
BRAIN_ARTICLE_RESEARCH_FETCH_RESULTS=6
# Legacy/autonomous evidence mode and cached-material reuse still use these
# thresholds. The active generate-then-review article path itself fills its
# fetch budget from the highest-ranked SearXNG results without a semantic
# acceptance gate before drafting.
BRAIN_ARTICLE_RESEARCH_EXPLORATION_RESULTS=3
BRAIN_ARTICLE_RESEARCH_PREFETCH_MIN_RELEVANCE=0.25
BRAIN_ARTICLE_RESEARCH_MIN_RELEVANCE=0.55
BRAIN_ARTICLE_RESEARCH_MIN_QUALITY=0.35
BRAIN_ARTICLE_RESEARCH_PAGE_MAX_BYTES=2097152
BRAIN_ARTICLE_RESEARCH_PAGE_MAX_CHARS=14000
BRAIN_ARTICLE_RESEARCH_FETCH_TIMEOUT=20s
# Keep false unless private/intranet research URLs are intentionally trusted.
BRAIN_ARTICLE_RESEARCH_ALLOW_PRIVATE=false
# Research orchestration. All SearXNG requests, web fetches and Ollama calls
# share this bounded queue. With one Ollama node, 2 is a conservative default:
# one model request may run while one web request progresses.
BRAIN_RESEARCH_OLLAMA_MAX_INFLIGHT=2
BRAIN_RESEARCH_OLLAMA_QUEUE_SIZE=64
# Semantically equivalent research intents reuse a running/recent result bundle.
BRAIN_RESEARCH_DEDUPE_THRESHOLD=0.92
BRAIN_RESEARCH_DEDUPE_TTL=45m
# site: filters are always stripped at runtime. Research remains domain-open.
# Autonomous, persistent background research. Tasks are stored in graph.db and
# handed to Ollama asynchronously with low priority. Disabled by default.
BRAIN_AUTONOMOUS_RESEARCH_ENABLED=false
BRAIN_AUTONOMOUS_RESEARCH_IDLE_ONLY=true
BRAIN_AUTONOMOUS_RESEARCH_INTERVAL=30m
BRAIN_AUTONOMOUS_RESEARCH_TASKS_PER_CYCLE=1
BRAIN_AUTONOMOUS_RESEARCH_MAX_TASKS_PER_DAY=12
BRAIN_AUTONOMOUS_RESEARCH_MAX_QUERIES_PER_TASK=6
BRAIN_AUTONOMOUS_RESEARCH_MAX_PAGES_PER_TASK=8
BRAIN_AUTONOMOUS_RESEARCH_MAX_ROUNDS=3
BRAIN_AUTONOMOUS_RESEARCH_MIN_PRIORITY=0.65
BRAIN_AUTONOMOUS_RESEARCH_COOLDOWN=168h
BRAIN_AUTONOMOUS_RESEARCH_LEASE=45m
BRAIN_AUTONOMOUS_RESEARCH_MAX_ATTEMPTS=3
BRAIN_AUTONOMOUS_RESEARCH_QUERY_TRIGGERS=true
BRAIN_AUTONOMOUS_RESEARCH_OPPORTUNITY_LIMIT=8
# -----------------------------------------------------------------------------
# Agent mode only. These values are ignored in BRAIN_MODE=brain.
# Create/rotate the token under /source-agents.html in the Brain UI.
# A local JSON bootstrap file may be used instead of URL/ID/token envs.
# -----------------------------------------------------------------------------
# BRAIN_MODE=agent
# Docker Compose publishes the Agent status UI on BRAIN_AGENT_PORT (default 8092).
# BRAIN_AGENT_PORT=8092
# Use the Brain service name on a shared Docker network, a LAN/DNS address, or
# host.docker.internal:<BRAIN_PORT> for a separate Agent container on the same host.
# Never use 127.0.0.1/localhost for a separate container.
# BRAIN_AGENT_BRAIN_URL=https://brain.example.org
# BRAIN_AGENT_ID=security-news-01
# BRAIN_AGENT_TOKEN=brain_agent_xxxxxxxxx
# BRAIN_AGENT_CONFIG_FILE=
# BRAIN_AGENT_CONFIG_REFRESH=5m
# BRAIN_AGENT_HTTP_TIMEOUT=30s
# BRAIN_AGENT_CONCURRENCY=3
# BRAIN_AGENT_BATCH_SIZE=50
# Allow polling RFC1918/private URLs only for intentionally trusted intranet sources.
# BRAIN_AGENT_ALLOW_PRIVATE=false
# CPU compute worker. No Ollama/chat/embedding call is made for vector_graph or article_quality jobs;
# vector jobs receive existing float32 embeddings, article-quality jobs receive the already selected article/evidence text.
# BRAIN_AGENT_COMPUTE_ENABLED=true
# BRAIN_AGENT_COMPUTE_POLL_INTERVAL=5s
# BRAIN_AGENT_COMPUTE_MAX_BYTES=134217728
# Optional Docker-controller role. Keep disabled unless this Agent is intentionally
# trusted with the host Docker socket. Docker.sock is effectively host-root.
# BRAIN_AGENT_DOCKER_CONTROLLER_ENABLED=false
# BRAIN_AGENT_DOCKER_SOCKET=/var/run/docker.sock
# BRAIN_AGENT_DOCKER_COMPOSE_BINARY=docker
# BRAIN_AGENT_CONTROLLER_POLL_INTERVAL=5s
# BRAIN_AGENT_CONTROLLER_MAX_DURATION=15m