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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

fathomdb-0.5.1-cp311-cp311-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.5.1-cp310-cp310-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: fathomdb-0.5.1-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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d0dd38f2f01310e8e21cfc160a7f52a68f838f7b1d73be19482b3740836c0efc
MD5 74f239e1ab29de18d63675e9532bc5bc
BLAKE2b-256 8385268563ebbc56c76d1c67ca6f2d0406947d7bf5b02e71789d6eae316ad6e8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d4eadc1f33fcca66f2b4acd18301434facc51bdbeadc1605b8807647b419f59e
MD5 d8b1046ac224abd8cf511cc5f692dfdc
BLAKE2b-256 dd0877ddfdda4abfbcf220635dd2cee18716c4604646260e69a0ca71a50a37a4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 611030b7e77000b1631470f831b7d4e328951f3bc3b4bbe9840deb6afe386f72
MD5 fc1b0633dbe8b5827bd4d2a34fb88b1a
BLAKE2b-256 f8e14a86f2e1fd411946b3386df18297b93c4aa714f043e6ebc7c2749b0a5277

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e9a20c75e5d9d24fa968a661617836576163e50876fd998a8f52aa9ab3ca591b
MD5 4490a9e1c69ec9247162ce8247c909f9
BLAKE2b-256 2eeffad3817d1e48f0c513b3c4a03a0217cffa832458e2c0c729a452bfec8625

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8174d203869e603285f08e92c5ee0215a7d85371a602d2c8c3edc04d7efeeb18
MD5 3800ee2d099960a8da9c466e7102a03e
BLAKE2b-256 75f64c0defd9c1bbf0f519c38b50da624d586cd1c9a792b8f39f0c75360a3f1e

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.5.1-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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 80ac6f527d53a8272f1ce32c6be54ef5f5893c8129dac87936f85657f47c276c
MD5 488ac0a7d5386993d77259ac0eac9978
BLAKE2b-256 1a107b3cc1af6766f3a0b0e7cec5345c7296b769a2c58c132b150972bdf4c8b6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2ecc2391a525dac25ba9183c5b9f35d8b6ce1b35af703167c123eab597f5b5b9
MD5 4ae4ba0d68035b248606c133da2a8902
BLAKE2b-256 802351e67aae4a61102412eb7296eaffe42b1f9a84710093a993cd6f67bd335b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4696e79d0310144fa1c92e7e4f59ffc4de0589a1a2d671eaca561c5145c72280
MD5 25c69f55f79ec0f2e5f892d35c6b3bd9
BLAKE2b-256 a680917826221b59636f7a322f0762e739a4c800f7e4b8e4863203c4e44f1fdf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 50c7ba1386935a7e8eaf3695c3efad9a617bb5a5d26e37b4cd5885953d434d92
MD5 259fdbf871bccf589c256976d22e3358
BLAKE2b-256 f9d82f1865402d618d13a7548366bf5d6155f421153ffa252f5832e8cecd5518

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 876efa4cdcf0e49c0dc104451956ce089c3f7c5ce59f2dd5849e34de1b9ec559
MD5 7df68aab3f1660f4c651852f8a163070
BLAKE2b-256 3391f54edab22b6a05f6682eb21e2754d7f084608e48127a04de117c031804e7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.5.1-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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 084afb716ee144e663623244aee381edcb7fd817d8b3d30969b4ac6e82a7c02a
MD5 290c9e85a132595343d22202ee78dbd0
BLAKE2b-256 f037075ba2274445a2ca19d1ab6388e7a6cd1e5129573e9b8d4be910354b3824

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d56daf032e3063b1df616ac72279fe18371ca9dc03752d432a20f3c37ed549b8
MD5 3f8577d3f184be6ec32623eff501c255
BLAKE2b-256 761ec11e0a4820c12438b36096a1842f63fe407222c2937f0ad2bd90109eac47

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fbfc5835038ce47fce9ee36f22e6e1ae6a1af1423529d389affa701c6d580171
MD5 64b145f0639accb0a2962a83851c092e
BLAKE2b-256 708189d8466b255a222ddaa9e224b35cafad1087ffbcdd8314c000c8e6a43b2f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 72273e033eaf7a7db662402831bd827da5f47848a0757d81f221ecc1dc95b7e0
MD5 aaa7b1e268b58d89b719ea65c4efe5d4
BLAKE2b-256 8fc40db79d6f8bd6bfa16f3fc647991d40c6b6c059682f3bab3df39c619794a5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8c92285920fbae6381f44708aa41bcce81fa5d871394e3eb74202067703a681d
MD5 6af2fc529e80faea610d97710569d509
BLAKE2b-256 0ede3785c125c30bfd25fb88fd60c4e6b9514c0629840598e0db618d8ad410ef

See more details on using hashes here.

Provenance

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