--- type: entity path: Wiki/Reference tags: - ob1 - embeddings - pgvector - automation created: 2026-05-08 updated: 2026-05-24 --- # OB1 ## What it is OB1 (Open Brain) is Travis's personal AI memory and retrieval system — a self-hosted **pgvector/pgvector:pg17** Postgres store holding embeddings of session content, project notes, and vault content for semantic recall across AI conversations. It is the fast, voluminous, agent-facing half of the two-system memory model; the [[Wiki/Dev/ai-memory-architecture|wiki-vault]] is the slow, curated, human-facing half. OB1 is forked from the upstream community project `NateBJones-Projects/OB1`. > **Correction (2026-05-24 compile):** earlier versions of this page described OB1 as a "Supabase + pgvector" stack. The postgres-consolidation recon proved that's wrong — OB1 has always been a self-hosted pgvector container (`homelab-postgres`, DB now `petalbrain`), with embeddings from local **Ollama `nomic-embed-text`** (768-d), never Supabase. ## Current state Operational and consolidated into the `petalbrain` Postgres instance. Key facts as of the May 2026 consolidation: - **Storage** — `ob1.thoughts` (raw captures) + `ob1.reflections` (synthesized lessons); embeddings live in the shared `public.embeddings` table (HNSW, vector_cosine_ops, m=16/ef_construction=64), 512-token chunks / 64-token overlap - **Two-layer model** — raw captures + a daily reflection job (`claude-sonnet-4-6` via Anthropic API direct) that synthesizes generalizable lessons, mirroring the wiki's Sources/Wiki split - **Ambient capture** — the [[Sources/Homelab/ob1-jsonl-watcher|ob1-jsonl-watcher]] tails Claude Code / Cowork JSONL session files and posts turn-pairs to OB1's `capture_thought` (replaces the earlier "n8n parallel write" idea) - **Embedding model** — Ollama `nomic-embed-text` (768-d), local; switching requires a full re-embed - **Tailscale-only access** — no public endpoint - **`ob1-watcher` / `ob1-enricher`** daemons; enricher has a known PENDING_QUERY loop bug pending a fix before restart ## Where it lives - **Postgres** — `petalbrain` DB on `homelab-postgres` (pgvector:pg17), Proxmox; schema `ob1`, owned by the `ob1_mcp` service role - **Embeddings** — Ollama (`nomic-embed-text`) on the homelab - **Capture** — `ob1-jsonl-watcher` daemon on herbydev reading `~/.claude` session logs - **Access** — Tailscale-only ## Related projects - [[Sources/Homelab/ob1-main-deployment|ob1-main-deployment]] — full deployment plan (Phases 0–6) - [[Sources/Homelab/ob1-deployment|ob1-deployment]] — addendum (Tailscale, Phase 7 Dispatch hook) - [[Sources/Homelab/ob1-jsonl-watcher|ob1-jsonl-watcher]] — ambient session capture - [[Sources/Homelab/postgres-consolidation-ob1-reflection-layer|postgres-consolidation-ob1-reflection-layer]] — consolidation + reflection layer - [[Sources/Homelab/postgres-consolidation-followups|postgres-consolidation-followups]] — reflector activation + cleanup - [[Sources/Dev/ai-memory-architecture-research|ai-memory-architecture-research]] — architecture research session - [[Wiki/Reference/tailscale|tailscale]] — access layer - [[Wiki/Dev/ai-memory-architecture|ai-memory-architecture]] — synthesis page ## History - **2026** — Architecture research: pgvector, harness vs model layers, Poolside/Pi.dev reviewed - **2026** — Deployment (Phases 0–6); pgvector container + Ollama embeddings; Tailscale-only - **2026-05-14** — Embedding dim migrated 1536→768 for `nomic-embed-text`; `ob1-jsonl-watcher` plan written - **2026-05-15** — Consolidated into `petalbrain`; `ob1.thoughts` + shared `public.embeddings`; reflection layer designed - **2026-05-18** — Dispatch subprocess-leak incident reinforced the case for harness-owned subprocess lifecycle