Skip to main content

Local datastore for persistent AI agents — graph, vector, and full-text search on SQLite

Project description

fathomdb

Local datastore for persistent AI agents — graph, vector, and full-text search on SQLite.

Installation

pip install fathomdb

Quick Start

from fathomdb import Engine, WriteRequestBuilder

# Opt into the Phase 12.5 read-time embedder so search() fires its
# vector branch on natural-language queries. The embedder="builtin"
# shape requires a fathomdb build with --features default-embedder;
# when that feature is off it silently falls back to text-only search.
engine = Engine.open("my_agent.db", embedder="builtin", vector_dimension=384)

# Write data
builder = WriteRequestBuilder("ingest")
node = builder.add_node(
    kind="memory",
    properties={"text": "hello world"},
    source_ref="quickstart",
)
engine.write(builder.build())

# Unified search — the recommended retrieval entry point.
rows = engine.nodes("memory").search("hello", 10).execute()
for hit in rows.hits:
    print(hit.node.logical_id, hit.score, hit.modality.value, hit.snippet)

engine.close()

Features

  • Graph backbone with nodes, edges, and temporal tracking
  • Unified search() entry point -- one call runs a strict-then-relaxed text pipeline plus an optional vector branch and returns ranked SearchHit rows over both document chunks and structured property projections
  • Read-time query embedder (Phase 12.5): opt in with Engine.open(path, embedder="builtin", vector_dimension=384) to let search() fire its vector branch on natural-language queries. See the querying guide for the full configuration surface and degradation semantics. The "builtin" embedder requires fathomdb to be built with the default-embedder Cargo feature; when the feature is off, the engine logs a warning and silently falls back to text-only search
  • Vector similarity search via sqlite-vec (advanced override for callers that want to supply a vector literal directly)
  • FTS property schema management -- register JSON property paths per node kind, including recursive-mode paths that populate a sidecar position map and unlock per-hit match attribution
  • Provenance tracking on every write
  • Single-writer / multi-reader with WAL

Unified search

from fathomdb import Engine, FtsPropertyPathMode, FtsPropertyPathSpec

engine = Engine.open("/tmp/fathom.db")

# search() is the primary retrieval entry point. The engine owns the
# strict-then-relaxed policy and returns SearchRows, not QueryRows.
rows = engine.nodes("Goal").search("ship quarterly docs", 10).execute()
for hit in rows.hits:
    print(hit.node.logical_id, hit.score, hit.modality.value,
          hit.source.value, hit.snippet)
print(rows.strict_hit_count, rows.relaxed_hit_count, rows.vector_hit_count)

# Recursive property FTS + opt-in match attribution.
engine.admin.register_fts_property_schema_with_entries(
    "KnowledgeItem",
    entries=[
        FtsPropertyPathSpec(path="$.payload", mode=FtsPropertyPathMode.RECURSIVE),
    ],
)
attributed = (
    engine.nodes("KnowledgeItem")
    .search("quarterly docs", 10)
    .with_match_attribution()
    .execute()
)
for hit in attributed.hits:
    if hit.attribution:
        print(hit.attribution.matched_paths)

# Advanced overrides (pin modality or supply both shapes verbatim):
#   engine.nodes("Goal").text_search("ship quarterly docs", 10).execute()
#   engine.fallback_search("quarterly docs", "quarterly OR docs", 10).execute()
# See docs/guides/querying.md for when each is the right tool.

For the full retrieval pipeline, supported query grammar, and property-FTS schema registration semantics, see the guides under docs/guides/.

Documentation

See the GitHub repository for full documentation.

License

MIT

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

fathomdb-0.5.3-cp312-cp312-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.12Windows x86-64

fathomdb-0.5.3-cp312-cp312-manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fathomdb-0.5.3-cp312-cp312-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

fathomdb-0.5.3-cp312-cp312-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fathomdb-0.5.3-cp312-cp312-macosx_10_12_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fathomdb-0.5.3-cp311-cp311-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.11Windows x86-64

fathomdb-0.5.3-cp311-cp311-manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fathomdb-0.5.3-cp311-cp311-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

fathomdb-0.5.3-cp311-cp311-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fathomdb-0.5.3-cp311-cp311-macosx_10_12_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

fathomdb-0.5.3-cp310-cp310-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.10Windows x86-64

fathomdb-0.5.3-cp310-cp310-manylinux_2_28_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

fathomdb-0.5.3-cp310-cp310-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

