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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fathomdb-0.4.5-cp312-cp312-manylinux_2_28_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fathomdb-0.4.5-cp311-cp311-manylinux_2_28_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

fathomdb-0.4.5-cp310-cp310-manylinux_2_28_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.4.5-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.4.5-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.4.5-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.4.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e2cdd02af116e1247ce99c32ed043141687b3d5c56ed7c6a1f1d4d98fb3e9bff
MD5 1c075f305f22ec6e2c8bf6da3be3fdbd
BLAKE2b-256 d878ebba0848a61e41065aa464df04a4192aeb57eb9bad321ed1786d43ff9e75

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 08ab949aec974ed27714ee977fff609bff9646c3d7a58cfc77bf330177ceb416
MD5 1956eb6022ef7053ea7c58b7921be428
BLAKE2b-256 a0f4aaece042346704eca1f14d6d69583975ae5c42686788931c90af37b36b41

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 adeec0594110ffe848daf34aa44ac56bf0d94b9c55b14da97ed7e647fb904b5a
MD5 c2b5ae11a9c039a98cfcaa657025552e
BLAKE2b-256 cd3ab09c20300f26e89cb47818c29747cf6bff74ce5eeafe4c71032fe3e1b9bd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 73ddfd0c60b2c3f042f4aaf15e5ea06c7e224ff847d7681429c5c977b86e1014
MD5 defea49875eea88d7504bd592996c9e0
BLAKE2b-256 b3752f8885a218a1199256ba82d365eb58d7f547884302c29b1465aa17efbcd1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9905351f69ced543655799f32ccedc37b7b6b388a2f3b4d7a96a9e9d19039168
MD5 b8304dd54ca68803326b6d73a9ec59a0
BLAKE2b-256 8fa3098403fe7aa5b6378271f46c46e5b9238df58feb33201c7f596955e3c23a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.4.5-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.4.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 254483f75c707c2127a07610becbf35dc78c703518fc3cf760dea642e332025b
MD5 f277d3cd46468231f2b04d8168f7faa3
BLAKE2b-256 208c16f2654d1c89c0ac5d45222500aeef031f39222051bbe12403b4e5cc0c91

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 49d9124b5b7426a6b2fc83cb8208a9cdd6d9b9842a84d94f91d642802b7a5453
MD5 0c392b697536b6df1dbfb366e0a7880a
BLAKE2b-256 89d042b81b92e44d5de382c2c9d6a9af1a900563d880e393e4ba4ce8f893a59a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bc59f51f07723a45af453e4281e02c8a66bbc4ee4e80c6adf0ac3f0e09f0a59d
MD5 6d276782b2681c478e6eb601acf8e6a9
BLAKE2b-256 69f02f454e71e834b3dafcf9522738cd1945922f9f1a07acd073a8061de1d0d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7345f09aed275198699ce76321d48accfad9c8113aaa85e0d394907aedffc536
MD5 f2a487ac064bc0a4e4f3d46707090ce3
BLAKE2b-256 134e5bab907bdd171b836b0300086b1ba8259ce281ee744c86e8615e753e26d5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 62adf323fd2d4ea26ec73369dc6d820ebf2b85b63aacde3de14af7a35de9ed1d
MD5 aadfd9db6149491e67786a39749e1fe6
BLAKE2b-256 0e434ca521e76377c98f0b9b5747509349a7b1681625e721e3de63f1c27226d8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.4.5-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.4.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 79ff4fe65bf241e1728a881e104afb61a2fabdb9c77a2675bf8c24f3b2652913
MD5 7c74482f0cca985a9df91c044955a4f3
BLAKE2b-256 93d5fc83c9c1592abac3f6f04ba9df32cd9235564fd3130cbd8433c4845333f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7d91af0553c68496a62e01b830830ed6e8a4a5623bbf495f17f4077f3bfc89d1
MD5 2d9163f8a868fdc87c5bba39598515ae
BLAKE2b-256 fb8a1a34199ca9b5ec63f4b2dc6215f5b6bec0fd8216c9e159dcd3de719bdfd3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 356a9d41c15a9b7cff9336e8b091f984c5a4decf1964433a1a2bb38e3b9e0977
MD5 79aaf561fc6517fa95d8e89c05404785
BLAKE2b-256 4bff8bfcdce3e81172dc555e3c8f4eaa9a1a6244a21fe7403571da50a01314bc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9cb75cf04ff34ad1c5ad8ad91edb2e6152015377348deae8813dec4ada36ed1d
MD5 6d072ad16e6f1474e5cf127ea2deab3c
BLAKE2b-256 af05e83e4f1e1dda4afdafbec9586ea9f26cd2a85db675ac4dba5da103dfd58b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.5-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 12c3206728a532a0877f1b350d5842b253d503f7426a472dc31d305134d000c9
MD5 349cd8903d0cb74d2728f1734a5e3b1d
BLAKE2b-256 26e4267e96b30c4fd53c89f6fb302cc394c41b302866a7c673fc21a22dc1c449

See more details on using hashes here.

Provenance

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