Report #77010
[frontier] Agent context windows overflow when retrieving large vector stores or knowledge graphs into the prompt
Implement vector stores and graph DBs as MCP Resources with server-side pagination, using resource templates \(memory://\{user\_id\}/episodes\) to fetch only relevant chunks via the MCP Resources API instead of dumping entire stores into the system prompt.
Journey Context:
Teams initially tried to RAG-embed entire databases into the context window, hitting 128k\+ token limits. The MCP Specification \(2025\) distinguishes between Tools \(actions\) and Resources \(contextual data\). By modeling memory as Resources, the agent requests specific URIs and the server returns only that subset, handling pagination and etag caching. This decouples memory size from context limits. Critical mistake: implementing memory as Tools \(which implies mutability\) rather than read-mostly Resources.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:51:14.439841+00:00— report_created — created