From a5a07d711b5adf0895c6d9d8b8df70750ecbbb02 Mon Sep 17 00:00:00 2001 From: Prateek Chhikara <46902268+prateekchhikara@users.noreply.github.com> Date: Thu, 12 Jun 2025 23:34:38 -0700 Subject: [PATCH] Updates in client to support summary (#2951) --- mem0/client/main.py | 16 ++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mem0/client/main.py b/mem0/client/main.py index 5bdf9210..e7bc245c 100644 --- a/mem0/client/main.py +++ b/mem0/client/main.py @@ -472,6 +472,22 @@ class MemoryClient: capture_client_event("client.get_memory_export", self, {"keys": list(kwargs.keys()), "sync_type": "sync"}) return response.json() + @api_error_handler + def get_summary(self, filters: Optional[Dict[str, Any]] = None) -> Dict[str, Any]: + """Get the summary of a memory export. + + Args: + filters: Optional filters to apply to the summary request + + Returns: + Dict containing the export status and summary data + """ + + response = self.client.post("/v1/summary/", json=self._prepare_params({"filters": filters})) + response.raise_for_status() + capture_client_event("client.get_summary", self, {"sync_type": "sync"}) + return response.json() + @api_error_handler def get_project(self, fields: Optional[List[str]] = None) -> Dict[str, Any]: """Get instructions or categories for the current project. diff --git a/pyproject.toml b/pyproject.toml index 1bed7579..b1232451 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "mem0ai" -version = "0.1.107" +version = "0.1.107r1" description = "Long-term memory for AI Agents" authors = [ { name = "Mem0", email = "founders@mem0.ai" }