-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Open
Copy link
Description
Problem
The core Agent Memory Server supports a richer retrieval surface than the MCP layer and some higher-level client entry points. SearchRequest now supports keyword/hybrid search, episodic event_date filters, recency-aware reranking, and server-side recency options, but MCP wrappers and LLM tool-resolution paths still expose or forward only an older subset.
This creates silent behavior drift: MCP-first agents and LLM tool calls appear to support newer retrieval modes, but frequently fall back to semantic-only behavior or cannot express the newer modes at all.
Confirmed gaps
search_memorytool schema advertisessearch_mode,hybrid_alpha,text_scorer,offset, andoptimize_query, but_resolve_search_memory()drops them before callingsearch_memory_tool().- MCP
memory_promptdoes not acceptsearch_mode,hybrid_alpha, ortext_scorer, and also omitsevent_date, recency params, andserver_side_recencywhen constructingSearchRequest. - MCP
search_long_term_memoryexposes hybrid params but still omitsevent_date, recency params, andserver_side_recency. FastMCP.call_tool()still injects default namespace forhydrate_memory_promptinstead ofmemory_prompt.- MCP
memory_promptalways constructslong_term_search, so it cannot express:- session-only prompt hydration
- the REST
long_term_search=Trueshortcut - a cleaner separation between working-memory session scope and long-term search session filters
- MCP
get_working_memorylacksnamespace,user_id,model_name, andcontext_window_max, and its not-found behavior differs from REST. - Entire REST capabilities have no MCP equivalent today:
- forgetting
- list sessions
- delete working memory
- summary-view CRUD/run/list
- task status
hydrate_memory_prompt()in the Python client also lags the core search surface and cannot express hybrid/event-date/recency controls.
Impact
- LLMs requesting keyword or hybrid retrieval through tool resolution silently get semantic search instead.
- MCP agents cannot use episodic/event-date filtering or recency-aware retrieval that REST already supports.
- Namespaced MCP transports may fail to auto-scope
memory_prompt. - MCP-first consumers cannot access some important server features at all, especially forgetting and summary-view/task workflows.
- Test coverage is concentrated on direct REST/client search methods, so parity regressions in MCP and hydration/tool-resolution layers can slip through.
Proposed solution
- Treat MCP wrappers as thin adapters over
SearchRequestandMemoryPromptRequestrather than hand-maintained parameter subsets. - Bring MCP
search_long_term_memoryandmemory_promptto fullSearchRequestparity:search_modehybrid_alphatext_scorerevent_daterecency_*server_side_recency
- Fix namespace injection to target
memory_prompt. - Extend MCP
memory_promptso it can represent REST’s three modes cleanly:- session only
- default long-term search (
true) - explicit long-term search payload
- Decide whether MCP
get_working_memoryshould match REST semantics or remain a documented convenience tool with intentional differences. - Add MCP equivalents for the currently missing REST features, or explicitly document them as out of scope if that is intentional.
- Update Python docs/examples to match the actual client API and hydration surface.
Acceptance criteria
- MCP and REST accept the same retrieval controls for search and prompt hydration.
- Tool-resolution and convenience client paths forward the same parameters they advertise.
- Namespaced MCP transports scope
memory_promptcorrectly. - Regression tests cover hybrid, recency, episodic filters, and
memory_promptmode selection across MCP and client tool-resolution/hydration paths.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels