dbx-tools-graphiti
Native launcher for Graphiti with local
Neo4j and dbx-model-proxy processes configured for Databricks Model Serving. It runs
directly on the host without Docker, Podman, or another container runtime.
Install from PyPI:
uv add dbx-tools-graphiti
Or install the current main branch:
uv add "dbx-tools-graphiti @ git+https://github.com/reggie-db/dbx-tools.git@main#subdirectory=packages/py/graphiti"
Key features
- launches upstream Graphiti's HTTP MCP server at
http://127.0.0.1:8000/mcp/; - runs Neo4j Community 5.26 as a native background process;
- starts
dbx-model-proxywith an optional profile override, resolved local Databricks authentication, or ambient Databricks App authentication; - supervises Graphiti and the managed model proxy with Honcho so they share one lifecycle, receive SIGTERM as process groups, and receive SIGKILL after Honcho's bounded shutdown grace if needed;
- journals successful graph mutations to Postgres and reconstructs an ephemeral graph backend during startup;
- defaults to
databricks-gpt-5-nanoand the 1024-dimensionaldatabricks-gte-large-enembedding model; - reuses executables from
PATHand installs missing Java 21, uv, Neo4j, and Graphiti source through mise; - pins Graphiti and Neo4j versions for repeatable local environments;
- caches downloads, Python dependencies, Neo4j data, credentials, and logs;
- needs no caller-owned
config.yamland does not vendor Graphiti code.
Quick start
Outside a Databricks App, configure a working Databricks CLI profile. A
Databricks App uses its ambient service-principal authentication. The launcher
installs mise when needed, handles Java, the model proxy, Graphiti, and Neo4j, and
installs uv only when it is not already available:
uv run dbx-graphiti start
The launcher passes --profile or DATABRICKS_CONFIG_PROFILE through when
set. Otherwise dbx-model-proxy delegates profile and ambient App
authentication to its native Databricks client.
The first run downloads about 120 MB of Neo4j plus the pinned Graphiti release,
creates Graphiti's uv environment, generates a local Neo4j password, starts
the model proxy and Neo4j, and then runs Graphiti in the foreground. Later runs reuse
the installed assets.
Honcho stops the sibling process when Graphiti or the managed model proxy exits. On Ctrl-C or SIGTERM it forwards SIGTERM to each child process group, waits up to five seconds, then sends SIGKILL to any remaining group. The launcher stops Neo4j after Honcho finishes.
For background operation:
uv run dbx-graphiti up
uv run dbx-graphiti status
uv run dbx-graphiti down
Commands
startstarts Neo4j, then runs Graphiti and the managed model proxy under Honcho in the foreground. Missing prerequisites are installed on demand. This is the default.upstarts all three services in the background.downsignals the Honcho supervisor, which stops Graphiti and the managed model proxy before the launcher stops Neo4j.statusprints process state, model selection, and the MCP URL as JSON.envprints resolved database, proxy, and model settings as JSON. Its output includes the Neo4j password and must be treated as secret.
Arguments after -- are forwarded to upstream Graphiti:
uv run dbx-graphiti start -- --port 9000 --group-id my-agent
Postgres persistence
DelegatingGraphDriver accepts any Graphiti GraphDriver and delegates its
provider behavior, operations, sessions, transactions, search, and maintenance
to that driver. Mutating Cypher statements are appended to a supplied ordered
storage driver before the graph operation or transaction commits. During the
first index setup, the wrapper clears the delegated graph and replays the
stored mutations in order without journaling them again.
PostgresWriteStorage provides the durable implementation. It stores a
namespaced append-only JSONB journal and accepts the async SQLAlchemy engine
created by dbx-tools-postgres:
from databricks.sdk import WorkspaceClient
from dbx_tools.graphiti.persistence import (
DelegatingGraphDriver,
PostgresWriteStorage,
)
from dbx_tools.postgres import create_async_engine
engine = create_async_engine(WorkspaceClient(), pool_pre_ping=True)
storage = PostgresWriteStorage(engine, namespace="memory-service")
driver = DelegatingGraphDriver(graph_driver, storage)
The bundled MCP launcher enables this automatically when any of these settings is present:
JOURNAL_DATABASE_URL: explicit PostgreSQL URL. The launcher uses asyncpg.PGHOST,LAKEBASE_ENDPOINT, orLAKEBASE_INSTANCE_NAME: resolve the connection and rotating credential throughdbx-tools-postgresandWorkspaceClient.JOURNAL_NAMESPACE: isolates one journal within the table. The launcher derives a stable value from its data directory when omitted. A directdbx_tools.graphiti.serverinvocation must set it explicitly.JOURNAL_TABLE: journal table name. Defaults todbx_tools_graphiti.graphiti_write_journal. A schema-qualified table causes the journal to create that schema when absent, avoiding Lakebase deployments where the application identity cannot write topublic.
When persistence is configured, Postgres initialization or replay failure stops server startup rather than running without durability. The journal is restart recovery for one live graph instance. It does not replicate new writes into other concurrently running Graphiti instances. A process crash after the graph write-ahead append but before the graph commit can leave an unacknowledged mutation in the journal; restart recovery applies journal entries at least once. Graphiti's UUID-backed mutation queries are compatible with this replay model, but a custom delegate or write predicate must supply replay-safe mutations. If the local Neo4j credential no longer matches its ephemeral data directory, the launcher resets that directory only when a Postgres journal is configured, then Graphiti rebuilds it from the journal. Without durable storage, an authentication mismatch fails startup rather than deleting local graph data.
Provisioning and caching
The package deliberately keeps orchestration separate from Graphiti itself:
dbx_tools.core.binchecksPATHbefore asking mise for a tool.- When mise is missing on macOS or Linux, the official checksum-verifying installer runs under a cross-process lock.
- Missing tools are installed globally with
mise use -g --yes, then resolved withmise whichormise where. - Java
21, uv0.11, and Neo4j Community5.26.12use their mise registry backends. - Graphiti
0.29.3uses mise's HTTP backend against the pinned release source archive because the GitHub release has no platform binary asset. uv sync --project <checkout>/mcp_servercreates the upstream environment.- A generated Neo4j password is stored with mode
0600. - The Rust model proxy starts against the selected Databricks profile, and Graphiti receives its OpenAI-compatible URL and model settings through environment variables and CLI flags.
The launcher is supported on macOS and Linux. The cache root is:
- macOS:
~/Library/Application Support/dbx-tools/graphiti - Linux:
${XDG_DATA_HOME:-~/.local/share}/dbx-tools/graphiti
Set DBX_GRAPHITI_HOME to override it. The directory contains links to the
mise-managed tools plus launcher state, logs, and Neo4j data. Removing it
permanently removes the local graph data; mise manages its own download cache
and installation directories separately.
Configuration
Callers do not supply a Graphiti config.yaml. The server creates an empty
temporary YAML file for the lifetime of the upstream process because upstream
requires the argument. Model and server settings resolve from CLI option,
environment variable, then package default:
--profile/DATABRICKS_CONFIG_PROFILE: an optional Databricks profile override for the managed model proxy. When both are absent, native auth resolves the active Databricks identity.--model/MODEL_NAME: defaults todatabricks-gpt-5-nano.--embedder-model/EMBEDDER_MODEL: defaults todatabricks-gte-large-en.--embedder-dimensions/EMBEDDER_DIMENSIONS: defaults to1024.--model-proxy-host/MODEL_PROXY_HOST: defaults to127.0.0.1.--model-proxy-port/MODEL_PROXY_PORT: defaults to4000.--model-proxy-url/MODEL_PROXY_URL: selects an external OpenAI-compatible endpoint.--manage-model-proxy,--no-manage-model-proxy/MANAGE_MODEL_PROXY: explicitly controls whether the launcher owns the proxy.MODEL_PROXY_COMMAND: executable and arguments used for managed mode.LLM_STRUCTURED_OUTPUT_MODE: defaults tojson_object.GRAPHITI_GROUP_ID: defaults upstream tomain.GRAPHITI_HOSTandGRAPHITI_PORT: environment-only listener settings. Without a port, the launcher usesDATABRICKS_APP_PORTwhen present and8000otherwise. Without a host, it binds0.0.0.0in a Databricks App and127.0.0.1elsewhere. The AppKit plugin selects a loopback endpoint for both.NEO4J_URIandNEO4J_DATABASE: default tobolt://127.0.0.1:7687andneo4j.
The launcher sets Graphiti's OpenAI provider and embedding dimensions directly. No OpenAI key is required for its managed local proxy.
To use a separately managed OpenAI-compatible proxy:
uv run dbx-graphiti start \
--model-proxy-url https://models.example/v1 \
--no-manage-model-proxy
Setting MODEL_PROXY_URL also selects external mode automatically. A direct
OPENAI_API_URL selects external OpenAI-compatible mode and requires
OPENAI_API_KEY. --manage-model-proxy overrides either environment choice when
the launcher should still own the local proxy.
Explicit NEO4J_* values override generated defaults, which lets the Graphiti
process use an existing Neo4j server. The launcher still manages its local
Neo4j process; use upstream Graphiti directly if lifecycle ownership belongs to
an external database administrator.
Graphiti owns MCP tools, graph behavior, LLM calls, embeddings, and migrations.
This package owns repeatable installation, Databricks defaults, and process
lifecycle. To run it beside an AppKit server through one Databricks App port,
use @dbx-tools/appkit-graphiti. See the
upstream MCP server documentation
for its complete API.
Modules
cli: Cyclopts commands and CLI-over-environment option binding;settings: model, embedding, profile, and model-proxy resolution;runtime: on-demand provisioning and Honcho lifecycle;server: upstream MCP entry point, temporary config, and persistence wiring;proxy: loopback Caddy process used by the AppKit plugin;persistence: delegating graph driver and Postgres write-ahead journal;supervisor: detachedupentry point.
Release files for dbx-tools-graphiti 0.6.204
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dbx_tools_graphiti-0.6.204.tar.gz | 19.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dbx_tools_graphiti-0.6.204-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.1 kB
Release files / dbx_tools_graphiti-0.6.204.tar.gz
| Download URL | dbx_tools_graphiti-0.6.204.tar.gz |
|---|---|
| Size | 19.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
866a2a53270546806b15b601d39accda83f918620c9a337e3fd4d3d7e4af47f1
|
|
BLAKE2b-256 checksum How to use checksums |
03488f5a3f476bd9c24b0a391ebc631b0bd699bb4cc4ad71ccd1696e46bf24d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / dbx_tools_graphiti-0.6.204-py3-none-any.whl
| Download URL | dbx_tools_graphiti-0.6.204-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eb9f76d03d55a7f8f857577be07755e8828f38908bbed5b19fb0909805b05c57
|
|
BLAKE2b-256 checksum How to use checksums |
fc3404dadc3de6204b07d778f062b1f1fc17e5ddc19a543c4f08a4ce908b61a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency log