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

Uploaded CPython 3.12Windows x86-64

fathomdb-0.5.0-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.0-cp312-cp312-manylinux_2_28_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

fathomdb-0.5.0-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.0-cp311-cp311-manylinux_2_28_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

fathomdb-0.5.0-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.0-cp310-cp310-manylinux_2_28_aarch64.whl (2.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.5.0-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.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.5.0-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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f93a6dedeee8ab9394f1ba0314f4c49245cfd6eee63a1791d42829f8ae56d44a
MD5 ef2ae8d25b97ecfa5b4f1e5f35a4dab7
BLAKE2b-256 7ea999d01370e4f400247b3fb1f4c306e858fdb9407dff606178495c5e61eb1f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cac5e466e907530ef65d88d72f3a3faf6253ce9299895014024d242acefdd711
MD5 403b36e1fbbf8635e83444441bbc7e2c
BLAKE2b-256 bfbe442856bcd42a1ca5dadb41d7d4da84c743917965fe34c71566390d61c960

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e28eb81a97fba7f8d03cc20e8412db952c83fb8545c8cc90dd754d0f2d07310a
MD5 a64f42a3362d7978e8ccdaee809e0d22
BLAKE2b-256 6c3f0d09541a441774c180e2a1f6d08fa8390ef3e5584926be7d6f5a431a5ec5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0b1b598bd5a2aeaa44e3c5de4d541d5c0e12cd6f3b346db7043e76232df44c82
MD5 2f6858f8aed3ee66c3a8bb8d3f279973
BLAKE2b-256 d3a85d2bcc44cae046185fac0ee5dbfccf561215f1bf9278d1acc229882cd434

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 87fb9a05857acfcd733b08a3cd3b459f9e775640d9e640a9e304256608adc3c8
MD5 f03d15f1e3cdb350eeb202b6058e25c3
BLAKE2b-256 192afaf275cce613a53ad22dbe62914609915868abaab17b7dbe3be32cea7c00

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.5.0-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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b52ba190421f92005148f8e10c08d7409c26166b0f0956e9970603513f2133e3
MD5 08b34bfc1ffb9e72fd9f8eae688ecba7
BLAKE2b-256 52a2bb0be80def13611b81cb7208c57fa550d0ae03d4892a677d65ac3535040d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6b4a497e6b82ab5ebd80754618fd96c5fbaf1483a5f903559189f6b093ddd514
MD5 5de814ae8ab3ea4a7991d162acfe721a
BLAKE2b-256 1bda0ce8c35aa74eb9a6145cc04ef0b846ae0a578e699340687caa077657be42

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2fd79a161839611179f2edf9a5e8ade2208073e5ad89298cea742a539f236e68
MD5 3eb13d8bdf04af2e37408fd279ba66a5
BLAKE2b-256 9f9f66ebdadbe9e1662954aedf17cbeac7dd8b58dbf8297980ff4e44a7bf30f2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 49862417eaa0ad186d8e2c885eb21c51d3dadb03fc29d58b64983e9bfeabacb1
MD5 53f83cc6d7690a0e3ed8155550c1a812
BLAKE2b-256 b0da647ed9a250482d33be693dfdfed1818c46b1684ad11ad6b978be53a8e4d6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c44cb073654f87b2b0bc609d1f7aaf0861e8f2e9a74bf8419051ead583c3e96c
MD5 ead304552d244e40e95656de55c7b631
BLAKE2b-256 267178032859d12238ec0b8b75eabf3d7c210c5ef8b528876bd86d28a11406fe

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.5.0-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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a983f2ed65a4b46c5beb32abff2ab92973fe793894919ea7fbe635616831b09c
MD5 5ca02ed0445fb2872758aac46efba30b
BLAKE2b-256 46b89f5b869b3740681ec8a8b5a0288441cabfc7b0f99ff066d34798bc728430

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0cb55df2d6092ea6887a45f3b06e84e3b65722641fd76cf5a6d54ec86b1a3ab2
MD5 199b95aa20e4c24cdb558d5aa24c073d
BLAKE2b-256 97511ac0798e75c2fd1dcf8341ce4f0bed3ebe308ef2761d587909ef320d6140

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b43fa6c94a863fafe50bd5d7cbcbbe6bb6a634cf6c7aa5284e2d9247a2dbe9ac
MD5 4a9fe6bc100c1df2ed3e389199478a1c
BLAKE2b-256 d22bfb0209f3cc3df636b6606983d96817c7008b4f52bdf6dd412cf22805214d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b005edd71073b6849473990cdd09532dea11e5ab015fdb926a8272eba7d233d5
MD5 6232bb655a311f459d64721fe15bb466
BLAKE2b-256 20a63aa7db2b7a0b28876c97313efc689e210bca00212efa68349cdf622a382f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3cfe8de51aadd09ac37fe5e1f3d622a0d354b5f3c2b1c8ad89b98a1656a0c65b
MD5 b57267e9d8fbcd365eac4f4a5882d690
BLAKE2b-256 13c4c587671db235807427bf2021df595484b2c9078924457da6f24ddc007683

See more details on using hashes here.

Provenance

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