graphiti-local 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- graphiti_local-0.4.0/.dockerignore +10 -0
- graphiti_local-0.4.0/.env.example +7 -0
- graphiti_local-0.4.0/.github/ISSUE_TEMPLATE/setup-result.yml +39 -0
- graphiti_local-0.4.0/.github/workflows/ci.yml +23 -0
- graphiti_local-0.4.0/.github/workflows/container.yml +26 -0
- graphiti_local-0.4.0/.gitignore +16 -0
- graphiti_local-0.4.0/CHANGELOG.md +209 -0
- graphiti_local-0.4.0/Dockerfile +19 -0
- graphiti_local-0.4.0/LICENSE +160 -0
- graphiti_local-0.4.0/PKG-INFO +105 -0
- graphiti_local-0.4.0/PRIVACY.md +16 -0
- graphiti_local-0.4.0/README.md +77 -0
- graphiti_local-0.4.0/RELEASE_CHECKLIST.md +30 -0
- graphiti_local-0.4.0/SECURITY.md +10 -0
- graphiti_local-0.4.0/UPSTREAM.md +24 -0
- graphiti_local-0.4.0/assets/graphiti-local-logo.png +0 -0
- graphiti_local-0.4.0/assets/local-memory-demo.gif +0 -0
- graphiti_local-0.4.0/config/falkordb.example.yaml +51 -0
- graphiti_local-0.4.0/config/ladybug.example.yaml +44 -0
- graphiti_local-0.4.0/config/neo4j.example.yaml +46 -0
- graphiti_local-0.4.0/config/ollama.example.yaml +60 -0
- graphiti_local-0.4.0/docs/container.md +64 -0
- graphiti_local-0.4.0/docs/evidence/commands-first-attempt.json +106 -0
- graphiti_local-0.4.0/docs/evidence/commands-schema-two-notes.json +122 -0
- graphiti_local-0.4.0/docs/evidence/commands-second-attempt.json +114 -0
- graphiti_local-0.4.0/docs/evidence/commands-third-attempt.json +42 -0
- graphiti_local-0.4.0/docs/evidence/commands.json +122 -0
- graphiti_local-0.4.0/docs/evidence/mcp.json +316 -0
- graphiti_local-0.4.0/docs/local-demo-results.md +125 -0
- graphiti_local-0.4.0/docs/local-quickstart.md +162 -0
- graphiti_local-0.4.0/docs/reference.md +236 -0
- graphiti_local-0.4.0/examples/local_memory_demo.jsonl +1 -0
- graphiti_local-0.4.0/examples/synthetic_episodes.jsonl +3 -0
- graphiti_local-0.4.0/pyproject.toml +66 -0
- graphiti_local-0.4.0/scripts/mcp_smoke.py +46 -0
- graphiti_local-0.4.0/scripts/release_audit.py +150 -0
- graphiti_local-0.4.0/server.json +21 -0
- graphiti_local-0.4.0/src/kg_mcp/__init__.py +14 -0
- graphiti_local-0.4.0/src/kg_mcp/cli.py +496 -0
- graphiti_local-0.4.0/src/kg_mcp/config.py +258 -0
- graphiti_local-0.4.0/src/kg_mcp/demo.py +197 -0
- graphiti_local-0.4.0/src/kg_mcp/demo_facts.json +11 -0
- graphiti_local-0.4.0/src/kg_mcp/doctor.py +306 -0
- graphiti_local-0.4.0/src/kg_mcp/duplicates.py +77 -0
- graphiti_local-0.4.0/src/kg_mcp/export.py +141 -0
- graphiti_local-0.4.0/src/kg_mcp/fingerprint.py +116 -0
- graphiti_local-0.4.0/src/kg_mcp/ingest.py +469 -0
- graphiti_local-0.4.0/src/kg_mcp/ladybug.py +276 -0
- graphiti_local-0.4.0/src/kg_mcp/output.py +51 -0
- graphiti_local-0.4.0/src/kg_mcp/reranker.py +11 -0
- graphiti_local-0.4.0/src/kg_mcp/restore.py +235 -0
- graphiti_local-0.4.0/src/kg_mcp/retrieval.py +73 -0
- graphiti_local-0.4.0/src/kg_mcp/runtime.py +181 -0
- graphiti_local-0.4.0/src/kg_mcp/server.py +546 -0
- graphiti_local-0.4.0/src/kg_mcp/verify.py +136 -0
- graphiti_local-0.4.0/src/kg_mcp/workspace.py +261 -0
- graphiti_local-0.4.0/src/kg_mcp/write_lock.py +42 -0
- graphiti_local-0.4.0/tests/test_config.py +44 -0
- graphiti_local-0.4.0/tests/test_ingest.py +19 -0
- graphiti_local-0.4.0/tests/test_ladybug_backend.py +226 -0
- graphiti_local-0.4.0/tests/test_release_audit.py +39 -0
- graphiti_local-0.4.0/tests/test_server.py +25 -0
- graphiti_local-0.4.0/tests/test_v02_contract.py +171 -0
- graphiti_local-0.4.0/tests/test_v02_reliability.py +274 -0
- graphiti_local-0.4.0/tests/test_v03_release.py +460 -0
- graphiti_local-0.4.0/tests/test_v04_release.py +335 -0
- graphiti_local-0.4.0/tests/test_workspace.py +35 -0
- graphiti_local-0.4.0/uv.lock +3092 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Local setup result
|
|
2
|
+
description: Share a successful setup or the step where you got stuck.
|
|
3
|
+
title: "Setup result: "
|
|
4
|
+
labels: []
|
|
5
|
+
body:
|
|
6
|
+
- type: dropdown
|
|
7
|
+
id: result
|
|
8
|
+
attributes:
|
|
9
|
+
label: Result
|
|
10
|
+
options:
|
|
11
|
+
- Reached a synthetic query result
|
|
12
|
+
- Reached a synthetic MCP query result
|
|
13
|
+
- Blocked during setup
|
|
14
|
+
validations:
|
|
15
|
+
required: true
|
|
16
|
+
- type: input
|
|
17
|
+
id: environment
|
|
18
|
+
attributes:
|
|
19
|
+
label: Environment
|
|
20
|
+
description: OS, architecture, memory, Python and Ollama versions. No device identifiers.
|
|
21
|
+
validations:
|
|
22
|
+
required: true
|
|
23
|
+
- type: input
|
|
24
|
+
id: models
|
|
25
|
+
attributes:
|
|
26
|
+
label: Models and repository version
|
|
27
|
+
placeholder: qwen2.5:7b; nomic-embed-text; v0.4.0
|
|
28
|
+
- type: textarea
|
|
29
|
+
id: evidence
|
|
30
|
+
attributes:
|
|
31
|
+
label: Synthetic result or failing step
|
|
32
|
+
description: Paste the relevant command and synthetic output. Remove credentials, home paths, and private graph data.
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
35
|
+
- type: input
|
|
36
|
+
id: source
|
|
37
|
+
attributes:
|
|
38
|
+
label: Where did you find the project?
|
|
39
|
+
description: Optional; for example GitHub, a gist, or an MCP directory.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
- uses: astral-sh/setup-uv@v6
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
- run: uv sync --extra dev
|
|
21
|
+
- run: uv run ruff check .
|
|
22
|
+
- run: uv run pytest
|
|
23
|
+
- run: uv run python scripts/release_audit.py . --allow-remote --identity-base origin/main
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Container MCP smoke
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
paths:
|
|
5
|
+
- Dockerfile
|
|
6
|
+
- .dockerignore
|
|
7
|
+
- pyproject.toml
|
|
8
|
+
- uv.lock
|
|
9
|
+
- src/**
|
|
10
|
+
- config/ollama.example.yaml
|
|
11
|
+
- scripts/mcp_smoke.py
|
|
12
|
+
- .github/workflows/container.yml
|
|
13
|
+
pull_request:
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
jobs:
|
|
17
|
+
discovery:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
- uses: astral-sh/setup-uv@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
- run: uv sync --frozen
|
|
25
|
+
- run: docker build -t graphiti-local-smoke .
|
|
26
|
+
- run: uv run --frozen python scripts/mcp_smoke.py docker run --rm -i graphiti-local-smoke
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
This release makes the review boundary apply to model extraction itself, makes current
|
|
6
|
+
facts the safe retrieval default, and hardens the local and HTTP deployment paths.
|
|
7
|
+
|
|
8
|
+
### Breaking
|
|
9
|
+
|
|
10
|
+
- `kg ask` and `search_memory_facts` now suppress facts whose `invalid_at` timestamp
|
|
11
|
+
has passed. Use `kg ask --history` or `include_invalidated: true` for an intentional
|
|
12
|
+
historical query.
|
|
13
|
+
- Version 2 exports are canonical, atomic, and carry a record count and SHA-256 digest.
|
|
14
|
+
Restore verifies them before opening a writer. Version 1 snapshots remain readable.
|
|
15
|
+
- A Ladybug HTTP deployment cannot configure a token for only some groups. Ladybug is
|
|
16
|
+
one embedded graph and cannot enforce that boundary; use a full-graph token or a
|
|
17
|
+
server backend when per-group isolation is required.
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `kg-ingest INPUT --review-output SNAPSHOT` extracts into a disposable Ladybug graph
|
|
22
|
+
and exports the exact resolved nodes, edges, and episodes for review. The configured
|
|
23
|
+
production graph is never opened. The command prints the restore invocation that
|
|
24
|
+
promotes the reviewed snapshot without running extraction again.
|
|
25
|
+
- Streamable HTTP accepts named `server.auth.tokens`, each bound to an enforced group
|
|
26
|
+
list. Multiple tokens may overlap during rotation. The existing `auth.token` and
|
|
27
|
+
`auth.groups` form remains supported.
|
|
28
|
+
- Fact retrieval overfetches the configured candidate multiple, applies the selected
|
|
29
|
+
cross encoder after RRF, preserves separate UUIDs when facts have identical text,
|
|
30
|
+
filters on the final score, and returns the score and ranker with each result.
|
|
31
|
+
- `llm.api_mode` explicitly selects `responses`, `chat`, or endpoint-based `auto` mode.
|
|
32
|
+
`llm.max_tokens` is enforced as a hard ceiling even when an extraction prompt asks
|
|
33
|
+
the upstream client for a larger output.
|
|
34
|
+
- Every Ladybug write path shares a cross-process lock with a configurable timeout,
|
|
35
|
+
including ingest, workspace drain, restore, setup, and review staging.
|
|
36
|
+
- `kg-demo` answers against a packaged synthetic graph in one command, without a model
|
|
37
|
+
server or database setup. `kg ask --keyword` and `kg nodes --keyword` provide the
|
|
38
|
+
same model-free retrieval path for an existing graph.
|
|
39
|
+
- A Docker image and MCP discovery container workflow validate the packaged server and
|
|
40
|
+
its six-tool read-only surface.
|
|
41
|
+
- `server.json` describes the PyPI stdio package for publication in the official MCP
|
|
42
|
+
Registry.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- FalkorDB search removes only a reserved standalone underscore token. Multi-label node
|
|
47
|
+
searches run one compatible query per label and merge UUIDs, avoiding invalid
|
|
48
|
+
RediSearch label expressions while preserving identifiers such as `foo_bar`.
|
|
49
|
+
- Export now fails closed and names the record kind when a backend cannot collect it,
|
|
50
|
+
instead of producing a plausible partial snapshot.
|
|
51
|
+
- Extraction and restore failures include the operation and exception type, including
|
|
52
|
+
a useful fallback for exceptions with an empty message.
|
|
53
|
+
- The release audit checks unpublished commits against the fetched default branch, so
|
|
54
|
+
historical public metadata does not make every later release fail while new private
|
|
55
|
+
author identities remain blocked.
|
|
56
|
+
- The release's CLI and demo changes pass the configured Ruff gate.
|
|
57
|
+
|
|
58
|
+
## 0.3.0
|
|
59
|
+
|
|
60
|
+
0.2.x could run unattended, but not on the fully local profile: on Ladybug every search
|
|
61
|
+
failed, and a running server locked every other command out of the file. This release
|
|
62
|
+
makes the embedded backend hold up under the same rules as the server backends, and it
|
|
63
|
+
closes the loop that `kg export` opened.
|
|
64
|
+
|
|
65
|
+
### Breaking
|
|
66
|
+
|
|
67
|
+
- **graphiti-core is pinned to 0.30.1** (was 0.29.3). Upstream fixes that reach every
|
|
68
|
+
user: node attributes are no longer cleared when no entity type applies, the edge
|
|
69
|
+
reranker shortlist is merged correctly, and Neo4j queries go to the configured
|
|
70
|
+
database. Neo4j Enterprise users with a renamed home database: read the upstream
|
|
71
|
+
0.30.0 notes, queries now target `neo4j` unless `database` is set.
|
|
72
|
+
- **Readers open Ladybug read-only and require a prepared database.** `graphiti-local`,
|
|
73
|
+
`kg ask`, `kg export`, `kg verify` and the other read commands no longer take the
|
|
74
|
+
write lock, so an ingest or a drain runs while the server is up. They refuse to open a
|
|
75
|
+
file without the full-text indexes and name the fix. Existing databases: run
|
|
76
|
+
`kg-ladybug-setup --database PATH --apply` once; it creates the missing indexes and
|
|
77
|
+
does not touch the data.
|
|
78
|
+
- **A write refuses an embedder change.** The first ingest or restore records the
|
|
79
|
+
embedder for its database in `workspace/embedders.json`. A later `kg-ingest`,
|
|
80
|
+
`kg-workspace drain` or restore with a different `embedder.model` or width exits `2`
|
|
81
|
+
instead of mixing two vector spaces in one graph. To move to a new embedder:
|
|
82
|
+
`kg export`, an empty database, `kg-ingest SNAPSHOT --restore --apply`.
|
|
83
|
+
- **`kg` exits `3` when a graph call exceeds `graph.query_timeout_seconds`** (default
|
|
84
|
+
30). The MCP tools return an error object for the same case.
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
|
|
88
|
+
- `kg-ingest SNAPSHOT --restore [--group G] [--apply]` replays a `kg export` snapshot
|
|
89
|
+
into the configured backend: entity names and facts are re-embedded under the
|
|
90
|
+
configured embedder, nodes are saved before the edges that reference them, and records
|
|
91
|
+
keep their UUIDs, so a second restore updates rather than duplicates. An edge whose
|
|
92
|
+
endpoint is not in the graph is reported as failed, not silently skipped. `--group`
|
|
93
|
+
remaps every record, which is how a Ladybug snapshot lands on FalkorDB or Neo4j.
|
|
94
|
+
- `kg duplicates [group ...]` lists entities whose names collide once casing, whitespace
|
|
95
|
+
and punctuation are ignored, with UUIDs and summaries. Read-only; a merge is a
|
|
96
|
+
proposal like any other correction.
|
|
97
|
+
- `graph.query_timeout_seconds` bounds every graph call in the CLI, the six MCP tools and
|
|
98
|
+
`kg verify`. A backend that hangs produces an error an agent can read instead of a
|
|
99
|
+
tool call that never returns.
|
|
100
|
+
- The MCP server reopens its read-only Ladybug handle when the file changes, so facts
|
|
101
|
+
landed by a drain are served without a restart.
|
|
102
|
+
- `server.allowed_hosts` for `streamable-http` behind a reverse proxy: the Host names the
|
|
103
|
+
MCP SDK's DNS-rebinding check accepts. Without it the SDK default applies, which is
|
|
104
|
+
loopback names only on a loopback host and no check elsewhere.
|
|
105
|
+
- `kg --version`, and `-H`/`--human` is accepted after the subcommand as well as before
|
|
106
|
+
it (`kg verify --offline -H`).
|
|
107
|
+
- `kg doctor` reports the installed versions, the recorded embedder for the configured
|
|
108
|
+
database, and whether a Ladybug file has its extensions and full-text indexes.
|
|
109
|
+
- `kg-ladybug-setup --apply` creates the schema and the four full-text indexes as well as
|
|
110
|
+
installing the extensions, so a fresh database answers `kg ask` before anything is
|
|
111
|
+
ingested.
|
|
112
|
+
|
|
113
|
+
### Fixed
|
|
114
|
+
|
|
115
|
+
- Every search on a Ladybug graph raised `Binder exception: Table RelatesToNode_ doesn't
|
|
116
|
+
have an index with name edge_name_and_fact` (#1). graphiti-core's Kuzu driver declares
|
|
117
|
+
its full-text indexes but its index builder is a no-op, so they were never created;
|
|
118
|
+
the edgeless graph in the report was a symptom. Read-write opens and the setup command
|
|
119
|
+
create them now, and an empty graph returns no facts.
|
|
120
|
+
- `kg-workspace drain` and `kg-ingest` report a refused write or a backend that did not
|
|
121
|
+
open as an error with an exit code instead of a traceback.
|
|
122
|
+
- `__version__` reported 0.1.0 whatever the release; it comes from the package metadata.
|
|
123
|
+
- The release audit flagged GitHub's own noreply committer identity on the merge commit
|
|
124
|
+
a pull request run checks out, so every pull request failed CI while the same commit
|
|
125
|
+
passed on push. GitHub's noreply identities are treated as share-safe; the check now
|
|
126
|
+
covers committer identities as well as authors.
|
|
127
|
+
|
|
128
|
+
## 0.2.2
|
|
129
|
+
|
|
130
|
+
- `kg-ingest` handles `SIGTERM` and `SIGINT`: it finishes the record in flight, closes
|
|
131
|
+
the driver, and reports `interrupted: true` so a re-run continues from the ledger.
|
|
132
|
+
Previously a wrapped `timeout` killed the process mid-write. On the embedded Ladybug
|
|
133
|
+
backend that could leave a partial write the database then refused to reopen
|
|
134
|
+
(`Storage exception: Checksum verification failed, the WAL file is corrupted`), which
|
|
135
|
+
took out every later read as well. This was found by an end-to-end run, not in review.
|
|
136
|
+
|
|
137
|
+
A signal cannot save you from `SIGKILL` or a power cut. Take a snapshot with
|
|
138
|
+
`kg export` before a long ingest into an embedded backend.
|
|
139
|
+
|
|
140
|
+
## 0.2.1
|
|
141
|
+
|
|
142
|
+
- `kg doctor` gains an `embedding-dim-binding` check. graphiti reads `EMBEDDING_DIM`
|
|
143
|
+
from the environment once, at import time, and uses that constant to build zero
|
|
144
|
+
vectors during search. If anything imports graphiti before the value is set, searches
|
|
145
|
+
are built at the wrong width while the embedder returns the right one, and nothing
|
|
146
|
+
reports it. The check compares the constant graphiti actually resolved against
|
|
147
|
+
`embedder.dimensions`. This matters most on the local profile, where
|
|
148
|
+
`nomic-embed-text` is 768 and graphiti's own default is 1024.
|
|
149
|
+
- The export header no longer implies an import command exists; embeddings are omitted
|
|
150
|
+
because they are derived from the text under whichever embedder is in use.
|
|
151
|
+
|
|
152
|
+
## 0.2.0 — Runs unattended
|
|
153
|
+
|
|
154
|
+
v0.1.0 was read-first and human-gated, but it assumed a human at the keyboard: output
|
|
155
|
+
was decorated text, a refused write still exited 0, configuration errors surfaced as
|
|
156
|
+
tracebacks mid-run, and a half-finished ingest could not resume. This release makes the
|
|
157
|
+
tool safe to hand to a cron job or an agent.
|
|
158
|
+
|
|
159
|
+
### Breaking
|
|
160
|
+
|
|
161
|
+
- **`kg` prints JSON on stdout by default.** Pass `-H`/`--human` for the previous
|
|
162
|
+
reader-friendly output. Failures now go to stderr and never appear on stdout as a
|
|
163
|
+
success-shaped object.
|
|
164
|
+
- **`kg propose` enforces the group allow-list.** A fact addressed to a group that
|
|
165
|
+
`graph.groups` does not declare is refused with exit code `2` and is not queued.
|
|
166
|
+
Reads always enforced this; the write path did not.
|
|
167
|
+
- **`server.transport: streamable-http` requires `server.auth.token`** (16 characters
|
|
168
|
+
or more). An unauthenticated network transport exposed every configured group.
|
|
169
|
+
- **A known embedding model whose width disagrees with `embedder.dimensions` is now a
|
|
170
|
+
configuration error.** For example `nomic-embed-text` with `1536`. The mismatch was
|
|
171
|
+
previously silent and corrupted every embedding it wrote.
|
|
172
|
+
- `kg-ingest` and `kg-workspace` also default to JSON and accept `-H`.
|
|
173
|
+
|
|
174
|
+
### Added
|
|
175
|
+
|
|
176
|
+
- `kg doctor [--offline]` — preflight for configuration, workspace, backend, LLM and
|
|
177
|
+
embedder. The embedder check calls the live endpoint and compares the real vector
|
|
178
|
+
width against the configured one.
|
|
179
|
+
- `kg verify [--offline]` — asserts the six read tools are registered, that no write
|
|
180
|
+
tool is exposed (a negative control), and that live retrieval works. Run it before
|
|
181
|
+
and after any model, config or backend change.
|
|
182
|
+
- `kg export [group ...] [--output PATH]` — a backend-independent JSONL snapshot
|
|
183
|
+
written from the graphiti models. Embeddings are omitted because they are derived
|
|
184
|
+
from the text and restoring them under a different model would be silently wrong.
|
|
185
|
+
- `reranker:` configuration with `passthrough` (default, no extra model call), `bge`
|
|
186
|
+
(local, `uv sync --extra rerank`), `openai` and `gemini`. Upstream ships these
|
|
187
|
+
cross-encoders; there was previously no way to select one.
|
|
188
|
+
- `config/ollama.example.yaml` — a fully local profile: local model, local embedder,
|
|
189
|
+
embedded Ladybug backend, no API key.
|
|
190
|
+
- Resumable ingestion: every applied record is recorded in a content-keyed ledger, so
|
|
191
|
+
re-running a file ingests only what has not landed. `--no-resume` ignores the ledger.
|
|
192
|
+
- Per-record fault isolation in ingestion: one failing episode no longer costs the
|
|
193
|
+
batch. Failures are reported and set a non-zero exit code. `--fail-fast` restores the
|
|
194
|
+
previous behaviour. `--skip-invalid` tolerates malformed input lines.
|
|
195
|
+
|
|
196
|
+
### Fixed
|
|
197
|
+
|
|
198
|
+
- `kg-workspace drain` archived a proposal even when its ingestion did not succeed,
|
|
199
|
+
which lost the proposal. It now archives only what landed and leaves the rest
|
|
200
|
+
approved for the next drain.
|
|
201
|
+
- The proposal queue rejected group names that `graph.groups` accepts (it required
|
|
202
|
+
lowercase and disallowed dots). A configurable group is now always proposable.
|
|
203
|
+
- `kg doctor` reports the resolved absolute Ladybug path; a relative path is read from
|
|
204
|
+
the working directory, which is rarely what the reader assumes.
|
|
205
|
+
|
|
206
|
+
## 0.1.0
|
|
207
|
+
|
|
208
|
+
Initial standalone release: six read-only MCP tools, the `kg` CLI, explicit dry-run
|
|
209
|
+
ingestion, and the human-gated proposal queue.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Stdio discovery image for MCP directory evaluation; no private graph is copied.
|
|
2
|
+
FROM ghcr.io/astral-sh/uv:0.12.13 AS uv
|
|
3
|
+
FROM python:3.12-slim
|
|
4
|
+
COPY --from=uv /uv /usr/local/bin/uv
|
|
5
|
+
WORKDIR /app
|
|
6
|
+
COPY pyproject.toml uv.lock README.md ./
|
|
7
|
+
COPY src ./src
|
|
8
|
+
COPY config/ollama.example.yaml ./config/ollama.example.yaml
|
|
9
|
+
RUN uv sync --frozen --no-dev \
|
|
10
|
+
&& useradd --create-home --uid 10001 mcp \
|
|
11
|
+
&& mkdir /data \
|
|
12
|
+
&& chown mcp:mcp /data
|
|
13
|
+
ENV PATH="/app/.venv/bin:$PATH" \
|
|
14
|
+
GRAPHITI_LOCAL_CONFIG=/app/config/ollama.example.yaml \
|
|
15
|
+
KG_WORKSPACE_DIR=/data \
|
|
16
|
+
KG_LADYBUG_PATH=/data/graph.ladybug
|
|
17
|
+
USER mcp
|
|
18
|
+
RUN kg-ladybug-setup --database /data/graph.ladybug --apply
|
|
19
|
+
ENTRYPOINT ["graphiti-local"]
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and
|
|
10
|
+
distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
|
13
|
+
owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities
|
|
16
|
+
that control, are controlled by, or are under common control with that entity.
|
|
17
|
+
For the purposes of this definition, "control" means (i) the power, direct or
|
|
18
|
+
indirect, to cause the direction or management of such entity, whether by
|
|
19
|
+
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
20
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
21
|
+
|
|
22
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
|
23
|
+
permissions granted by this License.
|
|
24
|
+
|
|
25
|
+
"Source" form shall mean the preferred form for making modifications, including
|
|
26
|
+
but not limited to software source code, documentation source, and configuration
|
|
27
|
+
files.
|
|
28
|
+
|
|
29
|
+
"Object" form shall mean any form resulting from mechanical transformation or
|
|
30
|
+
translation of a Source form, including but not limited to compiled object code,
|
|
31
|
+
generated documentation, and conversions to other media types.
|
|
32
|
+
|
|
33
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
|
34
|
+
available under the License, as indicated by a copyright notice that is included
|
|
35
|
+
in or attached to the work (an example is provided in the Appendix below).
|
|
36
|
+
|
|
37
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
|
38
|
+
is based on (or derived from) the Work and for which the editorial revisions,
|
|
39
|
+
annotations, elaborations, or other modifications represent, as a whole, an
|
|
40
|
+
original work of authorship. For the purposes of this License, Derivative Works
|
|
41
|
+
shall not include works that remain separable from, or merely link (or bind by
|
|
42
|
+
name) to the interfaces of, the Work and Derivative Works thereof.
|
|
43
|
+
|
|
44
|
+
"Contribution" shall mean any work of authorship, including the original version
|
|
45
|
+
of the Work and any modifications or additions to that Work or Derivative Works
|
|
46
|
+
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
|
47
|
+
by the copyright owner or by an individual or Legal Entity authorized to submit
|
|
48
|
+
on behalf of the copyright owner. For the purposes of this definition,
|
|
49
|
+
"submitted" means any form of electronic, verbal, or written communication sent
|
|
50
|
+
to the Licensor or its representatives, including but not limited to
|
|
51
|
+
communication on electronic mailing lists, source code control systems, and
|
|
52
|
+
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
|
53
|
+
the purpose of discussing and improving the Work, but excluding communication
|
|
54
|
+
that is conspicuously marked or otherwise designated in writing by the copyright
|
|
55
|
+
owner as "Not a Contribution."
|
|
56
|
+
|
|
57
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of
|
|
58
|
+
whom a Contribution has been received by Licensor and subsequently incorporated
|
|
59
|
+
within the Work.
|
|
60
|
+
|
|
61
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this
|
|
62
|
+
License, each Contributor hereby grants to You a perpetual, worldwide,
|
|
63
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright license to
|
|
64
|
+
reproduce, prepare Derivative Works of, publicly display, publicly perform,
|
|
65
|
+
sublicense, and distribute the Work and such Derivative Works in Source or Object
|
|
66
|
+
form.
|
|
67
|
+
|
|
68
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License,
|
|
69
|
+
each Contributor hereby grants to You a perpetual, worldwide, non-exclusive,
|
|
70
|
+
no-charge, royalty-free, irrevocable (except as stated in this section) patent
|
|
71
|
+
license to make, have made, use, offer to sell, sell, import, and otherwise
|
|
72
|
+
transfer the Work, where such license applies only to those patent claims
|
|
73
|
+
licensable by such Contributor that are necessarily infringed by their
|
|
74
|
+
Contribution(s) alone or by combination of their Contribution(s) with the Work
|
|
75
|
+
to which such Contribution(s) was submitted. If You institute patent litigation
|
|
76
|
+
against any entity (including a cross-claim or counterclaim in a lawsuit)
|
|
77
|
+
alleging that the Work or a Contribution incorporated within the Work
|
|
78
|
+
constitutes direct or contributory patent infringement, then any patent licenses
|
|
79
|
+
granted to You under this License for that Work shall terminate as of the date
|
|
80
|
+
such litigation is filed.
|
|
81
|
+
|
|
82
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or
|
|
83
|
+
Derivative Works thereof in any medium, with or without modifications, and in
|
|
84
|
+
Source or Object form, provided that You meet the following conditions:
|
|
85
|
+
|
|
86
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of
|
|
87
|
+
this License; and
|
|
88
|
+
|
|
89
|
+
(b) You must cause any modified files to carry prominent notices stating that
|
|
90
|
+
You changed the files; and
|
|
91
|
+
|
|
92
|
+
(c) You must retain, in the Source form of any Derivative Works that You
|
|
93
|
+
distribute, all copyright, patent, trademark, and attribution notices from the
|
|
94
|
+
Source form of the Work, excluding those notices that do not pertain to any part
|
|
95
|
+
of the Derivative Works; and
|
|
96
|
+
|
|
97
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then
|
|
98
|
+
any Derivative Works that You distribute must include a readable copy of the
|
|
99
|
+
attribution notices contained within such NOTICE file, excluding those notices
|
|
100
|
+
that do not pertain to any part of the Derivative Works, in at least one of the
|
|
101
|
+
following places: within a NOTICE text file distributed as part of the
|
|
102
|
+
Derivative Works; within the Source form or documentation, if provided along
|
|
103
|
+
with the Derivative Works; or, within a display generated by the Derivative
|
|
104
|
+
Works, if and wherever such third-party notices normally appear. The contents of
|
|
105
|
+
the NOTICE file are for informational purposes only and do not modify the
|
|
106
|
+
License. You may add Your own attribution notices within Derivative Works that
|
|
107
|
+
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
|
108
|
+
provided that such additional attribution notices cannot be construed as
|
|
109
|
+
modifying the License.
|
|
110
|
+
|
|
111
|
+
You may add Your own copyright statement to Your modifications and may provide
|
|
112
|
+
additional or different license terms and conditions for use, reproduction, or
|
|
113
|
+
distribution of Your modifications, or for any such Derivative Works as a whole,
|
|
114
|
+
provided Your use, reproduction, and distribution of the Work otherwise
|
|
115
|
+
complies with the conditions stated in this License.
|
|
116
|
+
|
|
117
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any
|
|
118
|
+
Contribution intentionally submitted for inclusion in the Work by You to the
|
|
119
|
+
Licensor shall be under the terms and conditions of this License, without any
|
|
120
|
+
additional terms or conditions. Notwithstanding the above, nothing herein shall
|
|
121
|
+
supersede or modify the terms of any separate license agreement you may have
|
|
122
|
+
executed with Licensor regarding such Contributions.
|
|
123
|
+
|
|
124
|
+
6. Trademarks. This License does not grant permission to use the trade names,
|
|
125
|
+
trademarks, service marks, or product names of the Licensor, except as required
|
|
126
|
+
for reasonable and customary use in describing the origin of the Work and
|
|
127
|
+
reproducing the content of the NOTICE file.
|
|
128
|
+
|
|
129
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
|
|
130
|
+
writing, Licensor provides the Work (and each Contributor provides its
|
|
131
|
+
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
132
|
+
KIND, either express or implied, including, without limitation, any warranties
|
|
133
|
+
or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
134
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
135
|
+
appropriateness of using or redistributing the Work and assume any risks
|
|
136
|
+
associated with Your exercise of permissions under this License.
|
|
137
|
+
|
|
138
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in
|
|
139
|
+
tort (including negligence), contract, or otherwise, unless required by
|
|
140
|
+
applicable law (such as deliberate and grossly negligent acts) or agreed to in
|
|
141
|
+
writing, shall any Contributor be liable to You for damages, including any
|
|
142
|
+
direct, indirect, special, incidental, or consequential damages of any character
|
|
143
|
+
arising as a result of this License or out of the use or inability to use the
|
|
144
|
+
Work (including but not limited to damages for loss of goodwill, work stoppage,
|
|
145
|
+
computer failure or malfunction, or any and all other commercial damages or
|
|
146
|
+
losses), even if such Contributor has been advised of the possibility of such
|
|
147
|
+
damages.
|
|
148
|
+
|
|
149
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or
|
|
150
|
+
Derivative Works thereof, You may choose to offer, and charge a fee for,
|
|
151
|
+
acceptance of support, warranty, indemnity, or other liability obligations
|
|
152
|
+
and/or rights consistent with this License. However, in accepting such
|
|
153
|
+
obligations, You may act only on Your own behalf and on Your sole responsibility,
|
|
154
|
+
not on behalf of any other Contributor, and only if You agree to indemnify,
|
|
155
|
+
defend, and hold each Contributor harmless for any liability incurred by, or
|
|
156
|
+
claims asserted against, such Contributor by reason of your accepting any such
|
|
157
|
+
warranty or additional liability.
|
|
158
|
+
|
|
159
|
+
END OF TERMS AND CONDITIONS
|
|
160
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: graphiti-local
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: A local-first temporal knowledge graph with a read-only MCP server and CLI
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: falkordb,graphiti,knowledge-graph,ladybugdb,mcp
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Requires-Python: <4,>=3.10
|
|
15
|
+
Requires-Dist: filelock<4,>=3.16
|
|
16
|
+
Requires-Dist: graphiti-core[falkordb]==0.30.1
|
|
17
|
+
Requires-Dist: ladybug<1,>=0.19.1
|
|
18
|
+
Requires-Dist: mcp<2,>=1.27
|
|
19
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
20
|
+
Requires-Dist: pyyaml<7,>=6.0
|
|
21
|
+
Provides-Extra: dev
|
|
22
|
+
Requires-Dist: pytest-asyncio<1,>=0.26; extra == 'dev'
|
|
23
|
+
Requires-Dist: pytest<9,>=8.3; extra == 'dev'
|
|
24
|
+
Requires-Dist: ruff<1,>=0.12; extra == 'dev'
|
|
25
|
+
Provides-Extra: rerank
|
|
26
|
+
Requires-Dist: sentence-transformers<6,>=3.2.1; extra == 'rerank'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+

|
|
30
|
+
|
|
31
|
+
# Graphiti Local
|
|
32
|
+
|
|
33
|
+
**Local memory for your agents. You approve what they learn.**
|
|
34
|
+
|
|
35
|
+
Retrieve project decisions through six read-only MCP tools or the `kg` CLI.
|
|
36
|
+
Proposed updates stay in a separate queue until a human approves and applies them.
|
|
37
|
+
Ollama handles local inference; embedded LadybugDB stores the graph. No Docker or
|
|
38
|
+
cloud API key is needed for the local setup.
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+
|
|
42
|
+
*Captured output excerpts with pauses condensed. [Measured results and limitations](docs/local-demo-results.md).*
|
|
43
|
+
|
|
44
|
+
## Try it in one command
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uvx --from git+https://github.com/renezander030/graphiti-local kg-demo
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Answers a question against a small synthetic graph shipped with the package. No Ollama,
|
|
51
|
+
no model downloads, no database setup: retrieval runs on keywords alone, so nothing
|
|
52
|
+
contacts a model. Ask your own question by passing it as an argument.
|
|
53
|
+
|
|
54
|
+
This is the read path only. Building a graph from your own text needs extraction, which
|
|
55
|
+
needs a model, and that is the full setup below.
|
|
56
|
+
|
|
57
|
+
## Try it locally
|
|
58
|
+
|
|
59
|
+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and
|
|
60
|
+
[Ollama](https://docs.ollama.com/quickstart), then start Ollama. Setup downloads
|
|
61
|
+
need internet access. Run these commands in bash or zsh:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
git clone https://github.com/renezander030/graphiti-local.git
|
|
65
|
+
cd graphiti-local
|
|
66
|
+
uv sync --frozen
|
|
67
|
+
ollama pull qwen2.5:7b
|
|
68
|
+
ollama pull nomic-embed-text
|
|
69
|
+
export GRAPHITI_LOCAL_CONFIG="$PWD/config/ollama.example.yaml"
|
|
70
|
+
export KG_WORKSPACE_DIR="$PWD/workspace/local-demo"
|
|
71
|
+
export KG_LADYBUG_PATH="$KG_WORKSPACE_DIR/graph.ladybug"
|
|
72
|
+
uv run --frozen kg-ladybug-setup --database "$KG_LADYBUG_PATH" --apply
|
|
73
|
+
uv run --frozen kg doctor
|
|
74
|
+
uv run --frozen kg-ingest examples/local_memory_demo.jsonl --apply
|
|
75
|
+
uv run --frozen kg ask "Which database does Aurora Analytics use?" example
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The synthetic example returns **DuckDB**. Follow the [complete walkthrough](docs/local-quickstart.md)
|
|
79
|
+
to propose PostgreSQL, review and apply that update, and retrieve it from an MCP client.
|
|
80
|
+
Model extraction can be wrong; inspect the returned facts and validity timestamps.
|
|
81
|
+
|
|
82
|
+
To review extraction before it touches the configured graph, run
|
|
83
|
+
`kg-ingest INPUT --review-output review.jsonl`, inspect the snapshot, then use the
|
|
84
|
+
printed restore command to promote those exact records. Searches return current facts
|
|
85
|
+
by default; `kg ask --history` is the explicit historical view.
|
|
86
|
+
|
|
87
|
+
## Is it a fit?
|
|
88
|
+
|
|
89
|
+
Use it for local agent memory with explicit human review. Skip it if you need
|
|
90
|
+
agents to write through MCP or want a hosted service without local setup.
|
|
91
|
+
FalkorDB and Neo4j are also supported.
|
|
92
|
+
|
|
93
|
+
- [Setup and MCP configuration](docs/local-quickstart.md)
|
|
94
|
+
- [Commands, ingestion, backups, and deployment](docs/reference.md)
|
|
95
|
+
- [Privacy](PRIVACY.md) · [Security](SECURITY.md) · [Container discovery](docs/container.md)
|
|
96
|
+
- [Report a successful or blocked setup](https://github.com/renezander030/graphiti-local/issues/new?template=setup-result.yml)
|
|
97
|
+
|
|
98
|
+
If this helps your workflow, star the repository and share your setup result.
|
|
99
|
+
|
|
100
|
+
Maintained by [René Zander](https://renezander.com/projects/graphiti-local/), who builds context layers for AI agents on temporal knowledge graphs.
|
|
101
|
+
|
|
102
|
+
Independent community project built on [Graphiti](https://github.com/getzep/graphiti),
|
|
103
|
+
not affiliated with or endorsed by Zep. [Apache-2.0](LICENSE).
|
|
104
|
+
|
|
105
|
+
<!-- mcp-name: io.github.renezander030/graphiti-local -->
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Privacy defaults
|
|
2
|
+
|
|
3
|
+
- MCP registers six read-only tools. It does not register ingestion, deletion,
|
|
4
|
+
approval, or graph-maintenance tools.
|
|
5
|
+
- `GRAPHITI_TELEMETRY_ENABLED=false` is set before Graphiti is imported.
|
|
6
|
+
- The default HTTP bind address is `127.0.0.1`.
|
|
7
|
+
- Configuration contains environment-variable references, never credentials.
|
|
8
|
+
- Group names are an allow-list. A caller cannot select an unconfigured graph.
|
|
9
|
+
- Proposals remain in a local JSONL workspace until a human approves them and
|
|
10
|
+
explicitly runs `kg-workspace drain --apply`.
|
|
11
|
+
- Ladybug extensions are installed only by `kg-ladybug-setup --apply`; opening a
|
|
12
|
+
graph for reading does not download extensions.
|
|
13
|
+
|
|
14
|
+
The graph itself may contain sensitive data. Authentication, network exposure,
|
|
15
|
+
database access controls, backups, and retention remain deployment concerns.
|
|
16
|
+
|