Skip to content

Commit 36a72bf

Browse files
authored
Merge pull request #64 from Accenture/feat/agent-tools-graph
feat(agent-tools): the knowledge-graph tools over Bolt and file.extract (RFC-0013 step 2)
2 parents dcf18cd + 8e2d8d1 commit 36a72bf

17 files changed

Lines changed: 2422 additions & 34 deletions

‎CHANGELOG.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,23 @@
5353
served in-process with redirects to private and foreign hosts, the allowlist and address rules without a network).
5454
The knowledge-graph tools and `file.extract` follow as step 2, the Node.js twin as step 3.
5555

56+
3. **The knowledge-graph tools and `file.extract` complete the built-in agent tools' version 1 (RFC-0013 build plan
57+
step 2).** `graph.schema`, `graph.query`, `graph.write` and `graph.ingest` reach one graph database over the Bolt
58+
protocol (`tools.graph.uri`; the `graph` extra installs the official driver, which reaches Neo4j and Memgraph alike)
59+
in openCypher: the reads register when the URI is set, the writers only with `tools.graph.write=true`, and `DELETE`,
60+
`DETACH DELETE` and `DROP` are refused unless `tools.graph.delete=true`. The schema comes from the database's own
61+
procedures (Neo4j's `db.schema.*`, else Memgraph's `schema.*`) with counts; a query runs in a read transaction, is
62+
refused before sending when it carries a write clause outside a string or a comment, and returns its rows capped by
63+
`tools.graph.max.rows` with nodes, relationships and paths rendered for the model; a write returns the counters; an
64+
ingest merges a model's extraction - nodes by key and label, relationships between existing keys, every value a
65+
parameter, `source` stamped on each - idempotently, in one transaction that checks the endpoints before any
66+
relationship is written. Every statement carries the configured timeout server-side; a database failure comes back
67+
by its own code as a 400 the model can act on, a timeout as a 408, an unreachable database as a 503 logged by type
68+
only. `file.extract` (PDF and Word to text with page markers, a page range and a character cap; HTML and text files
69+
too) registers with the file tools when the `documents` extra (`pypdf`, `python-docx`) is installed.
70+
`dev/graph-up.sh` and `graph-down.sh` run Neo4j Community on Colima for development; the live test runs against it
71+
when `TOOLS_GRAPH_TEST_URI` is set. The five new catalog rows join the `catalog/` folder and `describe`.
72+
5673
### Fixed
5774

5875
1. **A direct `python extensions/mcp-binding/mcp_binding.py` now connects its servers.** The binding attached its boot

‎extensions/agent-tools/README.md‎

Lines changed: 77 additions & 19 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)