Skip to main content

Embedded graph + vector + full-text database with Datalog — a maintained fork of CozoDB, tuned as a substrate for agentic memory.

Project description

mnestic (Python)

Embedded graph + vector + full-text database with Datalog queries — a maintained fork of CozoDB, tuned as a substrate for agentic memory. This package is the in-process Python binding (no server required).

mnestic is not the official CozoDB and is not affiliated with or endorsed by its original authors. All credit for the original design belongs to Ziyang Hu and the Cozo Project Authors. See the fork repository for provenance and licensing.

pip install mnestic
from mnestic import CozoDbPy

db = CozoDbPy("mem", "", "{}")  # engines: "mem", "sqlite" (file path), ...
db.run_script("?[x] <- [[1],[2],[3]]", {}, False)

# One-call hybrid retrieval (HNSW + full-text fused with Reciprocal Rank Fusion),
# over a relation that has an HNSW index and an FTS index:
hits = db.hybrid_search({
    "relation": "docs",
    "vector_index": "vec", "query_vector": [0.1, 0.9], "vector_k": 5,
    "fts_index": "fts", "query_text": "vector search", "fts_k": 5,
})
# -> {"headers": ["id", "score"], "rows": [["d3", 0.033], ...], "next": None}

# Pass "detailed": True for per-leg contributions — one row per (item, leg)
# with the within-leg rank the fusion used and the leg's raw score:
# headers ["id","score","list_id","leg_rank","leg_score"]

For idiomatic LangChain / LlamaIndex usage, install the integration packages (langchain-mnestic, llama-index-vector-stores-mnestic).

The query language (CozoScript / Datalog) and engine semantics follow CozoDB; see the upstream documentation and the fork changelog.

License

Mozilla Public License 2.0. Original work © 2022 The Cozo Project Authors; fork modifications © 2026 Shan Rizvi.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnestic-0.10.0.tar.gz (527.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mnestic-0.10.0-cp37-abi3-win_amd64.whl (8.1 MB view details)

Uploaded CPython 3.7+Windows x86-64

mnestic-0.10.0-cp37-abi3-manylinux_2_28_aarch64.whl (9.0 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.28+ ARM64

mnestic-0.10.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

mnestic-0.10.0-cp37-abi3-macosx_11_0_arm64.whl (7.5 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

mnestic-0.10.0-cp37-abi3-macosx_10_12_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.7+macOS 10.12+ x86-64

File details

Details for the file mnestic-0.10.0.tar.gz.

File metadata

  • Download URL: mnestic-0.10.0.tar.gz
  • Upload date:
  • Size: 527.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mnestic-0.10.0.tar.gz
Algorithm Hash digest
SHA256 3d9a4753f23dff1f1a7e582630e3f3e1a53398075439d00648d7178817b118d4
MD5 bb0b7636fcdaca0eb16ca76d0ebb60e6
BLAKE2b-256 493f39df2550f635fb69e062f2e340e425849c5f615e9f28bfe7baa1e2f5cffe

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.10.0.tar.gz:

Publisher: python-publish.yml on shuruheel/mnestic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mnestic-0.10.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: mnestic-0.10.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 8.1 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mnestic-0.10.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a91fd05f22f80831fc8190fc2c54915c16c99db1062f4aa9a7d9339e42a666c3
MD5 a77f4ae6b86e4250686f69ca92dc4797
BLAKE2b-256 29689bdb277e1a1393471c656ce80be357f112d9bfccea93ef02a2bd732e50ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.10.0-cp37-abi3-win_amd64.whl:

Publisher: python-publish.yml on shuruheel/mnestic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mnestic-0.10.0-cp37-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for mnestic-0.10.0-cp37-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 04af9ff7624a4418576e95ee0ec83ff08b60667f66160a1f6f86184f233fcc2b
MD5 bd09ec5f89702b12b2573ed922f4023b
BLAKE2b-256 71d2fbf36efd4b871efde440b8ca6cf4d243326bbd8fa4a1dfb2a1b03dca44e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.10.0-cp37-abi3-manylinux_2_28_aarch64.whl:

Publisher: python-publish.yml on shuruheel/mnestic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mnestic-0.10.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mnestic-0.10.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 477cc3dee225a612d49b3766e4a2c871e7085d02a7fca085adb274280cb66bbb
MD5 6f140f1ef358b93d4a6ff5ec5bff997b
BLAKE2b-256 f23af2c41dc732c93a9cf3d6f3908f594780c1efd2bd1a0f2d5f5b8ec04cef20

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.10.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on shuruheel/mnestic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mnestic-0.10.0-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mnestic-0.10.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0eeff05925d64c484e64ad8f6f1c395ec37deba76e929455f3e5b551013c5ee
MD5 584164943185355b2d85c4d475a49dba
BLAKE2b-256 45e8dd355107bfd410bb1209850a89dcd2c2072a020bc6a4df43636fd5502cdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.10.0-cp37-abi3-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on shuruheel/mnestic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mnestic-0.10.0-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mnestic-0.10.0-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6a8afa695e01f2ee9af1bbd67fb0257fcbb41374dd1a7baecce566a198f4437b
MD5 4c8df7d4b5617becdafd40bda1c0b006
BLAKE2b-256 065c75b07d77fd8755fa16617bd452bbd8c31edf320600f7840332dbe703c379

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.10.0-cp37-abi3-macosx_10_12_x86_64.whl:

Publisher: python-publish.yml on shuruheel/mnestic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page