From da8b47473ff5df561ac5f983cb369129436de8c0 Mon Sep 17 00:00:00 2001 From: Javier Lizarraga Date: Mon, 15 Jun 2026 09:58:50 -0700 Subject: [PATCH 1/2] Initial commit --- Dockerfile | 8 ++++---- agent_memory_server/api.py | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 177519cd..9aca49cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -105,8 +105,8 @@ USER agentmemory EXPOSE 8000 -HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ - CMD curl -f http://localhost:8000/v1/health || exit 1 +# No HEALTHCHECK here — the image is shared by api, mcp, and task-worker which each need +# a different check (or none). Healthchecks are defined per-service in docker-compose.yml. # Enable authentication by default. # You may override with DISABLE_AUTH=true in development. @@ -136,8 +136,8 @@ USER agentmemory EXPOSE 8000 -HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ - CMD curl -f http://localhost:8000/v1/health || exit 1 +# No HEALTHCHECK here — the image is shared by api, mcp, and task-worker which each need +# a different check (or none). Healthchecks are defined per-service in docker-compose.yml. # Enable authentication by default. # You may override with DISABLE_AUTH=true in development. diff --git a/agent_memory_server/api.py b/agent_memory_server/api.py index cefed05f..311235f7 100644 --- a/agent_memory_server/api.py +++ b/agent_memory_server/api.py @@ -772,12 +772,17 @@ async def search_long_term_memory( for key in ( "topics", "entities", - "namespace", "memory_type", "extraction_strategy", "event_date", ): fallback_kwargs.pop(key, None) + # Only drop namespace filter if it is a broad (any/all) filter, not an exact eq match. + # An eq namespace filter means the caller asked a precise question; returning a + # record from the wrong namespace is more harmful than returning zero results. + ns_filter = filters.get("namespace") if filters else None + if ns_filter is None or getattr(ns_filter, "eq", None) is None: + fallback_kwargs.pop("namespace", None) def _vals(f): vals: list[str] = [] From a3ae51e4f433a8d1f270d6a2a8d24e2e215d64ab Mon Sep 17 00:00:00 2001 From: Javier Lizarraga Date: Sat, 4 Jul 2026 08:35:12 -0700 Subject: [PATCH 2/2] Update comment description Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- agent_memory_server/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent_memory_server/api.py b/agent_memory_server/api.py index 311235f7..290d9f4a 100644 --- a/agent_memory_server/api.py +++ b/agent_memory_server/api.py @@ -777,9 +777,9 @@ async def search_long_term_memory( "event_date", ): fallback_kwargs.pop(key, None) - # Only drop namespace filter if it is a broad (any/all) filter, not an exact eq match. - # An eq namespace filter means the caller asked a precise question; returning a - # record from the wrong namespace is more harmful than returning zero results. + # Preserve only an exact namespace eq match in fallback; drop namespace for any other + # namespace filter (any/all/ne/startswith) to widen the search without crossing an + # explicit eq scope boundary. ns_filter = filters.get("namespace") if filters else None if ns_filter is None or getattr(ns_filter, "eq", None) is None: fallback_kwargs.pop("namespace", None)