session #00417 · live

A memory stronghold for your AI coding agent.

Deploy once. Every session your team's agents have — Claude Code, Codex, Copilot, Kiro — flows into one Postgres knowledge graph. Next session, every agent walks in already briefed.

Enterprise deployment. We handle the rollout — Postgres provisioning, Entra JWT wiring, namespace setup, and CLAUDE.md bootstrap. Contact us to get started.
Contact us ↗
What Borg knows about this project, right now
LIVE GRAPH NEIGHBORHOOD · ns=product-engineering
mentionsmentionsuses_patterndepends_onpersists_tovalidatesWebhook GatewayWebhook RuleHMAC PatternBackground JobsPostgresep · 2026-03-01 · claude-code
entity fact (typed predicate) episode
TASK SUCCESS — ENGINEERING-TASK BENCH10/ 10Borg-compiled context completes every task. No-memory baseline: 0/10.
RETRIEVAL PRECISION91.3%+12.7 pts over top-10 vector RAG. Measured against labeled ground-truth.
STALE-FACT RATE−78%Temporal supersession keeps contradicted decisions out of compiled context.
borg_think · classify → retrieve → rank → compilepostgres-native · pgvector · recursive CTEmulti-profile retrieval · reciprocal rank fusion24 canonical predicates3-pass entity resolution7 MCP tools · think · learn · recall · fetch · delete · guard · summarizeclaude code · codex · copilot · kirovalid_from / valid_until supersessionentra JWT · RBAC · namespace isolation15 tables · 1 function78% fewer stale facts vs RAGborg_think · classify → retrieve → rank → compilepostgres-native · pgvector · recursive CTEmulti-profile retrieval · reciprocal rank fusion24 canonical predicates3-pass entity resolution7 MCP tools · think · learn · recall · fetch · delete · guard · summarizeclaude code · codex · copilot · kirovalid_from / valid_until supersessionentra JWT · RBAC · namespace isolation15 tables · 1 function78% fewer stale facts vs RAG
§ 01 — THE LOOP

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.

Illustrative trace · claude-code · ns: product-engineering
task: debuggraph_neighborhoodepisode_recallrrf_merge
Classify intent · debug
0.92 / 0.31
Retrieve across 2 profiles
graph · episodes
Fuse with RRF, rank 14, select 6
relevance · recency · stability · prov.
Compile XML for claude
1,840 tokens
Audit log + access tracking
12 ms
§ 02 — WHAT'S INSIDE

Six decisions,
one system.

Every capability below ships in the commercial Borg enterprise deployment. Read the full tradeoffs on /features.

01

Knowledge Graph Extraction

An LLM pipeline turns conversations into typed entities, temporal facts, and reusable procedures — with three-pass resolution that prefers fragmentation over collision.
Graph is mergeable. Collisions are not.
MODEL · gpt-5-mini
CAP · 10 entities / ep.
THRESH · 0.92 semantic
02

Temporal Facts with Supersession

Every fact carries valid_from and valid_until. New contradictions mark old facts superseded — never deleted. Compliance queries still see history; working memory doesn't.
78% fewer stale facts in bench C vs RAG.
STATUSES · 7
PREDICATES · 24 canonical
HISTORY · bitemporal
03

Task-Specific Compilation

Dual-profile intent classification picks what kind of memory a query needs. Debug gets episodic + procedural. Architecture gets semantic facts. Compliance excludes procedural entirely.
Weights bias ranking, not hard excludes.
PROFILES · 2
FORMATS · XML · JSON
BUDGET · per namespace
04

Inspectable Ranking

Four orthogonal scores — relevance, recency, stability, provenance — surfaced individually. Every compilation emits an audit trail of selected, rejected, and why. No opaque composites.
The audit log is the debugger.
DIMENSIONS · 4
AUDIT · borg_audit_log · pgAudit
OPS · compile trace · write · DDL
05

Namespace Isolation

Hard by default: every entity, fact, and episode belongs to exactly one namespace. Core memory retrieval is namespace-scoped. Per-namespace token budgets keep projects separate.
Tenant-wide inspection requires explicit admin permission.
MODE · hard
BUDGETS · token-per-ns
ACCESS · group · permission checked
06

PostgreSQL Maximalism

One database. Graph via recursive CTE. Embeddings via pgvector. Audit via pgAudit. No Qdrant. No Neo4j. No sync daemons. Runs on Supabase, Neon, managed Postgres, or your laptop.
Nothing gets out of sync if there is nothing to sync.
TABLES · 15 + 1 fn
EXT · pgvector · pgAudit
MIN · PG 14
§ 03 — MCP SURFACE

Seven tools.
Full surface.

Seven MCP tools covering the full write/read/delete/guard surface. Works unchanged across Claude Code, Codex CLI, Copilot, Kiro, and anything else that speaks MCP over streamable HTTP.

borg_thinkcompile

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"
)
borg_learnrecord

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"
)
borg_recallbrowse

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"
)
borg_get_episodefetch

Fetch a specific episode by ID. Returns the full stored content and metadata. Useful for audit trails and deep-linking into prior sessions.

borg_get_episode(
episode_id: "11111111-1111-1111-1111-111111111111"
)
borg_forgetdelete

Soft-delete episodes, facts, entities, or procedures. Marks records deleted with reason and timestamp; episode deletion can cascade to derived memory.

borg_forget(
target_type: "episode",
target_id: "11111111-1111-1111-1111-111111111111",
namespace: "product-engineering",
reason: "contains sensitive credentials"
)
borg_guardguard

Risk-assess a proposed action against stored facts. Returns risk level, contradicting facts, and recommended decision. Prevents the agent from repeating known-bad moves.

borg_guard(
action: "drop table events",
namespace: "product-engineering",
proposed_change: "remove the events table in migration 42"
)
borg_project_summarysummarize

Generate a deterministic project summary from stored facts, decisions, and episodes. Stable output for CLAUDE.md bootstrapping, onboarding, and context priming.

borg_project_summary(
namespace: "product-engineering"
)
§ 04 — THE LANDSCAPE

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.

Mem0ZepCogneeBorg
Databases requiredQdrant + Neo4jNeo4j + vectors3+1 · Postgres
IntegrationPython SDKPython SDKPython SDK1 line in CLAUDE.md
Retrieval outputRaw resultsRaw resultsRaw resultsCompiled ranked context
Stale-fact handlingNoneTemporal (Neo4j)NoneTemporal · supersession
Cross-client reusePer SDKPer SDKPer SDKAny MCP client, same DB
Audit + inspectLimitedPartialLimitedFull trace, per compile
LicenseMixedMixedOpenCommercial
§ 05 — THE BENCH

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.

Condition A

No memory

Baseline — every session starts from zero.

Task success0/ 10
Retrieval precision6.0%
Stale-fact rate0.0%
Condition B

Top-10 vector RAG

Standard similarity search over conversation chunks.

Task success8/ 10
Retrieval precision81.0%
Stale-fact rate11.5%
Condition C

Borg · compiled

Full pipeline: classify, retrieve, rank on 4 dims, compile.

Task success10/ 10
Retrieval precision91.3%
Stale-fact rate2.5%
— install it now —

One command. One Postgres.
Every session after, smarter.

Enterprise-ready. Entra JWT auth, RBAC, audit logging, namespace isolation. Runs on any managed Postgres.

Enterprise deployment. We handle the rollout — Postgres provisioning, Entra JWT wiring, namespace setup, and CLAUDE.md bootstrap. Contact us to get started.
Contact us ↗
view on github