The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
Formatting and version bump -> 0.1.82 (#2507)
Dev Khant93f34e4116f8
diff --git a/mem0/memory/graph_memory.py b/mem0/memory/graph_memory.pyindex 30de95b3d..4b32b748b 100644--- a/mem0/memory/graph_memory.py+++ b/mem0/memory/graph_memory.py@@ -167,7 +167,9 @@ class MemoryGraph:for item in search_results["tool_calls"][0]["arguments"]["entities"]:entity_type_map[item["entity"]] = item["entity_type"]except Exception as e:- logger.exception(f"Error in search tool: {e}, llm_provider={self.llm_provider}, search_results={search_results}")+ logger.exception(+ f"Error in search tool: {e}, llm_provider={self.llm_provider}, search_results={search_results}"+ )entity_type_map = {k.lower().replace(" ", "_"): v.lower().replace(" ", "_") for k, v in entity_type_map.items()}logger.debug(f"Entity type map: {entity_type_map}")diff --git a/mem0/memory/main.py b/mem0/memory/main.pyindex 5d919f262..b287d2be7 100644--- a/mem0/memory/main.py+++ b/mem0/memory/main.py@@ -12,14 +12,12 @@ from pydantic import ValidationErrorfrom mem0.configs.base import MemoryConfig, MemoryItemfrom mem0.configs.enums import MemoryType-from mem0.configs.prompts import (PROCEDURAL_MEMORY_SYSTEM_PROMPT,- get_update_memory_messages)+from mem0.configs.prompts import PROCEDURAL_MEMORY_SYSTEM_PROMPT, get_update_memory_messagesfrom mem0.memory.base import MemoryBasefrom mem0.memory.setup import setup_configfrom mem0.memory.storage import SQLiteManagerfrom mem0.memory.telemetry import capture_event-from mem0.memory.utils import (get_fact_retrieval_messages, parse_messages,- parse_vision_messages, remove_code_blocks)+from mem0.memory.utils import get_fact_retrieval_messages, parse_messages, parse_vision_messages, remove_code_blocksfrom mem0.utils.factory import EmbedderFactory, LlmFactory, VectorStoreFactory# Setup user config@@ -638,7 +636,9 @@ class Memory(MemoryBase):try:from langchain_core.messages.utils import convert_to_messages # type: ignoreexcept Exception:- logger.error("Import error while loading langchain-core. Please install 'langchain-core' to use procedural memory.")+ logger.error(+ "Import error while loading langchain-core. Please install 'langchain-core' to use procedural memory."+ )raiselogger.info("Creating procedural memory")diff --git a/poetry.lock b/poetry.lockindex 52642a900..831ca4e96 100644--- a/poetry.lock+++ b/poetry.lock@@ -48,56 +48,6 @@ files = [{file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"},]-[[package]]-name = "azure-common"-version = "1.1.28"-description = "Microsoft Azure Client Library for Python (Common)"-optional = false-python-versions = "*"-groups = ["main"]-files = [- {file = "azure-common-1.1.28.zip", hash = "sha256:4ac0cd3214e36b6a1b6a442686722a5d8cc449603aa833f3f0f40bda836704a3"},- {file = "azure_common-1.1.28-py2.py3-none-any.whl", hash = "sha256:5c12d3dcf4ec20599ca6b0d3e09e86e146353d443e7fcc050c9a19c1f9df20ad"},-]--[[package]]-name = "azure-core"-version = "1.32.0"-description = "Microsoft Azure Core Library for Python"-optional = false-python-versions = ">=3.8"-groups = ["main"]-files = [- {file = "azure_core-1.32.0-py3-none-any.whl", hash = "sha256:eac191a0efb23bfa83fddf321b27b122b4ec847befa3091fa736a5c32c50d7b4"},- {file = "azure_core-1.32.0.tar.gz", hash = "sha256:22b3c35d6b2dae14990f6c1be2912bf23ffe50b220e708a28ab1bb92b1c730e5"},-]--[package.dependencies]-requests = ">=2.21.0"-six = ">=1.11.0"-typing-extensions = ">=4.6.0"--[package.extras]-aio = ["aiohttp (>=3.0)"]--[[package]]-name = "azure-search-documents"-version = "11.5.2"-description = "Microsoft Azure Cognitive Search Client Library for Python"-optional = false-python-versions = ">=3.8"-groups = ["main"]-files = [- {file = "azure_search_documents-11.5.2-py3-none-any.whl", hash = "sha256:c949d011008a4b0bcee3db91132741b4e4d50ddb3f7e2f48944d949d4b413b11"},- {file = "azure_search_documents-11.5.2.tar.gz", hash = "sha256:98977dd1fa4978d3b7d8891a0856b3becb6f02cc07ff2e1ea40b9c7254ada315"},-]--[package.dependencies]-azure-common = ">=1.1"-azure-core = ">=1.28.0"-isodate = ">=0.6.0"-typing-extensions = ">=4.6.0"-[[package]]name = "backoff"version = "2.2.1"@@ -394,7 +344,7 @@ description = "Lightweight in-process concurrent programming"optional = falsepython-versions = ">=3.7"groups = ["main"]-markers = "python_version < \"3.14\" and (platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\")"+markers = "(platform_machine == \"aarch64\" or platform_machine == \"ppc64le\" or platform_machine == \"x86_64\" or platform_machine == \"amd64\" or platform_machine == \"AMD64\" or platform_machine == \"win32\" or platform_machine == \"WIN32\") and python_version < \"3.14\""files = [{file = "greenlet-3.1.1-cp310-cp310-macosx_11_0_universal2.whl", hash = "sha256:0bbae94a29c9e5c7e4a2b7f0aae5c17e8e90acbfd3bf6270eeba60c39fce3563"},{file = "greenlet-3.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fde093fb93f35ca72a556cf72c92ea3ebfda3d79fc35bb19fbe685853869a83"},@@ -732,18 +682,6 @@ files = [{file = "iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7"},]-[[package]]-name = "isodate"-version = "0.7.2"-description = "An ISO 8601 date/time/duration parser and formatter"-optional = false-python-versions = ">=3.7"-groups = ["main"]-files = [- {file = "isodate-0.7.2-py3-none-any.whl", hash = "sha256:28009937d8031054830160fce6d409ed342816b543597cece116d966c6d99e15"},- {file = "isodate-0.7.2.tar.gz", hash = "sha256:4cd1aa0f43ca76f4a6c6c0292a85f40b35ec2e43e315b59f06e6d32171a953e6"},-]-[[package]]name = "isort"version = "5.13.2"@@ -2303,4 +2241,4 @@ graph = ["langchain-neo4j", "neo4j", "rank-bm25"][metadata]lock-version = "2.1"python-versions = ">=3.9,<4.0"-content-hash = "f7bee9b294566e32c580fef1940cbc6fcb7fd6ca2e695f23c719d134af4c3204"+content-hash = "5848e23bdd7b453f938c9b5f6171866faa01bdcc2651bedb83ee9f4fe90e8bc8"diff --git a/pyproject.toml b/pyproject.tomlindex 9832084b5..cc4d63854 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "mem0ai"-version = "0.1.81"+version = "0.1.82"description = "Long-term memory for AI Agents"authors = ["Mem0 <[email protected]>"]exclude = [@@ -30,7 +30,6 @@ sqlalchemy = "^2.0.31"langchain-neo4j = "^0.4.0"neo4j = "^5.23.1"rank-bm25 = "^0.2.2"-azure-search-documents = "^11.5.0"psycopg2-binary = "^2.9.10"[tool.poetry.extras]