A memory stronghold for your AI coding agent.
Install once. Every session your agent has — Claude Code, Codex, Copilot, Kiro — flows into one Postgres knowledge graph. Next session, it walks in already briefed.
Not search.
Compilation.
Every borg_think call runs the same five-stage pipeline: classify the intent, retrieve across facts / episodes / graph, rank on four dimensions, compile for the target model, log the trace. You see every candidate and why it was picked or rejected.
Six decisions,
one system.
Every choice below ships in the open-source release under Apache 2.0. Read the full tradeoffs on /features.
Knowledge Graph Extraction
Temporal Facts with Supersession
Task-Specific Compilation
Inspectable Ranking
Namespace Isolation
PostgreSQL Maximalism
Three tools.
Not five.
The entire interaction surface is three MCP tools. Works unchanged across Claude Code, Codex CLI, Copilot, Kiro, and anything else that speaks MCP over streamable HTTP.
Compile context for a query. Runs the full online pipeline — classify, retrieve, rank, compile — and returns a ranked, token-budgeted context package.
borg_think(
query: "debug webhook delivery timeout",
namespace: "product-engineering",
model: "claude",
task_hint: "debug"
)
Record a decision or discovery. Stored immediately, extraction runs async. Returns in milliseconds so nothing blocks the agent loop.
borg_learn(
content: "Versioned event payloads via schema registry…",
source: "claude-code",
namespace: "product-engineering"
)
Direct memory search without compilation. Raw episodes, facts, and procedures — for UI, audits, or you-the-developer.
borg_recall(
query: "release checklist",
namespace: "product-engineering",
memory_type: "semantic"
)
Everyone else returns results.
Borg returns context.
Every competitor wraps 2–3 databases and hands the agent raw matches. Borg is one Postgres that compiles.
| Mem0 | Zep | Cognee | Borg | |
|---|---|---|---|---|
| Databases required | Qdrant + Neo4j | Neo4j + vectors | 3+ | 1 · Postgres |
| Integration | Python SDK | Python SDK | Python SDK | 1 line in CLAUDE.md |
| Retrieval output | Raw results | Raw results | Raw results | Compiled ranked context |
| Stale-fact handling | None | Temporal (Neo4j) | None | Temporal · supersession |
| Cross-client reuse | Per SDK | Per SDK | Per SDK | Any MCP client, same DB |
| Audit + inspect | Limited | Partial | Limited | Full trace, per compile |
| License | Mixed | Mixed | Open | Apache 2.0 |
Ten tasks.
Three conditions.
Modeled on real cloud-infrastructure engineering work — incident response, schema migration, architecture review. Each condition runs the same evaluator against the same ground-truth labels. Seeds + code: /bench.
No memory
Baseline — every session starts from zero.
Top-10 vector RAG
Standard similarity search over conversation chunks.
Borg · compiled
Full pipeline: classify, retrieve, rank on 4 dims, compile.
Three long reads.
One system.
Written for staff engineers and eng leaders. No buzzwords, no emoji, no filler.
Features, with tradeoffs.
Every capability plus the decision it implies. Read why fragmentation beats collision, how supersession settles contradictions, and where the 24 predicates come from.
open ↗/architecture15 tables. One schema.
Reference layout, end-to-end schema, deployment topology, failure modes. Every table separates canonical data from serving state.
open ↗/scienceWhy this works.
Grounded in Tulving's episodic/semantic split, Fellegi-Sunter record linkage, bitemporal data, and the Lost-in-the-Middle paper. Memory is not a search problem.
open ↗One command. One Postgres.
Every session after, smarter.
Apache 2.0. Single-user, local-first, bring your own key. Shared-deployment auth is on the roadmap.