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

Uploaded CPython 3.12Windows x86-64

fathomdb-0.5.5-cp312-cp312-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fathomdb-0.5.5-cp312-cp312-manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

fathomdb-0.5.5-cp312-cp312-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fathomdb-0.5.5-cp312-cp312-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fathomdb-0.5.5-cp311-cp311-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.11Windows x86-64

fathomdb-0.5.5-cp311-cp311-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fathomdb-0.5.5-cp311-cp311-manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

fathomdb-0.5.5-cp311-cp311-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fathomdb-0.5.5-cp311-cp311-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

fathomdb-0.5.5-cp310-cp310-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.10Windows x86-64

fathomdb-0.5.5-cp310-cp310-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

fathomdb-0.5.5-cp310-cp310-manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

fathomdb-0.5.5-cp310-cp310-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.5.5-cp310-cp310-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: fathomdb-0.5.5-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.4 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.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a5d7af85099ccbc31d2c240fa9670e584092835ac36c97a6f1566cf1b3c7495e
MD5 4405dc73384efec1a4b33c8eb9c7c32c
BLAKE2b-256 a2dabfc79b03c60f4335f2057d31da1e862ed8f7ec4d487b9042815888c40a3e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b139010377c61188bde1082cdefe9926ca449958ce2899f828e64376164eba76
MD5 9a6c4c81f498bca4a92775486ea561c7
BLAKE2b-256 175614d8c0e2dfbb7e6343f59a7349ff816b03d5fc063b8d0f66ee02d1e7bdce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b7228fa2324e39624b04ab667e3bd21d4024904fe807513d67819ebafd2ac56b
MD5 3dad881b71144f22f39b592127a07114
BLAKE2b-256 97aa9ed958b237d2278b46b05f56250ca5619b708190bc4f36456a581660cb37

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a19ad9663910a6d75b361fc3fa4146d0cc44a9936b0bf3a5a536105eef0073c
MD5 fd7f22ec069b64e3842679b01614ab7d
BLAKE2b-256 9843005137b3f5b83880b304e2dcfecdf2bab7cc43596976731d42b9a42c97e7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 715ebeeba30b627f7da4033dff8d52a57494f0b4dbfb1b45b7cada55ccdc4d9e
MD5 b5a58ca03d2ad49d6b24e0d30cf307cf
BLAKE2b-256 63f3e959f01956b4ef4281c7886c5abe49211ef3f0efb2b1a0a632f4b204ca51

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.5.5-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.4 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.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8d251e2e6d36bc22784c8792f41793a7e22f207eb14895bc25c876c1de5e0775
MD5 adfc7a337ef59e43a5babd157d93a677
BLAKE2b-256 00b4e0dd38b44e1c463403208b2cbbf6c8d6b8a53bc86e66369c23d5497291ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e2c7362ffc3168a57fd49ca780d76d9604b8ab005b240dac90ef93cdea8e26cf
MD5 cf3d918b919d74f949b3e3bd33277602
BLAKE2b-256 448f0ab5b200980c50b2e1349431de26551d9705b162cf47714b8ac29a81184c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6d2070f0e503f96da82c1877c7198b8114f0badfd797b6e7dedaa8dc2ea9cb1f
MD5 608c5c52a7ee72801e18ee543a79aebe
BLAKE2b-256 6124a9d2dbdeceacd74c0781c5681d15a4046f0816ad27aeee44ff9b2bc6ce2c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf0c544d7cfdac078bc7febe91abacdb59e93486981915934a07de039cb70a34
MD5 1919bd88e19c145ff44facc0e26da67c
BLAKE2b-256 d0e3ff132ec45b29ade17a505d839d7ecbe99226dfa988a80750e47ce896252e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8ed4a604c71edf90e54486a1803bb6bff0ca777c8a6d9a5e3b3f4050d802df1b
MD5 5be7ade10c294212a88340f6fbb6eda8
BLAKE2b-256 544a6727ea15731c7e6b43b6bc98fb7f2e6dacd1b901413185cd57fd131ec43b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.5.5-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.4 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.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 688d4f3a7a887928e5336bed1e6252616b6b315b2f61990b24883a6441d33b16
MD5 3bcc5bbb5fb070fcadd5fb13508dded0
BLAKE2b-256 fa978dd9f16b7d1ac41600be9d5003a104de6f864a49acd70e7e4720eac4c48c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5bdb7ee20b690ea11e7152dca9ba086d5a52ac4d52d4b7570cddf200666eb821
MD5 5dc85d04049504d4fd822b611e3749fd
BLAKE2b-256 4f3489a18ce30d0dbd8402cb4704067d6126fac0787b48e3876f4fcfa4b39ebe

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d7efcc56d347b32e21dcc7e7e8c5a95662329e7abe71a02b633f021174b060b0
MD5 ff9600c4cfbf976985860273e7ab5bfb
BLAKE2b-256 faded4062d236fbeecb83e0f6f6011ad214626cf37d4ec854cf1f1561820b15f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5f94e668ccae8ec43e0e6cd3df66236560ccc024a745ac6adcf65f1d56b83917
MD5 a8babb2de9e0f72a6564782076c51d11
BLAKE2b-256 bad3dee1731ef2938863ce49cbd18ce07064a6668574ba5adb0982d32759e6ee

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.5-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2c23de3bfae850208af6c44fe2968f9b37389f4f9f0df933b51421d6307a834e
MD5 e1eadc72657cf494bc1563513fa13451
BLAKE2b-256 e2ea031db891130fe272a826292c4937daea62c5ff1b9f95fd7f6fe87e2a03c3

See more details on using hashes here.

Provenance

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