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.9.0.tar.gz (464.6 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.9.0-cp37-abi3-win_amd64.whl (7.9 MB view details)

Uploaded CPython 3.7+Windows x86-64

mnestic-0.9.0-cp37-abi3-manylinux_2_28_aarch64.whl (8.8 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.28+ ARM64

mnestic-0.9.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.1 MB view details)

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

mnestic-0.9.0-cp37-abi3-macosx_11_0_arm64.whl (7.4 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

mnestic-0.9.0-cp37-abi3-macosx_10_12_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.7+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for mnestic-0.9.0.tar.gz
Algorithm Hash digest
SHA256 370ee3656383e9f8545d1cd27ea17ed81697732eb2e20631725eb1b339cb5e20
MD5 84c9f4741577b928e82dc40b395e2a59
BLAKE2b-256 9373f0df7b32c9a82cbcff4828dd7d3df390fb79a14d3dc6abc9836f097eec8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.9.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.9.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: mnestic-0.9.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 7.9 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.9.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 03cdbb7fcbe87e0f696df85a0ab29ea55ba343c7a4c941c456110673cf52d52e
MD5 fa604a6b61b857913098ae64770a3ce9
BLAKE2b-256 360715b2d5e4891b8ee5fccdda8a0706ab3b484722f9fc27ea7097404e3345bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.9.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.9.0-cp37-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for mnestic-0.9.0-cp37-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3d09546499afaddf0831ea80bae247a9316ba6c65d9ef55a0373e2b16e37b260
MD5 05f419601eb1eccbb6915fbd24776f8e
BLAKE2b-256 e3a07b80aee1cab14504534b12113e1c9a881d3df6116ba76bcae3240d51bed0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.9.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.9.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mnestic-0.9.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c0dabbfea5a8ab6f3e41cdf800780f02e39b97457e0eb82c58dd7a506ee35d4
MD5 6b407cff01c14304d9462a96056ca10e
BLAKE2b-256 257976dacffff14d71990e3b549670e1bb64869b5a22f67d9d918a1c8ee7e2c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.9.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.9.0-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mnestic-0.9.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a57d7504feafd0368a4d69b3ef37c8bdd774bacc6368e2961fae4082e1dd9a8
MD5 cd14e1ef3e226e5b4e7093be8f807698
BLAKE2b-256 b4cb33f6249b9b6c772b98b644ade6ac182b25a16fd0306f03f9b501f281ab56

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.9.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.9.0-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mnestic-0.9.0-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4e0b25e06343bb22cc9d3b834cdf9ad83c4ca90696f93a2eb6a6e00169904e3b
MD5 374b02367230f431527e3cb162886992
BLAKE2b-256 0140af0a0a23ac07ba77db21c3a3702331211d2722525c20f6c82170bc1c1556

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnestic-0.9.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