Updated
What's the difference between agent memory and retrieval (RAG)?
Agent memory is what an agent retains about its own past — working state during a run, plus episodic, semantic, and procedural memories of earlier sessions. RAG fetches the most relevant chunks from a corpus at query time. Memory is recall of your own history; RAG is on-demand lookup. They solve different problems — and neither one gives a fleet of agents a single current source of truth.
Memory is recall; RAG is fetch
Agent memory answers "what do I already know from before?" — the current run's working context, plus stores of past events (episodic), facts (semantic), and how-to (procedural). It's keyed to one agent's experience.
RAG answers "what in this corpus is relevant to the question right now?" It embeds your query, finds the top-k most similar chunks, and feeds them to the model. It doesn't care whose past it came from; it cares about similarity. RAG is frequently the read mechanism a long-term memory uses — but retrieval and memory are still different jobs, and people conflate them constantly.
What both leave open
Here's the gap neither closes on its own: which doc is current and authoritative? Per-agent memory drifts — two agents remember two versions of the same procedure. RAG ranks by similarity, so it will happily return last quarter's postmortem and a duplicate wiki page alongside the right one. In a single-agent toy that's tolerable. Across a fleet of agents touching the same repo, it's how they quietly disagree.
The missing layer: a shared source of truth
A canonical context layer is the part memory and RAG don't provide: one shared store that serves the single current, authoritative doc per topic — marked canonical, stale, or duplicate by a freshness marker — that every agent reads from and writes back to. It's not a smarter similarity search and it's not a bigger memory; it's the team's current truth, shared.
trovex is that layer. It indexes your docs and returns the one current section that answers a query as a path:line pointer with a freshness marker, and lets agents write canonical records back through one shared point. Serving the one current section instead of a similarity pile is about 60% fewer tokens per lookup. It runs locally — SQLite + ONNX, no cloud, no keys — and sits alongside your agent's memory and any RAG stack, not in place of them.
FAQ
Is RAG a type of agent memory?
Not quite. RAG is a retrieval method — it fetches relevant chunks from a corpus at query time. Memory is what the agent retains about its own past runs, facts, and procedures. RAG is often the read mechanism a long-term memory uses, but retrieval and memory are different jobs.
Do AI agents need a canonical source of truth?
If more than one agent or session touches the same docs, yes. Per-agent memory drifts and RAG returns whatever is most similar, including stale copies. A canonical source of truth is one shared store that serves the single current, authoritative doc per topic and is written back to, so the whole fleet works from the same current knowledge.
Can you use memory, RAG, and a canonical source of truth together?
Yes, and most real systems do. Memory keeps an agent's own state, RAG fetches from a corpus, and a canonical context layer is the shared current truth all agents read and write back to. trovex is that shared layer; it does not replace an agent's working memory.
Give your agents one current source of truth.
One canonical answer per query, with a freshness marker — in about a minute.
uv tool install git+https://github.com/TsukumoHQ/trovex
Open source. No cloud, no API keys. Your docs never leave your machine.