[project]
name = "selfmemory"
dynamic = ["version"] # Version will be determined from git tags
description = "Enhanced Memory Management for AI Agents with zero-setup simplicity"
readme = "README.md"
requires-python = ">=3.10"
authors = [
{name = "SelfMemory Team"}
]
maintainers = [
{name = "SelfMemory Team"}
]
license = "Apache-2.0"
keywords = [
"memory", "ai", "ml", "vector", "search", "embeddings",
"agents", "llm", "artificial-intelligence", "qdrant", "semantic-search"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Database :: Database Engines/Servers",
"Topic :: Text Processing :: Indexing",
"Typing :: Typed"
]
dependencies = [
# Minimal core dependencies for basic Memory class usage
"chromadb>=0.4.0", # Zero-setup vector database
"qdrant-client>=1.6.0", # Enterprise vector database
"pydantic>=2.0.0,<3.0.0", # Data validation and settings
"email-validator>=2.0.0", # Required by Pydantic
"python-dotenv>=1.0.0", # Environment variable management
"cryptography>=40.0.0", # Encryption and security
"httpx>=0.25.0", # HTTP client
"pyyaml>=6.0.0", # YAML configuration support
]
[project.urls]
Homepage = "https://selfmemory.com"
Repository = "https://github.com/selfmemory/selfmemory"
Documentation = "https://github.com/selfmemory/selfmemory/wiki"
Issues = "https://github.com/selfmemory/selfmemory/issues"
Changelog = "https://github.com/selfmemory/selfmemory/blob/main/CHANGELOG.md"
[project.optional-dependencies]
# Testing dependencies
test = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-mock>=3.10.0",
"pytest-cov>=4.0.0",
"responses>=0.23.0",
]
# Development dependencies: everything needed for contributing
dev = [
# Testing frameworks
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-mock>=3.10.0",
"pytest-cov>=4.0.0",
"responses>=0.23.0",
# Code quality tools
"ruff>=0.14.8",
"pre-commit>=4.3.0",
# Build and release tools
"build>=1.3.0",
"twine>=6.1.0",
"python-semantic-release>=9.0.0",
# Server components (for local development/testing)
"fastapi>=0.100.0",
"fastapi-csrf-protect>=0.3.0",
"uvicorn>=0.20.0",
"starlette>=0.27.0",
"psutil>=5.9.0",
# Database backends (for local development/testing)
"pymongo>=4.0.0",
# Authentication libraries (for local development/testing)
"ory-hydra-client>=2.0.0",
"ory-kratos-client>=1.0.0",
"argon2-cffi>=23.1.0",
"authlib>=1.2.0",
"google-auth>=2.15.0",
# MCP server support (for local development/testing)
"mcp[cli]>=1.13.0",
"fastmcp>=2.0.0",
# Embedding providers (for local development/testing)
"ollama>=0.1.0",
"openai>=1.0.0",
# Observability (for local development/testing)
"opentelemetry-api>=1.20.0",
"opentelemetry-sdk>=1.20.0",
"opentelemetry-exporter-otlp>=1.20.0",
"opentelemetry-instrumentation-fastapi>=0.41b0",
"opentelemetry-instrumentation-httpx>=0.41b0",
"opentelemetry-instrumentation-pymongo>=0.41b0",
"opentelemetry-instrumentation-logging>=0.41b0",
]
[project.scripts]
selfmemory = "selfmemory.cli:main"
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=8.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["selfmemory*"]
# setuptools-scm configuration for version from git tags
[tool.setuptools_scm]
# Version derived from git tags
version_scheme = "post-release"
local_scheme = "no-local-version"
fallback_version = "0.3.0" # Fallback if no git tags found
write_to = "selfmemory/_version.py" # Optional: write version to file
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
"selfmemory/vector_stores",
"selfmemory/llms",
"selfmemory/configs",
"selfmemory/configs/embeddings",
]
# Same as Black.
line-length = 88
indent-width = 4
# Target Python 3.10+ for modern compatibility
target-version = "py310"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = [
"E4",
"E7",
"E9",
"F",
"W",
"B", # flake8-bugbear
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"PTH", # flake8-use-pathlib
"SIM", # flake8-simplify
"RET", # flake8-return
"TCH", # flake8-type-checking
]
ignore = [
"E501", # Line too long, handled by formatter
"B008", # Do not perform function calls in argument defaults
"RET504", # Unnecessary variable assignment before `return` statement
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
docstring-code-format = false
# Set the line length limit used by the formatter.
docstring-code-line-length = "dynamic"
# Pytest configuration for test discovery and execution
[tool.pytest.ini_options]
pythonpath = ["."]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--strict-config",
"--verbose",
"-ra",
"--cov=selfmemory",
"--cov-report=term-missing",
"--cov-report=html:htmlcov",
"--cov-report=xml",
]
markers = [
"unit: Unit tests",
"integration: Integration tests",
"slow: Slow tests",
"network: Tests that require network access",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
]
[tool.uv.workspace]
members = [
"selfmemory-mcp",
]
# Convenience scripts for development tasks (uv)
# Python Semantic Release configuration
# NO-COMMIT MODE: Creates tags and releases without committing version changes
# This avoids branch protection conflicts while maintaining full automation
[tool.semantic_release]
# Branch configuration
branch = "master"
# Commit parser - use 'angular' for conventional commits
commit_parser = "angular"
# Build and publishing
build_command = "pip install build && python -m build"
dist_path = "dist/"
upload_to_pypi = true
upload_to_release = true
remove_dist = false
# Git tagging (no version file updates or commits)
tag_commit = true
tag_format = "v{version}"
# GitHub configuration
major_on_zero = false
allow_zero_version = true
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore"
]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]
[tool.semantic_release.changelog.default_template]
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = []
[tool.semantic_release.changelog.environment]
block_start_string = "{%"
block_end_string = "%}"
variable_start_string = "{{"
variable_end_string = "}}"
comment_start_string = "{#"
comment_end_string = "#}"
trim_blocks = false
lstrip_blocks = false
newline_sequence = "\n"
keep_trailing_newline = false
extensions = []
autoescape = true