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

Uploaded CPython 3.12Windows x86-64

fathomdb-0.5.6-cp312-cp312-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

fathomdb-0.5.6-cp312-cp312-manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

fathomdb-0.5.6-cp312-cp312-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

fathomdb-0.5.6-cp312-cp312-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

fathomdb-0.5.6-cp311-cp311-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.11Windows x86-64

fathomdb-0.5.6-cp311-cp311-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

fathomdb-0.5.6-cp311-cp311-manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

fathomdb-0.5.6-cp311-cp311-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

fathomdb-0.5.6-cp311-cp311-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

fathomdb-0.5.6-cp310-cp310-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.10Windows x86-64

fathomdb-0.5.6-cp310-cp310-manylinux_2_28_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

fathomdb-0.5.6-cp310-cp310-manylinux_2_28_aarch64.whl (2.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

fathomdb-0.5.6-cp310-cp310-macosx_11_0_arm64.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.5.6-cp310-cp310-macosx_10_12_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: fathomdb-0.5.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.4 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.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 16b2d1d238f845cfb2736c9b6e7f649380a23694ab5a58676d41a88a2fa010f0
MD5 0138dcbf3d1822760324b612e83cb6b5
BLAKE2b-256 ebefe7939acd11c2ec30dd9bbec085a432993b7a2f95eb8ae83a796905988e78

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bd68391389930cabd18b5d97b875accd42a4d69f83f03368990d3eb45f3ed351
MD5 e74b3aaf0642bfe4fb67ec453431f7e0
BLAKE2b-256 ff8ab22f67e389a3e8eb7716e4d70520352e5c8d5fa932235789a9d8f6d6de89

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 555c190c0362f6871cd3189e8ad51129673e0a5e8f68c974ecf75be675b9e792
MD5 d507664263f2b39a1983b2bae0cffb54
BLAKE2b-256 b8ef2387ff3a552f20a69a28aa471a101b82c0bcf9709cb3a9f6dc08ec982b37

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc2574b857e24f47cd4e53cde78a6fee442fee4bc3a0225cbbfabb429f3e1a53
MD5 1949eacf17d2c12763217439fd3eda84
BLAKE2b-256 7bed8d56a4a40f20fcc839fbd079a48e9dc7f755176925aa121696ff34344ba9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8e197a8fd87e7828f138abd5565a66ca65b17d34836e7b8c1e5379d20e794e90
MD5 b655574229c554ad16e4072877e77aea
BLAKE2b-256 877acf5dcdf1cd23b19482c73ab9245ea16aefcd176fbd34cdd7e607d6e28db7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.5.6-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.4 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.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2605633bf13468943d84e95f36ece73ed696fb0170c43d5e8b783e42a63c4fb9
MD5 8ab8ffd7d391a29821ede255093629bf
BLAKE2b-256 73a612740cc451aca4f1c5af7eb7ec8a00e45b4653b3b89929b24c3490e291f7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 42ea4c4befb144d9a8db3e24a2f81ef29e33142528b46fce3324457c0528b8f4
MD5 3f71b4b243ed313750ed6fbab1497e2e
BLAKE2b-256 a3299ea07d1465a5a5de29b18a107a93af6c2c60c7527ba71bc7f8e50aa02b43

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c5a45835f44272ebc83656b447e6c4c1dee1680ef4ec0523dc504c7af81f27fd
MD5 7ef7a4fb5eeadb9c2a7aa96da4dc2bd9
BLAKE2b-256 b6c75b33d169887b4c85d5a89290f2f12df8203cd00d2ca8168d92eaf71772c0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 258f4b970a6334edd873028e606864cf6e92e0e34f46569a2f493b4543f06dbc
MD5 76c139780fb9210557671787f0760847
BLAKE2b-256 96f2fd3f0751e7cf37fddc4359c8ccb185061b5a135471346e645c27ddcaf589

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 57f4cdf2fac9fc76a089e3a022e8e8f548ae5ac6264a8331d98a94db9df4db08
MD5 91cf1c27a20ca5bb5340d8b3884b3d4e
BLAKE2b-256 1844da3473ebd0088220276d4c8c34ce2b919c1cf969997c9bd7185a968178a6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: fathomdb-0.5.6-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.4 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.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e8467fdab9068e1fd8df0b2a647242fb6329fd46e8a45dbfc5b13b0b823ebabc
MD5 de258d1ce505cda7b0c2ff865c9748bf
BLAKE2b-256 01f025cb99292a3934ffc20db80e8e6095d1c9775237426af4893f7310abcbaa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7dbcbf08b04e3c1e2aeecf5c51770ff184e27111cbe0c25e734bf117e41fcbe4
MD5 91583d0244876a1cb9ce98a5ec53a46d
BLAKE2b-256 efc03ca82e66e93ec32e9c38f33e7487eeff70469a3acdaf623f0a494b2c39c2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 df64e87305ce8863e83c3716403f37391ed7f52b542a318d3f9f4f520a4b8b48
MD5 0268e0ddb3f66a19da64946c26ce6eca
BLAKE2b-256 56dc460b4e822e05661d8a6579c170756bfdf9ead269d44dcbf6fa67a5ce8779

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 20745efaa85a2cc799eab42544134d4b6e2bde2b8e05162b31eae3cf33691fbb
MD5 2550eb7de9e552b4f15350b8673852e9
BLAKE2b-256 b01f6e9e571d4b03283052baef78871158ce6f3115a34b8537c5a683114eddad

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.5.6-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0b88b43c85ee5f7a81e128256892d6498816cf5b370107b785a1948149078096
MD5 fb24e7bac62ccc08594dd948d09c69d2
BLAKE2b-256 c2de32b9b912958f73dc0e10f18269fc57e552c40cc3191c52efb594a0e077b7

See more details on using hashes here.

Provenance

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