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

Uploaded CPython 3.7+Windows x86-64

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

Uploaded CPython 3.7+manylinux: glibc 2.28+ ARM64

mnestic-0.8.5-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.8.5-cp37-abi3-macosx_11_0_arm64.whl (7.4 MB view details)

Uploaded CPython 3.7+macOS 11.0+ ARM64

mnestic-0.8.5-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.8.5.tar.gz.

File metadata

  • Download URL: mnestic-0.8.5.tar.gz
  • Upload date:
  • Size: 440.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.8.5.tar.gz
Algorithm Hash digest
SHA256 e34db245e9fd10f31b7239fe613734ca9e2cb798c3aadc575b3ec9e416368439
MD5 3bc5a026e1cdb5dba368748d69d759d4
BLAKE2b-256 57e7c30d2eb11b8f621bc7e12e991cbb91f3c085e45d506b6d885945b0bf8f78

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: mnestic-0.8.5-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.8.5-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 83a8485c10758517bf6687fc70c1b96f59a8c22adb9b4de886b7e7d959a8e402
MD5 d2d44ed5edcbb7842dd7a661af28ea7b
BLAKE2b-256 a23ae50aef5584ed880cdabd2ec3c3d25cd29240440bcff0f1bf95abeff0e961

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mnestic-0.8.5-cp37-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 acf4f22367213a7e39d67838ad7eb6233c0f9ad1139c1ea2399dd818f5929321
MD5 4015a50a329d97d6578b1cc2278146d9
BLAKE2b-256 483afa38729efdba284d00a447695d47611cae61f9aad9de953b48db24b592c1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mnestic-0.8.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec0e9d7071a4374657b25a8de13a807b800a863a79b7d61c83e9174ee72f2e6d
MD5 ade498af3320e98f58a7e195888f23e2
BLAKE2b-256 870e9d4f6857e4931336fec96fd5857dd951b4f2ac81eacfbc2e75a9603ab3bf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mnestic-0.8.5-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 acb23845d345639ebb2595966cc4d81def3b815da6c588f11211caf5ec914c51
MD5 00551fb116c7e8128dc61247cdc4d6d2
BLAKE2b-256 be91fbf61f51e7e836ca65b99bae2ee5b8c0bed697b979628419aed328a8c857

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mnestic-0.8.5-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e66841d2e497d67be4980a1afc748fa7b21fc11318481197e4625ff42e25e8f7
MD5 a391c89e66b618fe2f6d375a5af42ee8
BLAKE2b-256 84c9e79d7a124239b8edf4607ab449b1a42d43436ec613f717beb6ce365089da

See more details on using hashes here.

Provenance

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