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.1.tar.gz (536.0 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.1-cp37-abi3-win_amd64.whl (8.1 MB view details)

Uploaded CPython 3.7+Windows x86-64

mnestic-0.10.1-cp37-abi3-manylinux_2_28_aarch64.whl (9.1 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.28+ ARM64

mnestic-0.10.1-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.1-cp37-abi3-macosx_11_0_arm64.whl (7.6 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

mnestic-0.10.1-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.1.tar.gz.

File metadata

  • Download URL: mnestic-0.10.1.tar.gz
  • Upload date:
  • Size: 536.0 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.1.tar.gz
Algorithm Hash digest
SHA256 374c8dc27ae9392aaf6482b34dc8c534a87a9246272a79829e2ae587f5278b29
MD5 15f2b6ecfa726adf5d559f0af5c10296
BLAKE2b-256 44897109600b79694994e62d3afcf2400d95deaba7933b3d81a3688e7200ab89

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: mnestic-0.10.1-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.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d3446c328d3099293595eb81ded641b60e586aa6f693ff35725f640d0d92f0b4
MD5 1a8305e780dfbdc48e93bcb712a9a4e7
BLAKE2b-256 f094437240ca7daa7bdd1dd70e55f426fcc84ad28080285d63593a960ca55a34

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mnestic-0.10.1-cp37-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 316038d483da0ef309b2bdf9766e2561e3928c88c640934477d8687f38c98a1c
MD5 64b8c85b65cafd7aef2310c2cd73a4df
BLAKE2b-256 4a7074bc378c89d840bd5711287fb1294495c6083fe71129d1b48ef5b8084cd1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mnestic-0.10.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6c1e3d5a4ba546ff1f40355b814375ae1dd00634fa97646a84826beecf837e7
MD5 ad239cf9034f2ec7f42a2afba2fe6fa1
BLAKE2b-256 2ceea7475e370341afa2a009837300d402464fe113ca8741fb74a3bd6ba34f99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mnestic-0.10.1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 74884aac01e322395762b5e97602008ce280292a6d478f2559531a3e90679f3c
MD5 e7b781d3204df0df3c1e2c04f881ec9a
BLAKE2b-256 bb461531cdac5788217d2eec18350489fd74c89f323c93e1eab50b7e9f2f177d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mnestic-0.10.1-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cbc60d6acea43afad7536e8d19cfa2dc3d22849d02820792cbacfc14f75dff6f
MD5 fc3620e54663f7f746947676135e36c0
BLAKE2b-256 980eca1708052a628c628430135d1544254db4a289390d82a2ba5b1cd4309383

See more details on using hashes here.

Provenance

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