wiki-vault/Wiki/Homelab/petalbrain.md
Travis Herbranson 75ba9f005a compile: promote 5 entities (trellis, vault-mcp, petalbrain, knot-dns, herbyeos)
User-approved promotions from the prior compile's proposal list.
pbs-hub-mcp deferred per user. Wiki domain indexes updated to list the new
entities; Sources left untouched (MCP-written/immutable).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 21:27:52 -04:00

3.3 KiB

type path tags created updated
entity Wiki/Homelab
pgvector
embeddings
mcp
ob1
homelab
2026-05-24 2026-05-24

petalbrain

What it is

petalbrain is the consolidated Postgres database that backs all three of Travis's memory systems. It is a single pgvector/pgvector:pg17 instance (container homelab-postgres) holding three schemas — wiki, ob1, trellis — plus a shared public.embeddings vector store. It was created by consolidating three previously separate databases (herbylab, openbrain, trellis) so the cross-cutting reflection/search queries that span all three become free intra-database joins instead of cross-database FDW taxes. The name replaced openbrain, which became misleading once the DB also held wiki and trellis content.

Current state

Live. Layout:

  • Schema wiki — owned by vault_mcp; artifacts / projects / notes
  • Schema ob1 — owned by ob1_mcp; ob1.thoughts (raw) + ob1.reflections (compiled)
  • Schema trellis — owned by trellis_mcp; threads / events / tags
  • public.embeddings — shared across all sources, owned by postgres; VECTOR(768) (Ollama nomic-embed-text), HNSW vector_cosine_ops (m=16, ef_construction=64), keyed (source_schema, source_table, source_id, embedding_model); 512-token chunks / 64 overlap
  • Service rolesvault_mcp / ob1_mcp / trellis_mcp each own their schema; ob1_mcp reads wiki + trellis for reflection synthesis; lovebug is RW everywhere. Isolation enforced at the Postgres role level (verified with positive permission-denied tests).

Where it lives

  • Container homelab-postgres (pgvector/pgvector:pg17), /opt/projects/docker/postgres/, bound to 127.0.0.1:5433, external volume ob1_data, on the homelab Docker network — Proxmox
  • Credentials for the four service roles in /opt/backups/postgres-consolidation/credentials.env (0600) for KeePassXC transcription
  • Pre-migration dumps + rollback runbook in /opt/backups/postgres-consolidation/

History

  • 2026-05-14 — OB1 embedding dim migrated 1536→768 for nomic-embed-text (precursor)
  • 2026-05-15 — Phase 0 recon; Phase 2a landed the wiki + trellis schemas, four service roles, and the empty public.embeddings table inside openbrain, disruption-free
  • 2026-05openbrain renamed to petalbrain; public.thoughtsob1.thoughts; embeddings backfilled; MCP connection strings cut over
  • Open — Phase 8 cleanup: drop the old standalone herbylab / trellis DBs after the verification window