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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fathomdb-0.4.0-cp312-cp312-manylinux_2_28_aarch64.whl (2.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

fathomdb-0.4.0-cp312-cp312-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fathomdb-0.4.0-cp311-cp311-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fathomdb-0.4.0-cp311-cp311-manylinux_2_28_aarch64.whl (2.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

fathomdb-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

fathomdb-0.4.0-cp310-cp310-win_amd64.whl (2.0 MB view details)

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

fathomdb-0.4.0-cp310-cp310-manylinux_2_28_aarch64.whl (2.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: fathomdb-0.4.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.0 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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e541c1d5190ab52f429206a98c18d1ce32312280c24e27db101ed92dca48817b
MD5 de763ab6db838ecff8f661dd6262232a
BLAKE2b-256 fc424d0e0a7fa8225036db98b20f3002ff1c1e4074455eae3912a7dfce1ebe14

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dfdfd24b8073e190c409cdd71a8278f2f8c5a408f0646d112bdaa211a5e8c067
MD5 cb65c54183f4ab824cff2f188e347e72
BLAKE2b-256 f7ea2d0ca951cf0badb82626a02d2b792aa44eb3417a6b394c6c3228cd63f918

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 98690b3c04b42732de276043d5fde596c3192254fde33c094847801ea6522546
MD5 351cb1c636a18c9469fca69adb0880f1
BLAKE2b-256 698531a7adb44542c1f08eab34a012ae8b36c90ea08356be123cdb126d35570d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee4efdb1ac851a060969daa1ae0126dd6819d246f1ffa40a387f5dd0270e2aa3
MD5 bf0790cb48bb246b5e73d471d26a9e4d
BLAKE2b-256 fcaa9723e175074911bf1d9f035c2aa1bad5724f09d8d71b1b80a18ce67c139d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 66996d104c9bcc1b29e5730759b40afeaebe4f5ef88ba1627e8cb352992eb13b
MD5 502a79d061037f6f6742a93ba7b31804
BLAKE2b-256 f66b23e12199dfe01d861606abeeeebca68188b261e472e89f3b4adcaeca36fa

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.4.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.0 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.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d17a68d5793831f9d4d7337e09f2ff867b649a0802bd8c536a61696383274a26
MD5 25af7b14625b876511213b307f2fde21
BLAKE2b-256 5ceea8fab4f4ba4eea60a0c8d0ff6317c6e18a3c63b1b077aeeef849e87163f5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4bab78ef2e6777b46bd8c601d41d63a9cffef23d11b32f1338150416e756f6bd
MD5 9a52de002c152a87829f793e15602801
BLAKE2b-256 e066579b72e44e651e2cd0f4e5cbf1508ab6c173bf39bbc6f392543dd59759d7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 41a4935593088d44e474cdd2389b7477743b2208ee9bbb7f4701cc2e1ec6b8d7
MD5 4f55bfd9eb6987033ec3c02e839c8f08
BLAKE2b-256 db9bdce1c40080e243a96af5ee087f9098bb5fdf7e9571a078555dacd2e52f13

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fabb3085134477ad76a7e979f97628d07345079ca3f6ddd10ac5697b32068b10
MD5 5c7c1a86df0fbaee865d59247ae4affd
BLAKE2b-256 7b3054ea3651aa8adcb7eab666c3f2e159005e214b5609bcf0f3f3c85c747f7e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ca82df2e4f27b08318021623daf90f8b62f14e9fd78ce93d7e1469187282dd59
MD5 4caaa3e9f5718525c7d7c9111caae9bf
BLAKE2b-256 44fd7298fecb4ca241f8fc77af70f763f2f61e319a33e5721cf0f54298a43667

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.4.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.0 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.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c0e7256608c0dd754b7fc39c06b9df47a23c1f8811e218a007cba59f436e4a72
MD5 6d3122942a833d0d5b9b7f1e4ab1dc49
BLAKE2b-256 addc5c48444d286a6954518bf58d6b927e028fe413289624665e3c19b09b07ab

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 71c38bdc526174e76558107c826bcd8e474b554c2093f637a4679f4838898bb8
MD5 0dad6070cd0843c49b9b0a7341807c5c
BLAKE2b-256 c4a134470bf3668462a405cc21ed9b68aa72e28d0ecae72b7a919912b9b805c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3aa8435cebc9563f30a8e78748ab7d10bf2037288d67a03f70cb6bcdec5cc02e
MD5 3116e24789ea29e8d80b6ae1da379f19
BLAKE2b-256 fe4ff65e2129dc1f5cbb79fe25bec44aac473484c55d7252764261c5630a2818

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 daa54d80e54ab548731f01a73b5954f7881d437cf4bc60834f852f100173ef8c
MD5 696b322e2fc4aee5a16bf46b05f63f7e
BLAKE2b-256 05da531bf2432ec87931111b162b0f6d9cb91a2181e7063f728cbb160bfce160

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6bf052f497513710de8d22d964401bbc3c5e6bb7a5075f5f6b043c46f2299d7b
MD5 e9fc6ef72815da20e884a108469faa78
BLAKE2b-256 2ed18c3995e123ec3a5e80646a465be0fd3c72272dfc5988d4be364790294b18

See more details on using hashes here.

Provenance

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