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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.12+ x86-64

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

Uploaded CPython 3.11Windows x86-64

fathomdb-0.3.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.3.0-cp311-cp311-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.12+ x86-64

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

Uploaded CPython 3.10Windows x86-64

fathomdb-0.3.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.3.0-cp310-cp310-manylinux_2_28_aarch64.whl (2.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

fathomdb-0.3.0-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.3.0-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for fathomdb-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d723522488adb0626a5c3d8c1289974b59fbe5c0612fab78db5602f837bb40a0
MD5 5e27f20104e3b3a02a7c4d82e7e7a52f
BLAKE2b-256 b838ac04bc7e4cfc6dc4e3a1fefb70efbc065de0bb3082c206fe3317ea1c1800

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7fdf1913cdfdd66473b810dbadade4f80076f277fed2217fe7e20cc8014cfd81
MD5 33b267c9dae6e5d04a9e6d2a69d0fdc0
BLAKE2b-256 ba67edaa24ac65ea52aadb805ba788960160eaec0b9fcd1306d44f1261d94749

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 cc2acbce4fee9b1ff5fd0237bbb503545751ba64fbb8d744cfc2cf2e641a5f04
MD5 8423975851a3572b170b23777f937cae
BLAKE2b-256 f79416f850108387a5cd7cce4674507218cfcf956ff5e0408170efa471279d75

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 52216041416e3961aa4de6a59cd2211c58803dc7e9460507321ff4e60baad434
MD5 5395ba35de1fc0c5c471474ada2c817d
BLAKE2b-256 722812aacd6a6081f86fc6e8b3531c8d965e7d11d3dbf5ab85d0dc7a98e12db1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 69bd9977a7d19fed235a96357e64791d5719298ac71dc40a8825df156e55f523
MD5 cf97452e8131aa7b7ddd360ccca5fa9e
BLAKE2b-256 05ad911950d8db0025269dfa0ca88d86b3e2302c01a53f9da2ae04a1b79d92cd

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for fathomdb-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 62ed263f8d90fd3337fea3eed2d3805ee7192195ef41dad9bd64d28637324690
MD5 3edce15236a3af827a6e3a3d33d190fb
BLAKE2b-256 7efda7eb774349df90d10903195a7c99c6ee642dd840c0be144dd4e98ac4e37e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5912e33c16d5fa9e97043186761a6207de75a94362193ccdd4ebab7217386c07
MD5 a867f2a26c89c9f7204533168eea3cbc
BLAKE2b-256 58b3ea516dda9d43a74e021ae62595e53d9fd56edbe1dab3645f65fc7f147c51

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bb82c36f28613b9b96a3f58809949dd081b2ca70d9d850b9950800bc7895cd8b
MD5 9fe7c74fe831f187a1281696548d9b9b
BLAKE2b-256 206a96b56a801d6663b1c4d0f87a0f1e3826669421bebf19765f75aea7a9fed1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 38fb056159c7ef8ef1c6b9c14e53181031d200997c1eb917a3547293bd0a45be
MD5 9e581d7cebbd0646587e1a41d8844819
BLAKE2b-256 3d359912421b5241a101714dfbb4a2bb85310a3f088ac7fcc52d6bb54e3cff22

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bd05c4de5d6a7ef8339dd6e4adca759a944e40f2c78bb564b3eb895169c1a364
MD5 4781f0c85c78f0a8a0c689d933ad3a34
BLAKE2b-256 76fb154b3042c639c2b7e64ff1f5518d6336df9b88506e435a9eba3ef2ea0657

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for fathomdb-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 937e820d848a5708832cf74aba4c10a71f2d5e579870400eca5619ca0c6d44be
MD5 12a85e0f9eac57c367024152885134b5
BLAKE2b-256 01a28271d11429cea47df6b4f6363d71e70929cf2a14728a98ad6c694384d46a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 271cf1f29e6878947d7c6f8a365f84ba752687a2a2fce54bfb93c5cb04273d7b
MD5 524240d9514d856fcc8017b0950a19fc
BLAKE2b-256 a165d70feeca78f4de8ebda8ad54ef93640efa31d3c2ddec9448ec94c2e7ec06

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 a81d487b2ecf24ffb4bc271f6b5cc16aac8d4c433f047f228ac7386505035d22
MD5 b28ca457303fbc643715aeacaca70fd9
BLAKE2b-256 fe3254191926804c467fc3f767cbb69ffdde1a94faa5a5cc298374ca167dba66

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6471323134b6deb352b952fb3fb16ab9e5de17fba6d07fe89017257131a50806
MD5 9270512fccb1b721e5fb53860b710077
BLAKE2b-256 ab8c3b67ec9602a108375262d424fcd59fbeb5f172fa4d280d6e4d35379b1be1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for fathomdb-0.3.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 69f751b472fe84830311a704a4e07e15789e872b92c59141b58976158eea8883
MD5 5ff334674e656b31a28810fd670ea194
BLAKE2b-256 156d1c7bba0dc3e6f04d554c1e82442fcb53a5659a6c83960449a269a325800b

See more details on using hashes here.

Provenance

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