managed-memory: search-first recall via the new entries:search tool#248
Draft
kevinyan122 wants to merge 1 commit into
Draft
managed-memory: search-first recall via the new entries:search tool#248kevinyan122 wants to merge 1 commit into
kevinyan122 wants to merge 1 commit into
Conversation
Add search_memory as the sixth tool and make it the primary recall path, replacing list_memories -> get_memory. The tool prompt documents the lexical (BM25) query contract (question or keywords, words expected to appear in the memory itself, top_k default 10 / max 50) and that results inline full contents. get_memory and list_memories are demoted to fallbacks; save dedup now searches first. MEMORY_INSTRUCTIONS rewritten to match. Document unbounded scores, the write->searchable index lag, and a fallback for workspaces where entries:search hasn't rolled out. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
search_memoryas a sixth tool to the managed-memory skill and makes it the primary recall path, replacing the previouslist_memories→get_memoryflow (which was documented as a stopgap until search shipped). Synced to all 5 templates that carry the skill.entries:searchAPI: a natural-language question or keywords both work, phrased with the words you'd expect to appear in the memory itself;top_kdefault 10, max 50; results come back ranked with full contents inlined, so recall is a single call with noget_memoryfollow-up.get_memory/list_memoriesdemoted to fallbacks (exact-path reads of[has_contents]entries; full-inventory asks like "what do you remember about me?").MEMORY_INSTRUCTIONSrewritten to match: search-first recall, empty-result semantics (nothing matched those words ≠ nothing stored), raisetop_kor fall back tolist_memoriesfor very broad questions.list/getsee them immediately); fallback guidance for workspaces whereentries:searchhasn't rolled out yet.Testing
Dogfooded on
agent-langgraph-advancedagainst a staging workspace (storekevinyan.default.kevin_test), locally and deployed to Databricks Apps with OBO scope resolution:list_memoriesfor inventory asks.🤖 Generated with Claude Code