[project] ############################################################################## # Here define the project metadata and dependencies for the MemoryOS package. ############################################################################## name = "MemoryOS" version = "2.0.33" description = "Intelligence Begins with Memory" license = {text = "Apache-2.0"} readme = "README.md" requires-python = ">=3.10" authors = [ {name = "MemTensor", email = "MemTensor@memtensor.cn"} ] keywords = [ "memory", "llm", "language model", "memoryOS", "agent", "kv cache", "lora", ] classifiers = [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Natural Language :: Chinese (Simplified)", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ "openai (>=1.77.0,<2.0.0)", "ollama (>=0.5.0,<0.5.1)", "transformers (>=4.51.3,<5.0.0)", "tenacity (>=9.1.2,<10.0.0)", # Error handling and retrying library "fastapi[all] (>=0.115.12,<0.116.0)", # Web framework for building APIs "sqlalchemy (>=2.0.41,<3.0.0)", # SQL toolkit "pymysql (>=1.1.0,<2.0.0)", # MySQL Python driver "scikit-learn (>=1.7.0,<2.0.0)", # Machine learning "fastmcp (>=2.10.5,<3.0.0)", "python-dateutil (>=2.9.0.post0,<3.0.0)", "prometheus-client (>=0.23.1,<0.24.0)", "concurrent-log-handler (>=0.9.28,<1.0.0)", # Process-safe rotating file handler "cachetools (>=6.0.0)", # Embedding request caching ] [project.urls] homepage = "https://memos.openmem.net/" repository = "https://github.com/MemTensor/MemOS" download = "https://pypi.org/project/MemoryOS/#files" changelog = "https://github.com/MemTensor/MemOS/releases" releasenotes = "https://github.com/MemTensor/MemOS/releases" documentation = "https://memos-docs.openmem.net/home/overview/" issues = "https://github.com/MemTensor/MemOS/issues" [project.scripts] memos = "memos.cli:main" [project.entry-points."memos.plugins"] dream = "memos.dream:CommunityDreamPlugin" [project.optional-dependencies] # These are optional dependencies for various features of MemoryOS. # Developers install: `poetry install --extras `. e.g., `poetry install --extras general-mem` # Users install: `pip install MemoryOS[]`. e.g., `pip install MemoryOS[general-mem]` # TreeTextualMemory tree-mem = [ "neo4j (>=5.28.1,<6.0.0)", # Graph database "schedule (>=1.2.2,<2.0.0)", # Task scheduling ] # MemScheduler mem-scheduler = [ "redis (>=6.2.0,<7.0.0)", # Key-value store "pika (>=1.3.2,<2.0.0)", # RabbitMQ client ] # MemUser (MySQL support) mem-user = [ "pymysql (>=1.1.0,<2.0.0)", # MySQL client for SQLAlchemy ] # MemReader mem-reader = [ # chonkie>=1.6 pulls numpy>=2.0; any environment that also has scipy # installed must use scipy>=1.13 (older scipy pins numpy<1.27). See #1342. "chonkie (>=1.0.7,<2.0.0)", # Sentence chunking library "markitdown[docx,pdf,pptx,xls,xlsx] (>=0.1.1,<0.2.0)", # Markdown parser for various file formats "langchain-text-splitters (>=1.0.0,<2.0.0)", # markdown chunk for langchain ] # PreferenceTextMemory pref-mem = [ "pymilvus (>=2.5.12,<3.0.0)", # Milvus Vector DB "datasketch (>=1.6.5,<2.0.0)", # MinHash library ] # SkillMemory skill-mem = [ "alibabacloud-oss-v2 (>=1.2.2,<1.2.3)", ] # Tavily Search tavily = [ "tavily-python (>=0.5.0,<1.0.0)", ] # All optional dependencies # Allow users to install with `pip install MemoryOS[all]` all = [ # Exist in the above optional groups "neo4j (>=5.28.1,<6.0.0)", "schedule (>=1.2.2,<2.0.0)", "redis (>=6.2.0,<7.0.0)", "pika (>=1.3.2,<2.0.0)", "pymysql (>=1.1.0,<2.0.0)", "chonkie (>=1.0.7,<2.0.0)", "langchain-text-splitters (>=1.0.0,<2.0.0)", "markitdown[docx,pdf,pptx,xls,xlsx] (>=0.1.1,<0.2.0)", "pymilvus (>=2.6.1,<3.0.0)", "datasketch (>=1.6.5,<2.0.0)", "jieba (>=0.38.1,<0.42.1)", "rank-bm25 (>=0.2.2)", # NOT exist in the above optional groups # Because they are either huge-size dependencies or infrequently used dependencies. # We kindof don't want users to install them. "torch (>=2.7.1,<3.0.0)", "sentence-transformers (>=4.1.0,<5.0.0)", "qdrant-client (>=1.16.0,<2.0.0)", "volcengine-python-sdk (>=4.0.4,<5.0.0)", "nltk (>=3.9.1,<4.0.0)", "rake-nltk (>=1.0.6,<1.1.0)", "alibabacloud-oss-v2 (>=1.2.2,<1.2.3)", "tavily-python (>=0.5.0,<1.0.0)", # Uncategorized dependencies ] [build-system] ############################################################################## # Python package build system requirements. ############################################################################## requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.poetry] ############################################################################## # Here mainly define dependencies for development, testing, and evaluation. # These dependencies will NOT be included in the MemoryOS package itself. # They will be installed when you run `poetry install --with dev,test,eval`. # # More about version specifiers (e.g. "^0.1.0" or ">=0.1.0,<0.2.0"): # https://python-poetry.org/docs/dependency-specification#caret-requirements ############################################################################## packages = [{include = "memos", from = "src"}] requires-poetry = ">=2.0" dependencies = { "python" = ">=3.10,<4.0" } [tool.poetry.group.dev] optional = true [tool.poetry.group.dev.dependencies] pre-commit = "^4.2.0" [tool.poetry.group.test] optional = true [tool.poetry.group.test.dependencies] pytest = "^8.3.5" pytest-asyncio = "^0.23.5" pytest-cov = "^6.1" pytest-html = "^4.2" ruff = "^0.11.8" [tool.poetry.group.eval] optional = true [tool.poetry.group.eval.dependencies] dotenv = "^0.9.9" mem0ai = "^0.1.109" zep-cloud = "^2.15.0" rouge-score = "^0.1.2" nltk = "^3.9.1" bert-score = "^0.3.13" # scipy 1.13+ supports numpy 2.x. Older scipy (1.10/1.11/1.12) pins numpy<1.27 # which collides with chonkie>=1.6 (requires numpy>=2.0.0) — see issue #1342. scipy = "^1.13.0" python-dotenv = "^1.1.1" langgraph = "^0.5.1" [tool.poetry.group.mem-user.dependencies] pymysql = "^1.1.2" [[tool.poetry.source]] name = "mirrors" url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" priority = "supplemental" [tool.pytest.ini_options] ############################################################################## # PyTest settings for running tests/ ############################################################################## asyncio_mode = "auto" pythonpath = "src" filterwarnings = [ "ignore::DeprecationWarning:qdrant_client.*", ] [tool.coverage.run] source = ["src/memos"] branch = true [tool.coverage.report] show_missing = true skip_empty = true exclude_lines = [ "pragma: no cover", "if TYPE_CHECKING:", "if __name__ == .__main__.", ] [tool.coverage.html] directory = "cov-report" [tool.ruff] ############################################################################## # Ruff is a fast Python linter and formatter. ############################################################################## fix = true line-length = 100 target-version = "py310" lint.extend-select = [ "B", # flake8-bugbear "C4", # flake8-comprehensions "ERA", # flake8-eradicate/eradicate "I", # isort "N", # pep8-naming "PIE", # flake8-pie "PGH", # pygrep "RUF", # ruff checks "SIM", # flake8-simplify "TC", # flake8-type-checking "TID", # flake8-tidy-imports "UP", # pyupgrade ] lint.ignore = [ "RUF001", # ambiguous-unicode-character-string "PGH003", # blanket-type-ignore ] lint.isort.lines-between-types = 1 lint.isort.lines-after-imports = 2