arcadedb
The graph query arm — reading, traversing, and editing the knowledge graph at any depth.
This server is the default read path into your knowledge graph — a direct client onto the provisioned-local graph database (ArcadeDB), with no daemon in between. Where knowledge-base builds and manages the graph, this server is what agents use to navigate it: orient, find documents, answer connection questions, traverse neighborhoods, and — when needed — edit nodes and edges directly.
Its tools work for every workspace regardless of depth, which is why
doctrine makes them the first stop. The discovery ladder agents follow is
built into the toolset: graph_skeleton returns the entire project tree in
a few hundred tokens; graph_find_documents finds documents by topic
without writing a query; graph_query_nl answers a natural-language
question with a token-budgeted subgraph; and graph_query takes raw SQL
when precision matters. That ladder is usually far cheaper than reading
files one by one — the graph answers "how do these things connect" before
any document is opened.
How your agents use it
- "Orient yourself in this project." The agent's first call on a
non-trivial task is
graph_skeleton— the whole folder-and-document tree, compact enough to read in one glance. - "Find everything we have on the billing pipeline." —
graph_find_documentssearches document names, descriptions, and summaries;graph_get_neighborsthen walks outward from a hit. - "How does the ingest flow relate to the sync job?" —
graph_query_nlreturns the relevant subgraph within a token budget instead of a pile of files.
Prerequisites
The graph database must be running — it is provisioned and managed from Settings ▸ Database and its dashboard card, and binds a loopback address on your machine. Connection settings live in the configuration reference. No model key is involved — these tools are pure database access, at zero model cost.
Tool reference
| Tool | Parameters | What it does |
|---|---|---|
graph_query | sql*: string | Execute a raw SQL query against the ArcadeDB knowledge graph database. Returns the result rows as JSON. Use for custom queries, analytics, or operations not covered by other tools. The database holds global Folder + Document vertices plus one entity vertex-type per workspace (the live set is the registry — see kb_workspace_list; for the RAW class list incl. orphans use `SELECT name, type FROM schema:types`) and edge types DIRECTED / MENTIONS / CONTAINS / CHILD_OF. Nodes have: entity_id, entity_type, description, source_id. To get edges with resolved entity IDs: SELECT @out.entity_id AS source, @in.entity_id AS target, weight, description FROM DIRECTED |
graph_get_node | entity_id*: string, workspace*: string | Get a specific node from the knowledge graph by its entity_id. Returns all properties of the node including entity_type, description, source_id. |
graph_get_neighbors | entity_id*: string, workspace*: string, direction: string, max_depth: integer, limit: integer | Get nodes connected to a given node. Returns the neighbor nodes and the relationships connecting them. Supports multi-hop traversal. |
graph_upsert_node | entity_id*: string, workspace*: string, entity_type*: string, description: string, source_id: string, properties: object | Create a new node or update an existing node in the knowledge graph. If a node with the given entity_id already exists in the workspace, its properties are updated. Otherwise, a new node is created. |
graph_delete_node | entity_id*: string, workspace*: string | Delete a node and all its connected edges from the knowledge graph. This is destructive and cannot be undone. |
graph_upsert_edge | source_id*: string, target_id*: string, workspace*: string, description: string, weight: number, keywords: string | Create or update a directed edge (relationship) between two nodes. Both source and target nodes must already exist in the workspace. |
graph_delete_edge | source_id*: string, target_id*: string, workspace*: string | Delete a directed edge between two nodes. |
graph_stats | workspace*: string | Get statistics for a workspace: node count, edge count, vector entity/chunk/relationship counts. |
graph_skeleton | workspace: string, include_documents: boolean | Get a compact tree overview of the entire knowledge graph structure — folder names with document counts and subfolder counts. Returns ~300-500 tokens for the full project. Use as the first discovery call to understand the project layout before drilling into specific areas. Set include_documents=true to also list document names per folder. |
graph_find_documents | query*: string, workspace: string, limit: integer | Find Document vertices by searching across name, description, and summary fields. Returns path, name, description, summary, workspaces for each match. Use this instead of raw SQL when you need to discover documents about a topic. Requires description/summary fields to be populated via enrichment. |
graph_query_nl | question*: string, workspace: string, mode: string, depth: integer, budget: integer | Answer a natural-language question about a workspace by returning a COMPACT, TOKEN-BUDGETED SUBGRAPH instead of reading many documents. Scores nodes by relevance to your question (IDF-weighted exact/prefix/substring match over name + description + summary + headings), seeds from the best matches, and walks the graph (hub-suppressed BFS/DFS) to the most relevant connected nodes + edges — rendered to a ~token budget. PREFER THIS over reading files one-by-one when you need to understand how things in the corpus connect. Works on any workspace (default '_root'); richest once cross-document references (R1) + entities exist. Read-only. |
graph_report | workspace: string | Get the deterministic **Graph Report** for a workspace — a narrative analytical summary of the corpus's SHAPE (god-nodes / auto-detected topic communities / surprising cross-cluster connections / reference cycles / knowledge gaps / suggested questions / relationship-confidence breakdown), computed with NO LLM. Use to orient on what a workspace's knowledge IS and where its hubs/gaps are before drilling in. Returns markdown + summary stats. (Proxies the knowledge-base daemon.) |
Where to go next
- Knowledge graph — workspaces, depths, and the two search arms in full
- Cortex — the same graph on a canvas
- knowledge-base — the ingest arm this server queries against