HexVenn-TGM (HexVenn Temporal Graph Memory) is a local-first memory architecture for AI agents that stores structured MemoryNodes in a bi-temporal graph, retrieves with a hybrid of dense vectors, sparse keywords, and graph traversal, indexes deterministically in hexadecimal, lets memories belong to multiple fuzzy context sets, and reinforces memories that prove useful. Tiers are policies over one system, not separate stores.
The problem with basic RAG memory
Traditional Retrieval-Augmented Generation follows a familiar pattern: chunk the documents, embed the chunks, retrieve the nearest matches, stuff them into the prompt. Basic vector retrieval finds semantic similarity, but it does not naturally understand sequence, causality, contradiction, changing truth, or long-term reinforcement. Microsoft's GraphRAG documentation makes a related point: baseline RAG struggles when a question requires connecting information spread across many documents rather than finding one similar passage.
An agent doesn't only need the nearest paragraph. It needs to answer questions like: What did we decide about this client, and is it still true? What changed since last month? Why did we believe that? A flat vector index is a useful component. It should not be the whole brain.
One memory system, many policies
A key design principle in HexVenn-TGM is that tiers are policies, not separate silos. Instead of building one store for short-term context, another for long-term facts, another for session history, and another for immutable truths, HexVenn-TGM treats every memory as a structured MemoryNode. What differs between working memory, episodic memory, and durable knowledge is the policy applied to the node — retention, reinforcement weight, retrieval priority — not the storage system underneath.
Temporal graphs inside every tier
Because the graph is the substrate, relationships and time are available at every tier. A fresh session note and a two-year-old contract fact live in the same structure; retrieval can traverse from one to the other, and the temporal metadata decides how much each should count right now.
Bi-temporal memory: what was true vs. when we learned it
Every fact carries two timelines: valid time (when it was true in the world) and system time (when the agent learned it). That makes corrections non-destructive — a superseded price stays in history with its validity window closed — and enables replay: reconstruct exactly what the agent believed at any past moment, which is what serious debugging and audit require.
Dense + sparse + graph retrieval
Retrieval runs three signals together: dense vector similarity (meaning), sparse lexical matching (exact terms, names, codes), and graph proximity (relationship distance to the current focus). The combined score adds temporal cohesion, context overlap, reinforcement strength, recency, and confidence — with explicit penalties for staleness and conflict (the full formula is detailed in our architecture field note).
Hexadecimal indexing: deterministic, compact, debuggable
Memory nodes and relationships are addressed with hexadecimal indexing: a compact, deterministic scheme where an address is reproducible and traceable. When an agent recalls the wrong thing, an engineer can follow the exact index path the retrieval took, instead of interrogating an opaque similarity float. Memory you can audit is memory you can improve.
Venn context sets and the reinforcement graph
Venn context sets replace rigid tags: a memory can belong 0.8 to “Project Atlas” and 0.4 to “billing” simultaneously, so retrieval respects overlapping contexts the way real work does. The reinforcement graph closes the loop: memories that lead to verified-good outcomes get stronger; memories that produce corrections decay or get flagged in conflict. Useful memories literally become easier to recall — with the known caveat that reinforcement must be guarded against amplifying bad information, which is why conflict penalties exist alongside it.
Local-first storage: SQLite as the MVP backbone
The first implementation stores everything in SQLite (with FTS5 for sparse retrieval): portable, offline-capable, deterministic, and inspectable in a single file. Distributed vector or graph stores are legitimate later adapters — after a deployment proves it needs them, not before.
A practical retrieval flow
For agents, the payoff compounds: fewer stale-fact answers, continuity across sessions and projects, corrections that stick, and an evidence trail behind every recall. That is what lets an agent be trusted with longer-running work.
How to benchmark it
Memory quality is measurable if you design for it: stale-fact error rate (does it serve superseded truths?), correction persistence (does a fix stay fixed?), contradiction detection (does it flag conflicts instead of blending them?), and retrieval explainability (can an engineer reproduce why a memory fired?). Benchmarks should compare against a flat-vector baseline on the agent's own workload, not on generic question sets.
Frequently asked questions
What is HexVenn-TGM?
HexVenn-TGM (HexVenn Temporal Graph Memory) is a proposed local-first memory architecture for AI agents. It combines temporal graph structure, hybrid retrieval, hexadecimal indexing, fuzzy context sets, and reinforcement scoring into one memory system designed for durable, explainable agent memory.
Is HexVenn-TGM a replacement for RAG?
It replaces basic RAG as the whole memory system, not retrieval itself. Dense and sparse retrieval remain components — HexVenn-TGM adds temporal graphs, bi-temporal facts, context sets, and reinforcement on top, so retrieval answers with evidence about time, relationships, and change, not just text similarity.
Why use temporal graph memory for AI agents?
Because agents work across sessions, projects, tools, users, decisions, corrections, and changing facts. A temporal graph records what happened, what it relates to, when it was true, and when the system learned it — the structure needed to avoid stale facts, contradictions, and unexplained recall.
Why use hexadecimal indexing?
Hexadecimal indexing provides a deterministic, compact, debuggable addressing scheme for memory nodes and relationships. When retrieval misbehaves, engineers can trace exactly which node was addressed and why — a practical requirement for memory you intend to audit.
What should the first implementation use?
Start local-first: SQLite with FTS5 as the storage backbone, normalized graph tables, and embedding blobs — with tiers implemented as policies over one MemoryNode model rather than separate silos. Add distributed vector or graph adapters only when a deployment demonstrably outgrows local storage.
Sources and fact-check notes
HexVenn-TGM is documented from the architecture's own design materials as of September 2026; it is a proposed architecture, and benchmark claims are identified as evaluation plans rather than measured results. The observation about baseline RAG's limits on multi-document questions reflects Microsoft's published GraphRAG documentation. HexVenn-TGM is part of the Custom AI Works local-first AI agent operating-system work by Edward Schechter. Companion reading: HexVenn Temporal Graph Memory Architecture.
Keep reading
Sources and methodology
This article is a practical explainer or technical field note, not a statistical study. It distinguishes design guidance from measured outcomes; future external benchmarks must be linked beside the claim with enough context to interpret them.
Frequently asked questions
What does ai research mean for a business team?
AI Research becomes useful when it is tied to a defined workflow, an accountable owner, and a result the team can observe. The right starting point is not the most impressive technology. It is the smallest useful change that removes a real constraint without hiding risk or creating another system nobody owns.
Where should a team start with ai research?
Start by documenting one repeated process: its trigger, inputs, systems, decisions, exceptions, approval points, and desired output. Measure the current time, delay, error, or missed opportunity before choosing a tool. That baseline makes it possible to compare a pilot with the way the work operates today.
What should remain under human review?
Keep people responsible for unusual, sensitive, expensive, regulated, or relationship-heavy decisions. Automation can prepare context, route work, draft a response, or flag an exception, but the approval boundary should be explicit. The team also needs a way to stop the workflow, correct records, and review what happened.
How should the result be measured?
Choose a small set of operational measures before launch, such as handling time, response delay, exception rate, completed handoffs, rework, or qualified opportunities. Compare the same process over a defined period and include implementation, maintenance, review, and change-management costs instead of reporting gross savings alone.
When does custom implementation make sense?
Custom work makes sense when the process crosses several systems, carries private context, needs reliable approval rules, or cannot be represented by an off-the-shelf workflow. A custom build should still begin with a narrow scope and a clear handoff plan so the business is not trapped in another opaque dependency.
Custom AI Works