# Record
**Author:** @cameron.stream (`did:plc:gfrmhdmjvxn2sjedzboeudef`)

## `knowledge-routing-based-agent-memory`
**Collection:** `site.standard.document`
**AT URI:** `at://did:plc:gfrmhdmjvxn2sjedzboeudef/site.standard.document/knowledge-routing-based-agent-memory`

**Title:** Routing-Based Agent Memory
**Published:** Mon, 20 Jul 2026 23:58:00 GMT
**Updated:** Mon, 20 Jul 2026 23:15:00 GMT
**Description:** Selecting memory stores and canonical sources by query, authority, and cost instead of searching every past item uniformly.
**Publication:** `at://did:plc:gfrmhdmjvxn2sjedzboeudef/site.standard.publication/3mr4py6clps2f`
**Path:** /routing-based-agent-memory
**Tags:** knowledge, practice, ai, agents, memory, retrieval, context-engineering

**Content:**
````json
{
  "text": "Routing-based agent memory is an architecture for selecting which memory sources to consult before selecting individual items inside them. It treats retrieval as a decision problem over stores, authorities, and semantic roles rather than as one similarity search over the entire past.\n\nThe central failure is activation rather than storage: an important fact can exist in durable memory and still fail to shape the turn that needs it. [Persistent agent memory](https://cameron.stream/knowledge/persistent-agent-memory) therefore requires a routing layer between the repository and the model's active context.\n\n## Store routing and item retrieval\n\nTwo decisions are often conflated:\n\n1. **Store routing** selects eligible sources such as current project state, user profile, conversation history, episodic memory, skills, or public documentation.\n2. **Item retrieval** ranks records within the selected source using lexical, semantic, temporal, graph, or structured queries.\n\nThe distinction matters because different stores have different authority, privacy, freshness, and cost. A nearest-neighbor result from an old timeline should not silently outrank a canonical current-state file merely because its wording resembles the question.\n\nRecent research systems also frame long-term memory as a routing problem. The 2026 “Right Pocket” preprint separates source selection from within-store ranking and studies the tradeoff between answer coverage and retrieval cost. It is useful evidence for selective routing, but it does not establish one universal store taxonomy or prove the canonical-ownership method described here.\n\n## A retrieval router\n\nA retrieval router is a decision table rather than a directory listing. A practical route records:\n\n- the domain or task class;\n- positive triggers;\n- negative triggers that prevent tangential loading;\n- sources to consult in order;\n- the canonical owner when sources disagree;\n- a retrieval budget or escalation rule;\n- privacy and consequence constraints.\n\n```text\ncurrent project status\n  -> live repository state\n  -> project current-state note\n  -> older timeline only if history is needed\n\nnamed person or relationship\n  -> current person record\n  -> relevant event history\n  -> do not infer from unrelated high-salience memories\n```\n\nThe route changes the first action. If it merely lists files without affecting selection order, it is a sitemap wearing an important hat.\n\n## Canonical ownership\n\nCanonical ownership assigns responsibility for a type of state to one source. Other notes can link to or summarize that source without becoming peers that silently compete with it.\n\nFor example:\n\n```text\ncurrent state     -> current-state record\nhistorical events -> timeline\ndurable profile   -> profile record\nprocedure         -> skill or runbook\n```\n\nWhen sources disagree, the system retrieves the owner, evaluates whether the newer evidence changes it, and repairs stale copies or pointers. Canonical ownership does not mean one file contains all knowledge. It means one source is accountable for staying current within a declared scope.\n\n## Forced lookup and budgets\n\nRouting works only if the agent consults it before drafting from recognition. A minimal gate asks:\n\n1. What domain is this request in?\n2. Which source owns that domain?\n3. Did the agent inspect that source or live system?\n4. If not, is the resulting uncertainty explicit?\n\nLookup should scale with stakes. A trivial acknowledgment needs no archive expedition. A claim about a current deployment, named person, file, or previous decision should contact the source of truth. Retrieval ceremony that makes every exchange slow is another routing bug.\n\n## Repairing retrieval failures\n\nWhen a stored fact fails to activate, the repair question is not only “how can the instruction be made louder?” It is:\n\n- Was the domain classified incorrectly?\n- Did the router omit the canonical source?\n- Was the file description too vague to retrieve?\n- Did several files claim ownership?\n- Did compaction remove the open obligation or retrieval cue?\n- Did the source move without updating its reference?\n\nThe durable fix changes routing, ownership, metadata, or representation. A repeated scolding sentence in a system prompt can increase noise without repairing any of them.\n\n## Relationship to other memory methods\n\nRouting complements semantic search, graph traversal, recency, and model-generated query plans. It decides where those techniques may operate and which evidence should win when their outputs conflict. [Context repositories](https://cameron.stream/knowledge/context-repositories) provide the state; routing governs access to it; [context compaction](https://cameron.stream/knowledge/context-compaction) determines which selected state remains immediately active.\n\n## Sources\n\n- [What does good AI memory feel like?](https://cameron.stream/co-3)\n- [MemGPT: Towards LLMs as Operating Systems](https://arxiv.org/abs/2310.08560)\n- [Did You Check the Right Pocket? Cost-Sensitive Store Routing for Memory-Augmented Agents](https://arxiv.org/abs/2603.15658)",
  "$type": "site.standard.content.markdown",
  "version": "1.0"
}
````

---
*Fetched from https://enoki.us-east.host.bsky.network via `com.atproto.repo.getRecord`*