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

Uploaded CPython 3.12Windows x86-64

fathomdb-0.3.1-cp312-cp312-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fathomdb-0.3.1-cp312-cp312-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

fathomdb-0.3.1-cp312-cp312-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fathomdb-0.3.1-cp312-cp312-macosx_10_12_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fathomdb-0.3.1-cp311-cp311-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.11Windows x86-64

fathomdb-0.3.1-cp311-cp311-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fathomdb-0.3.1-cp311-cp311-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

fathomdb-0.3.1-cp311-cp311-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fathomdb-0.3.1-cp311-cp311-macosx_10_12_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

fathomdb-0.3.1-cp310-cp310-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.10Windows x86-64

fathomdb-0.3.1-cp310-cp310-manylinux_2_28_x86_64.whl (2.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

fathomdb-0.3.1-cp310-cp310-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

fathomdb-0.3.1-cp310-cp310-macosx_11_0_arm64.whl (2.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.3.1-cp310-cp310-macosx_10_12_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for fathomdb-0.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 70888ebc63138ad96c00a6bae04a66ca58c55584c9bb7115a5d728664b7b42bb
MD5 8858ed389ac8c7957e4d46e240483781
BLAKE2b-256 89778e12a0f288a2c08716c599ace6704bd1e967b54e3af6664a23cc1c7f3490

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f56ac09e069e08c39d963503b97387895354c2573381f116253bacbe260f9f72
MD5 034154ac2332e7f5186daad2a2ac0897
BLAKE2b-256 d22bc282c3a39d208afa78e1ead4e77da663e6918f5bcef97d54a14c3e724a93

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3779eb00b1a59e3a9af05325c87cffacf546fc465496e68bd553dcceb8c89ece
MD5 649c98ae23fecb600e54319ed824b3f6
BLAKE2b-256 34b6d7725a3f1b9415500af257ff681ea8d42f97aaa162e486022ef56a808d94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 211f05231a88f7396767d2396b5b0ed12378eecb5889b3645ef1ea6449e9255c
MD5 60c19b590b77ef3c6bee7c054eb13e93
BLAKE2b-256 7b2461b8be06809dfb0bfdd18b0a8423e3d112fdca525608c9987a795fe7c33b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2777db06abc17c8fb6d14d2dc4a7dfd34075d39395709b0ae4fa90fa99506e10
MD5 cc7d5972084ae606b88cea71d81c1b30
BLAKE2b-256 e044282940943eb5d9359bd792895267037d5571ecba447b93abfd5d42c2fca9

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for fathomdb-0.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8c91fe8fd3d58f866faac2f11ed226291ae88a725b0478c4230ff2379451c344
MD5 2d1dfb02f5dfc241535f2d0980f80193
BLAKE2b-256 a4a27d4a1412a9836e326e659717474af4055becfdc4c76958c6c703eab17a86

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1727c77c68438ac2df1a61a3f9e60cdc2090614f6deca66498ea261ba9a42980
MD5 e1f1462a62498b92c3ebea6c70003896
BLAKE2b-256 3a0f498e3c3275bd2a9b6b27ba73352d0ba1318fc49839d870c72bd6b2663d39

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b640d840b74ccef1cc44c6df4dc782f9c4c043de8a5e43683823c3ca4aa69a53
MD5 3cf8c73a08d2d62f96b63fc261401734
BLAKE2b-256 40b77f249cb2d3cfa1cd7c6471bb0ab22147c965903a745eaf6d385cd795febd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9dcdc8ffc87d6d0c966f7ddf88f8834f490f37cfc2142ae42ee1be4f15a0a347
MD5 02aefca699a60a0920c95542dd9ed70d
BLAKE2b-256 a1a0be03b7245e0bd1b127e3f92e3df098a0d85bfce2b9bb38c207ba6af2e7ce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 97210071290cc2aff16e30f68805fd7d3e94821901b8df44efc69520fc92ddbb
MD5 12c8e8d8456ca9aa0d4e8960f443b8ae
BLAKE2b-256 426b0f8c553a94dced671df9f72feb1b20b76ce4b7da1c023eb5caa51557f170

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for fathomdb-0.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cc0901827b3c33f1091d7183e81a8b3f1ad34c5c7248ae21a53627267d64260a
MD5 dec41a25b7708d7aaba48720e02c8713
BLAKE2b-256 7914e897da4ae712440db77aa43ad0d716e449f321e7c7fa5b4351c5df3d317e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b9be3d4008b98370ab10564e13350a6d9e47056607b1c245cfbe8eeb15434bc
MD5 60f0d35f1c2c56a065a5bc07a2185b5c
BLAKE2b-256 4e7d8e03e032b3ecde88e351a45c75e67132a9070b57e64b34888de1a02ffe2e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 50175fa59ca07cffee8901a5bb2bc82d97c1a6dd02b54422a64c31ddf13cae05
MD5 56e2fe9e4342a14bf164485ee45a45a4
BLAKE2b-256 14f1911a861b9af5fc6baa6022e421487bb8a715899292df1918059bfb10af34

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d4bd30629473ebec321bc23a15bb2d98f98f5a2e22a048d29952191fe2a380db
MD5 bbfddf354390087894d3602a91c61b33
BLAKE2b-256 7e5544d1fc732649d274f8b5ecab311c69804a70dda9da2f46f519d53933af7f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 15bfd3770b794bfbdcaba514e5a5f0db9632f3ed960745737b03580c3607b14e
MD5 fb6fa8bc4415522d9f7784ec677bffe4
BLAKE2b-256 24aa54c827449484391acb65e576131ae39c30d0ae762fe8b31dfb885810143e

See more details on using hashes here.

Provenance

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