fathomdb-0.5.3-cp310-cp310-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.5.3-cp310-cp310-macosx_10_12_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file fathomdb-0.5.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.5.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fathomdb-0.5.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b667272832225613da4a03c5beeddc8eb7939105e596ecc8ad49b45a5dc3ad67
MD5 d7c0b5133745b1be121efd65bd03282d
BLAKE2b-256 d1ea4cd9f044d8be4087e9388fe632ef8c8c11b05c44e7b3eb59597c9a5e6ed0

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp312-cp312-win_amd64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bee0a8c0dcf28e32ba7abe62bebfac441f2235b0201a5a55b57aecb42f655990
MD5 881b891061e197a7cb99851f01659c07
BLAKE2b-256 3cfdc40e3ef37d75517e2f2c850b02964b9779070c1528844f6d2f3f2ed1d74c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ccef5278001bbc5de4dda39efafe075a391775eea040b8946f62ba4751d436eb
MD5 72bed209cdd31a98f035eee26f271c00
BLAKE2b-256 c33e5694ffa602c82cbbb6f05b549f0166ee19023dc98e83e38eddc90850caa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp312-cp312-manylinux_2_28_aarch64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6f488664ba40a3a242a161fbd0b7da8fec749569bc05c07d304bf4a40705154
MD5 d5553a383f34a3eade3f558e7073ecdc
BLAKE2b-256 10d6781a5aeba6e846db83ae1feeb6fbc577344ef4d5c3585a43bfcd75aeaab7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 81baa7d38e587f2e2158c5dcb41dc1990c0ee35dd217f2a24c6203ba49d2b8bc
MD5 ce4c682746c4a2c231b5af6efbba8ba6
BLAKE2b-256 c6afd416ee3f764595b25845d2973b644e3ca7cad46dee641582176dc435ccf9

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.5.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fathomdb-0.5.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1a6a7360bc355d59dc0a4cedd16c89bf05c90d09bee94435f45a9bf0061dec6f
MD5 fc29b2c4787a7111d36200dbeb497ae3
BLAKE2b-256 934cd20fae18287673bb34225a0ca72a608876563533115bbd5ed25393af0443

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp311-cp311-win_amd64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f72ce3407b9ac6b539334ab2c64de495962a67b937c893e4669a2e8fa1b28af7
MD5 4942f45467452fa0a637feb7d841e367
BLAKE2b-256 7b1bf36208ab759817697bd79c6a685a2be2654495a12ecbc8a2b22da5da258c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b5a6129d449a5b0964e083d780261e16372ef1d18c1a84af0254ab79af294f75
MD5 5a3296eb596b6cc8b23862882fc067af
BLAKE2b-256 fc130eb6cbb152af3dae8fcac2cd9919bf2392dfe1bfa637f181397a74236b19

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp311-cp311-manylinux_2_28_aarch64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4216f9a8510e654c57286687b859b04068c41b94ca72a6688f199198b20afcbd
MD5 599133cc043355b10e3930d2756fd896
BLAKE2b-256 49914b29e61820aba5ba3cfc303d022f0bd8b9b7c2a5bbe324d568bad3fa8c5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3568b4f6ea5305c74a503c52211e0426a45787f47ba97b1b4055dba40d4e4c4d
MD5 c1667a34f3049c4999549a9a7b623a8d
BLAKE2b-256 e00f96cf4cb10143b0f72ac8ec24fd454ab79bdb92ebc64f5f0f4997ff122ee2

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.5.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.3 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fathomdb-0.5.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c5499043fc35af6b1fe0497bfc57cc8d0dcd5184e2ecb77f2d9eafd4ae695e64
MD5 56cee30aa780a0d7f40f38a7781cc80b
BLAKE2b-256 7ececbf332807d69f9d25d80f0abc89bc7850aba30cf7b5b75742e16610ab2b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp310-cp310-win_amd64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 344ac9ca7c9b84ad7d414b941ff37a6752bda37b6c98f679d9c83d08fd12eb02
MD5 f4fef5639d60bd38fb8e9209d0f15fcf
BLAKE2b-256 4c0ee821a8a1962800ae852319abb6eb9640c4d2af053ec9ca83e7eb5adce913

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 970134229d5cab6136ef256bf052daf4ea832470b29695005306073bd9f5e22f
MD5 65ba0653a51329b9faa8ee493090a740
BLAKE2b-256 716eed28d27e866cfb33a94d70d0980854a8b76ee1006608d1257a4dbc9c8efa

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp310-cp310-manylinux_2_28_aarch64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fc38c77e85f0a48aa0a4e5e98f528ce2b3fd0ec705a013489e6d0ef68395dda3
MD5 286ea006afeedeb10958c3faa0a3729d
BLAKE2b-256 702553c05f76790795d17cf1bae19aa1a95f29a55350480595816907765c9ec6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release.yml on coreyt/fathomdb

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

File details

Details for the file fathomdb-0.5.3-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 220e37c7a9c6adf27879c9fae6b616a1aa8137d5e7362b912118f29d0c1e69b8
MD5 7b6ed7e8ea1c5d0b2ab1d2671a2daa32
BLAKE2b-256 6328341b9e277d2cc08c348b8bdd36cbacac588e50693d14d37812e18a1bef41

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.3-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: release.yml on coreyt/fathomdb

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