Persistent memory
A real database — not the context window — holding every fact, decision, source, and preference. It survives restarts and time. The model forgets; the store doesn't.
Most AI tutorials stop at the stateless briefing: read an inbox, summarize, repeat. This is the playbook for the next layer — a system that remembers, maps how everything connects, and improves itself from feedback. Part 1 is the methodology, buildable on any stack. Part 2 lands it on Open Brain. Part 3 stands it up on a machine you own.
Three pillars. Miss any one and you're back to a briefing bot. Together they compound.
A real database — not the context window — holding every fact, decision, source, and preference. It survives restarts and time. The model forgets; the store doesn't.
People, projects, tools, ideas, and the edges between them. This is what lets the system answer "what connects to what" and "have we done this before" — questions a flat list can't.
Capture what landed and what didn't, turn it into rules and patterns, fold it back in. This is the pillar that makes the thing compound instead of plateau.
A read-email-and-summarize bot is exactly as good on day 100 as on day 1, because it keeps no state and learns nothing. The moment you add durable memory + relationships + feedback, day 100 is dramatically better than day 1 — and the gap widens. The asset isn't the code; it's the accumulated, connected, feedback-tuned data underneath it. Time becomes a moat you can't be shortcut on.
The pattern is portable. Minimum viable version:
Open Brain is further along than most people realize. It already has persistent Postgres memory, semantic search, and a real, typed, time-aware knowledge graph. The one pillar it hasn't closed yet is the self-improvement loop — the feedback signal that re-ranks what gets surfaced based on what actually worked. Here's the honest map, then the recipes, built in OB1's existing extension/recipe format.
pgvector semantic search (1536-dim) · agent-memory schema · and a genuine knowledge graph across three pieces:
ob-graph — a clean manual graph (graph_nodes / graph_edges) you build via MCP calls.entity-extraction — automatic entities (people, projects, tools, orgs, places) + typed edges (works_on, co_occurs_with, uses, member_of…) with support counts and confidence, an async queue, and a trigger that enqueues new thoughts.typed-reasoning-edges — thought-to-thought reasoning edges (supports, contradicts, supersedes, depends_on…) with temporal validity + decay, so relationships age out without losing history.provenance-chains and an entity-wiki recipe that already renders pages from the knowledge graph. The graph isn't missing — it's good.
Because OB1's graph lives in plain Postgres tables (thought_edges, edges, graph_edges), multi-hop "everything connected to X" is a recursive query — no new engine, no migration. This recipe ships the traversal helpers OB1 doesn't bundle yet, respecting the temporal-validity columns so decayed edges drop out automatically.
Recursive multi-hop walks over OB1's existing typed edges — the "pull in everything connected" primitive, built on what's already there.
recursive CTEmulti-hop recalltemporal-aware-- "Everything connected to a thought, up to 3 hops,
-- skipping edges that have decayed out (valid_until set)."
WITH RECURSIVE connected AS (
SELECT to_thought_id AS id, relation, 1 AS hop
FROM thought_edges
WHERE from_thought_id = :start_id
AND valid_until IS NULL
UNION ALL
SELECT e.to_thought_id, e.relation, c.hop + 1
FROM thought_edges e
JOIN connected c ON e.from_thought_id = c.id
WHERE c.hop < 3
AND e.valid_until IS NULL
)
-- DISTINCT ON keeps one row per thought at its nearest hop
SELECT DISTINCT ON (t.id) t.*, c.hop
FROM connected c
JOIN thoughts t ON t.id = c.id
ORDER BY t.id, c.hop;
entities/edges into an AGE graph only if the ergonomics are worth it to you.
The genuinely missing pillar. A lightweight extension that captures a feedback signal on anything OB1 surfaces, writes it back, and re-ranks future retrieval + output.
One-tap feedback on any surfaced item → stored as a signal → used to re-weight retrieval and prompt the next pass. The thing that makes OB1 compound.
feedback capturere-rankingself-improvementCREATE TABLE IF NOT EXISTS feedback_signals (
id bigserial PRIMARY KEY,
thought_id bigint REFERENCES thoughts(id),
signal text NOT NULL, -- 'used' | 'dismissed' | 'loved' | 'wrong'
weight real NOT NULL DEFAULT 1,
note text,
created_at timestamptz DEFAULT now()
);
-- A retrieval view that boosts what's worked before
CREATE OR REPLACE VIEW ranked_thoughts AS
SELECT t.*,
coalesce(sum(f.weight) FILTER (WHERE f.signal IN ('used','loved')), 0)
- coalesce(sum(f.weight) FILTER (WHERE f.signal IN ('dismissed','wrong')), 0)
AS feedback_score
FROM thoughts t
LEFT JOIN feedback_signals f ON f.thought_id = t.id
GROUP BY t.id;
Tie the three together: a retrieval primitive that blends semantic similarity (pgvector, already there), graph proximity (the traversal in Recipe 1, over edges already there), and feedback score (Recipe 2, the one new piece) into a single ranked context payload. This is the whole methodology expressed as one OB1 query path — and it's what turns "Open Brain" from a brain that stores into a brain that learns.
You don't need a cloud or any particular product to run this. The entire methodology fits on a single always-on computer you own — a Mac Mini in the corner, a spare laptop, a mini PC, even a Raspberry Pi. That's exactly how the system behind the daily briefs runs: a Mac Mini that never sleeps. Here's the blueprint, mapped to the three pillars.