# second-brain runtime configuration # Copy this file and edit paths to match your setup. # Override the config file path with SECOND_BRAIN_CONFIG env var. # Path to your Obsidian vault (git-managed directory). The wiki compiler # writes markdown into this directory and commits inside it. We do NOT # dual-write into petalbrain.wiki — the file-based vault stays canonical. vault_path = "~/Documents/second-brain-vault" # Directory where downloaded media files are stored media_dir = "~/.local/share/second-brain/media" # Directory where Whisper SRT transcripts are stored subtitles_dir = "~/.local/share/second-brain/subtitles" # Whisper model size: tiny | base | small | medium | large # small is a good balance of speed and accuracy whisper_model = "small" # Active knowledge domains domains = ["development", "content", "business", "homelab"] [database] # Postgres + pgvector lives on the petalbrain instance. # # Preferred: leave `url` empty and export SECOND_BRAIN_DATABASE_URL (or the # shared HERBYLAB_DATABASE_URL) in the environment so the password never # lands in this checked-in file. # # Containerised second-brain runs should target homelab-postgres on the # homelab docker network: # postgresql+psycopg://lovebug:@homelab-postgres:5432/petalbrain # # Host-side dev runs can point at the published port instead: # postgresql+psycopg://lovebug:@127.0.0.1:5433/petalbrain url = "" [extractor] # "cli" → runs `claude -p` under your Max OAuth (no per-token billing). # "api" → uses Anthropic SDK, requires ANTHROPIC_API_KEY. backend = "cli" model = "claude-sonnet-4-6" cli_binary = "claude" timeout_sec = 600 [embeddings] # Best-effort: extraction summaries are chunked (512 tokens / 64 overlap) # and embedded via Ollama's nomic-embed-text (768-d) into the shared # public.embeddings table. Failures (no DB / no Ollama) log a warning and # the pipeline keeps moving — the relational + file vault stay canonical. enabled = true # Containerized default; for host-side runs set OLLAMA_URL=http://127.0.0.1:11434 ollama_url = "http://ollama:11434" model = "nomic-embed-text" embed_field = "summary" [scheduler] # Time window for overnight processing (24h format, may cross midnight) window_start = "22:00" window_end = "06:00" # CLI backend: cap calls per rolling hour (Max sub has 5h-window message caps). max_calls_per_hour = 30 # Minimum seconds between extraction calls (rate-limit smoother) min_gap_seconds = 120 # Legacy API-backend budget (only enforced when extractor.backend = "api"). max_tokens_per_hour = 100_000