Thank you for your interest in contributing to engrava! This document explains how to set up a development environment, submit changes, and what we look for in contributions.
engrava is the memory database for AI agents. Contributions should stay within this scope:
In scope:
- Thought/edge/embedding CRUD improvements
- MindQL query language enhancements
- New embedding providers
- Extension system improvements
- Performance optimizations
- Documentation and examples
- Bug fixes and test coverage
Out of scope:
- Application-layer logic (planners, reasoners, cognitive architectures)
- Web UI or REST API (use engrava as a library)
- Non-SQLite storage backends (this is an SQLite-first project)
# Clone the repository
git clone https://github.com/sovantica/engrava.git
cd engrava
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # Linux/macOS
.venv\Scripts\Activate.ps1 # Windows
# Install in editable mode with dev dependencies
pip install -e ".[dev]"This project maintains strict code quality. All contributions must pass:
ruff check src/ tests/
ruff format --check src/ tests/All ruff rules are enabled (select = ["ALL"]). Fix any violations before
submitting.
mypy --strict src/Zero errors required. Use proper type annotations — no Any, no type: ignore
without justification.
pytest --cov --cov-fail-under=90- Coverage must stay at or above 90%.
- Use
async def test_*directly —asyncio_mode = "auto"is configured. - Prefer real implementations over mocks.
- New features require corresponding tests.
- One feature per PR — keep changes focused and reviewable.
- Run all checks locally before submitting:
ruff check src/ tests/ ruff format --check src/ tests/ mypy --strict src/ pytest --cov --cov-fail-under=90
- Write clear commit messages — use imperative mood ("Add FTS5 support", not "Added FTS5 support").
- Update CHANGELOG.md — add your changes under
[Unreleased]. - Update documentation if your change affects public API or behavior.
- Add docstrings — Google-style docstrings on all public symbols.
Public Engrava artifacts must stay free of internal tier references.
- Do not mention internal product or tier names in
src/engrava/,docs/, or public-facing contributor docs. - Avoid internal branded example names in comments, docstrings, snippets, and tests.
- Prefer neutral names like
ThirdPartyHooks,CustomPlugin, orConsumerApp.
Run the purity check before opening a PR:
python scripts/assert_purity.pyCI also runs the same check and will fail if a forbidden reference leaks into the public tree.
- Frozen Pydantic models for all domain objects.
- Async-first — no sync wrappers around async operations.
- Parameterized SQL — never interpolate user input into queries.
- StrEnum for all categorical values.
- Protocol-based abstractions at extension boundaries.
- Use GitHub Issues.
- Include Python version, OS, and a minimal reproduction.
- For security vulnerabilities, email directly instead of filing a public issue.
By contributing, you agree that your contributions will be licensed under the MIT License.