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.2-cp312-cp312-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.12Windows x86-64

fathomdb-0.5.2-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.2-cp312-cp312-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

fathomdb-0.5.2-cp312-cp312-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fathomdb-0.5.2-cp311-cp311-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.11Windows x86-64

fathomdb-0.5.2-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.2-cp311-cp311-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

fathomdb-0.5.2-cp310-cp310-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.10Windows x86-64

fathomdb-0.5.2-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.2-cp310-cp310-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.5.2-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.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.5.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.2 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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 0a9923603b286033aaf4bd27b53b3d39b61db4fa1ad59dc0c32d0d20b2531dae
MD5 7c455484e0fd4dfc6d1721fb3aefea82
BLAKE2b-256 f3e06a991a6d2715ca3d91b7c35290f64361e020543d88d219d8e1d14249886a

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 937719fd69ed1d0de07f6b2b54a9547b82ed67e6f6227baf55d9f8bb92fc6ea2
MD5 48abe35ee536dea4fabaa63699041703
BLAKE2b-256 cef02706a23a7d10c9bdf35dada6c326ccebb7ccb80831bf2aebf4bc7373e096

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a51058871c30bed449d7bb1eddd24f6cd008b9966285acbc000ee870ac3dee05
MD5 e2beaf41bf4a793e86935f51cac62332
BLAKE2b-256 948100f91afd59aed66434cd7d39fe9c6bda1f3e36f291ada91585a80c8ea0ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 307c3655766e0e7ca1ec6ca326d03221dbd320cb0baeb051c7cc5d55b172769e
MD5 15434328e9d7c4779d301f237ef93c17
BLAKE2b-256 632fd72be98b79a4b3d3d338a45ab7100862105bb92a8632a20686efdd63a5aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8fb51f97c1e7c575d8d6ee837654e44414000c8bb8dbe5207d4f8f59e93416da
MD5 1ef5cf46e6d8c706d440ba7766c4be21
BLAKE2b-256 1336c71f5ec2e01e454507d16a4ebfb5fca7de36888ad1ccf9d5d30a62e15de5

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.5.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.2 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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6324db505c1a553ff9f3dda8b32f62ce00c5faebc42785a0cfef2ae1bcbc833e
MD5 9c36bf18790e335ff88456f131d9db2d
BLAKE2b-256 e0e50bce04b93b93b0c9f424a238a22d0fac25b81fd0adf6c6e827c4cdff48c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b9f67dad86988335d434ddd892e72106599e307659733b77f479dcd855c5b88c
MD5 a36adb81011e6cfa1c83955b05c03aaa
BLAKE2b-256 288dd1a54a8fcec9d1a6e1a0ec4b46a68384bca86ece7bb0d247d8289adb123f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6e94c67a512812afb104734ce2a27b943647d8f86a0f17654b2581d8a41c238b
MD5 cd9e6eadc2f376e50768b6f5a7296db3
BLAKE2b-256 5e00cd0e1daabcd4a04ad1e2864912971e091f431d329588ab8bc4d984e6ada1

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 98e35df38292610acebd007db02de2da512f3284986b235a507b8c22a65d3a99
MD5 7fed1d1b58ba16d7814a4f709d68d3bd
BLAKE2b-256 2cc0c356e4bcfd75c867005bc6caf3abaf879a56a3673135aa73b9fe5ec853f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a4a469400084b9455cae31ba71feabfcda4191eb326dc0eeeb92b2f0dbf68131
MD5 146b122e99e31cf796fb2dd58d74f8bd
BLAKE2b-256 20fa24610a5d61b35b20941c5086c4bd4bbbe75a4a6738cee67fad13375ba6a9

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.5.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.2 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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e393647afab42e4b3a9b2b357c3f122dd1205754f8f1b3dc6de504a9fd612d5b
MD5 53e3c95195fbb12b998f36e4d0d53b28
BLAKE2b-256 ed314af9d91caf67502afa569f3a2c1ce7bddd808b1f86ef36c932793a9a424b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6080fa574ff554ddb7748f88d710ba4478a570bdd4a0b697c10654689b3e8263
MD5 07d699cfd526061d3628e0251cee0970
BLAKE2b-256 d98b309927e950e8f7bb2cdb1f442f3e37bf69cd12a6d0dc2ed00b3677fd872b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 db4453d9e4bcf8c2f9659f0e3ba9b5cb9deeb2ccb65f48725282b019a251a824
MD5 6d9eb487722dc4eb1bc239548219fd81
BLAKE2b-256 41bd2b514a60ae3a536af85b0828103e2eb388e5a4370bbcc015aad95f0ae707

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ac61b5d85ef4df4341b82bbeeb473aa4e261534b76f21159a5af11b4d31ccc8
MD5 cc276c7ef88926d305fdb8a15bcabba4
BLAKE2b-256 01eabef92c05861cf63a26ecda735f8ad156b6c3334da17b3b4d7aa825566d4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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.2-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fathomdb-0.5.2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3c1ef6b7f87691e00759458bb6369a69fad07dc176d8b1756606f23ebcae0a7d
MD5 f783214ef8c912933de9eb67d4c178d6
BLAKE2b-256 12ac2e1b493a7e6e8d4e255cbc4040db7814a9dd23ec6b51070e32edacda0463

See more details on using hashes here.

Provenance

The following attestation bundles were made for fathomdb-0.5.2-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