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

Uploaded CPython 3.12Windows x86-64

fathomdb-0.4.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.4.1-cp312-cp312-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

fathomdb-0.4.1-cp312-cp312-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

fathomdb-0.4.1-cp311-cp311-manylinux_2_28_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

fathomdb-0.4.1-cp311-cp311-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

fathomdb-0.4.1-cp310-cp310-manylinux_2_28_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

fathomdb-0.4.1-cp310-cp310-macosx_11_0_arm64.whl (2.2 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.4.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.4.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: fathomdb-0.4.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.13

File hashes

Hashes for fathomdb-0.4.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4f9fb8d278c3ec9a7c9795bb3e8ebb12baae18ce8f051a07402bfd6fabff7ccb
MD5 3b8d54b90a37f38d562e79200043ed28
BLAKE2b-256 f788dea29c7e14c0a46bb7bcd4f7e91a01b39aa76463ad2463bf21e289dd0381

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3d8dd0c66e703ff910ddd09f1f4d606a58ba2b5d88a27e07ad2718bdc3fd4d5a
MD5 21a15e133915e07b5b19eeed94668181
BLAKE2b-256 862216e6a00450c6f8608f262e279e93faea2eb529b8ddb8a322b517b8c05533

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 94e350b7a3380855749bc4138ceed780d3c91a65ee20f9663594d869f544e6ab
MD5 6792047cd3d077e77c6a5abdb43dce89
BLAKE2b-256 459bcbce14491cdc602819603f882daabfc3b62e82c6d300958586529183afd7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cad21b64f86cd0abd2fa5cada7f6e880c6536264f0cc902f1060da721b1f57ad
MD5 78f4d7191bb0162d919760d3e58270bb
BLAKE2b-256 3652dfd81cf0ad4b1cff63957f80a6b109ebb0540a1a62fcf9f5f1ae6257b80f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d76771c3889b38bdcbf2ff66ba7592a3fec5a56595bacd652fe91cf80f7febbc
MD5 4532221bf255d277fc54a3118678fa2e
BLAKE2b-256 328a270a5a9989022da661760a7be1b96be636fabbf27127abf14ac386c6d298

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.4.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.13

File hashes

Hashes for fathomdb-0.4.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f6996069306ea1d842fe136b6dedf00153ba0dee623719f638551fbdc7fda9d3
MD5 c8deaf5e52c377b08300b47b792cf869
BLAKE2b-256 370f587747f670ef08d96494a3bd40662857ac601dd63c487e78e7811599a71e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7da4605694e362b9120d5423745265b11369dadfe4456956eefad38ee93d57e7
MD5 741a981956ede56e71a1c31156e3a380
BLAKE2b-256 4f435883851c247013f86248d26c9ccee221d28e25fcc03b87aaf9c395928cf8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fe114cf51f97416998ff1817fc3c12295fcda3d751198a9f0a34da2db1c2f8bd
MD5 a750a57447d84f39fb1ed4ba19c7075a
BLAKE2b-256 c6a5edafd77297bf34cd1468a7081b813b2179ba2371e9d4f21b242771c71932

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b41728ba428f0e503e18f79dcfd0a52b9466c90f57f2975ad23de61648ddc926
MD5 92fab1234c8c017899e49458f99c629a
BLAKE2b-256 a76b6ea168a4764bc599126e5176c2cdd8bc2315147e95498e7629488aa664be

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 12d5d8834c929c54e5bbb4f7d8295f89124a9cc6494d4c12b3c5c152eecd934e
MD5 490f79dcaf9b3860f7b60a0972459a75
BLAKE2b-256 20a97a8598e3f913ed78c737667530338e51fa5a94da1e238d0f9e5e4a3dc99f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.4.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.13

File hashes

Hashes for fathomdb-0.4.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2644a2e39a3fddd100c06e93a4951f5af6a93d55f3b5995662ecba35481ecd06
MD5 2a9eaabfaf39cfd216f984c19f342cc1
BLAKE2b-256 0071b43d5aa3848cdb53b4ce8428dd9c7c23eeb470e34681d47e64ca3b177503

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cb1d6183a6c6f2ec0eaf187111e11329597a46164c9715133867166d6b593aaf
MD5 4d55bba40270c114397b3d65400dc4f0
BLAKE2b-256 49c3e9929ffcf60bbf99ca6b8757511be23300cbc39273bf72fcd5b13ead1672

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 658e02a9acb4429afc45c2f6c521d0faea98b41f960ed0a78376a1f358fcdea9
MD5 c5af80673c3f303fd0952acc2862ebe0
BLAKE2b-256 6ed0d063eb4a0bc278357fd2b7cfc620428d8a7cc73cb5344b5ccd8df42b336b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6318acb39d0d3d74484bebcad37c8d1ade12799fb6660a161188fddb39e530b8
MD5 3cc2a32522bfa4d4948068fb44b4ef55
BLAKE2b-256 94477b47d709f0a6d8f8e23ab9d9c3c1c7972711c8927f3b62a360036e984085

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.4.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b5df24b6da3b0b9eef721bf49f549b1cf1804b04ee85a39eee8030bece173da4
MD5 3ad903c93c410210f423acc07386c35e
BLAKE2b-256 647c329641d13e2ad54ded8deaace909398d1070968cc9bb31a1da25151fe509

See more details on using hashes here.

Provenance

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