About Dkg MCP Server
Dkg MCP Server is an MCP server published by OriginTrail in the RAG category: originTrail Decentralized Knowledge Graph (DKG) — Shared memory for AI agents. Give Hermes, OpenClaw, Claude Code, Codex, and Cursor a local knowledge-graph memory that several agents can share, with provenance, and verify on-chain when it matters. Open source, Apache-2.0. Conduid read 45 tools from its source: dkg_check_inbox, dkg_context_graph_create, dkg_context_graph_invite, dkg_context_graph_register, dkg_find_agents, dkg_get_agent and 39 more. No package is published for it, so it installs from a source checkout.
The repository has 134 stars and 15 forks, is licensed Apache-2.0, and its last commit was on 2 Dec 2026. The latest release is v10.0.24 (14 Oct 2026): DKG v10.0.24 A patch for queued publications into private Context Graphs. It follows v10.0.23 (9 Oct 2026), and the 5 most recent releases go back to v10.0.19 (28 Sep 2026). It passes all 4 static checks Conduid ran on the repository. Its topics include ai-memory, decentralized, dkg, ethereum, graph and graph-rag.
Install
git clone https://github.com/OriginTrail/dkgTools (45)
dkg_check_inboxRead UNREAD inbound chat messages from other agents. With no arguments, returns every peer message that has not yet been surfaced by a previous `dkg_check_inbox` call, and advances the persistent read-cursor past them. Call this at the start of every session and any time the operator asks 'any messages?' / 'inbox?'. Surface any non-empty digest to the operator BEFORE doing anything else — those peers are waiting for a reply. Supplying any of `peer`, `since`, or a non-default `directionFilter` switches to AD-HOC mode: the supplied filters are honoured and the cursor is NOT advanced (use this for browsing history without losing track of genuinely-unread rows).| Parameter | Type | Description |
|---|---|---|
| directionFilter | string | Default "in" — only show inbound peer messages (the typical inbox view). Set "both" to also see outbound replies (useful when reconstructing a thread). Set "out" for outbound-only. Any non-default value switches to ad-hoc mode. |
| limit | number | Cap on rows returned (default 100, max 200). |
| peer | string | Filter to messages from a single peer (name or peerId). Switches the tool to ad-hoc mode (cursor not advanced). |
| since | number | Unix epoch milliseconds. Only return messages with ts > since. Switches the tool to ad-hoc mode (cursor not advanced). Omit for the normal "unread since last call" view. |
dkg_context_graph_createCreate a context graph (called 'projects' in the DKG node UI). Idempotent — re-creating an existing CG with the same id is a no-op and surfaces `already exists` in the response. Returns the CG's id, URI, and whether it was newly created or already existed. The `id` slug is auto-derived from `name` when omitted (e.g. "My Research" → "my-research"); slugs must match /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/. This create-only slug is not the same contract as existing-CG write targets: after creation, pass the returned canonical `id` or full `did:dkg:context-graph:...` URI to assertion, sub-graph, publish, and other write tools. Defaults to safe `sharing="invite-only"` + `contribution="curators-only"`; switch to `"open"` to make the CG publicly discoverable or to allow anyone to publish to Verifiable Memory respectively.| Parameter | Type | Description |
|---|---|---|
| contribution | string | "open" = any agent may publish to Verifiable Memory. "curators-only" = only the curator may publish (default). Maps to on-chain publishPolicy. |
| description | string | Optional description of the CG's purpose |
| id | string | Optional explicit slug for creating a new CG. Auto-derived from `name` when omitted. Must match /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/. Do not use this field as a model for existing-CG write targets; use the returned canonical id after creation. |
| name * | string | Human-readable name (e.g. "My Research Context Graph") |
| sharing | string | "open" = publicly discoverable, anyone may subscribe. "invite-only" = curator gates membership (default). Maps to on-chain accessPolicy. |
dkg_context_graph_inviteInvite a peer to a context graph using their peer ID. For "share this project with my friend" requests, this is the primary user-facing deliverable because it returns a ready-to-share invite code that the friend can paste into Join. Use this when you have a peer ID but not the friend's agent address, or alongside `dkg_participant_add` when you have both identifiers for a private project.| Parameter | Type | Description |
|---|---|---|
| context_graph_id * | string | Target context graph. ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} |
| peer_id * | string | Target peer ID (12D3KooW...). |
dkg_context_graph_registerRegister an existing local context graph on-chain so it can publish to Verifiable Memory. Idempotent when the graph is already registered. `sharing` and `contribution` override the stored policies when supplied. To use a Publishing Conviction Account, pass its positive decimal `pcaAccountId`; the registration is forced to curated contribution. The transaction signer must own that PCA or be a currently registered agent of that exact PCA. An eligible active PCA consumes one quota-backed registration-deposit waiver, so the signer needs native gas but no separate liquid TRAC registration deposit.| Parameter | Type | Description |
|---|---|---|
| contextGraphId * | string | |
| contribution | string | Optional registration override: "open" = publishPolicy 1, "curators-only" = publishPolicy 0. |
| pcaAccountId | string | Publishing Conviction Account id. Forces curated contribution and requires this node signer to own or be registered to that exact PCA. |
| sharing | string | Optional registration override: "open" = accessPolicy 0, "invite-only" = accessPolicy 1. |
dkg_find_agentsList DKG agents known to this node — combines the local registry (this node + cached peers from the identity layer) with live P2P connection status. Works offline: returns locally-known agents with their last-seen `connectionStatus` even when no peers are currently reachable.dkg_get_agentLook up one agent by URI (or a display name) and return its profile card: framework, operator, wallet address, joined-at, reputation, plus everything that agent has authored in the project.| Parameter | Type | Description |
|---|---|---|
| agentUri | string | Agent URI (e.g. urn:dkg:agent:claude-code-branarakic) |
| nameOrHandle | string | Name or handle substring, if you don't know the URI |
| projectId | string |
dkg_get_entityFetch all triples where the given URI is the subject, plus a 1-hop neighbourhood (inbound edges). Equivalent to the entity detail page in the Node UI. Use when you want to understand a specific decision, task, file, or PR end-to-end.| Parameter | Type | Description |
|---|---|---|
| includeSharedMemory | boolean | When set with view: "working-memory", include SWM in the result set (the WM∪SWM combined view). |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string | Limit the entity and its inbound neighbourhood to a single named sub-graph. |
| uri * | string | Entity URI (e.g. urn:dkg:decision:shacl-on-vm-promotion) |
| view | string | Memory tier (explicit selection is STRICT — pick one tier only): "working-memory" (private WM only — pair with includeSharedMemory: true to add SWM), "shared-working-memory" (team SWM only), "verifiable-memory" (on-chain VM only). Omit `view` to get the WM ∪ SWM default (the V9-era `layer: "union"` shape). |
dkg_get_entity_sourcesFetch the facts about an entity, each tagged with the Knowledge Asset that asserted it (author + KA number). With the default verifiable-memory view these are PUBLISHED, on-chain KA identities you can cite or verify; with shared-working-memory they are PRE-PUBLISH DRAFT handles (a reserved, not-yet-on-chain UAL that may still change or be discarded — not citable on chain). Answers "what is known about X, and who asserted each fact?". Reads ONE memory tier. Facts present only in non-per-KA graphs (root / reconcile / bucket) carry no per-KA identity; their count is disclosed, not listed as sources.| Parameter | Type | Description |
|---|---|---|
| limit | number | Max attributed facts to render (default 100). A high-degree or many-publisher entity is truncated deterministically and the remainder disclosed, so the response cannot exhaust agent context. |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string | Limit the read to a single sub-graph |
| uri * | string | Entity URI (e.g. urn:dkg:decision:shacl-on-vm-promotion) |
| view | string | Memory tier to read sources from. Defaults to verifiable-memory (on-chain, citable). working-memory is intentionally not offered: it is private draft state (the engine requires an agent identity to read it) and is not a citable source. |
dkg_invoke_skillInvoke a remote agent's skill over the DKG network. Use dkg_find_agents with skill_type first. Fails when the peer is offline or the P2P network is unavailable.| Parameter | Type | Description |
|---|---|---|
| input * | string | UTF-8 input (skill-specific semantics). |
| peer_id * | string | Target peer ID (12D3KooW…) or agent name. |
| skill_uri * | string | Skill URI (e.g. "ImageAnalysis"). |
dkg_join_request_approveApprove a pending join request for the given agent address.| Parameter | Type | Description |
|---|---|---|
| agent_address * | string | Requesting agent address (0x...). |
| context_graph_id * | string | Target context graph. ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} |
dkg_join_request_listList pending join requests for a context graph so the curator can review them.| Parameter | Type | Description |
|---|---|---|
| context_graph_id * | string | Target context graph. ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} |
dkg_join_request_rejectReject a pending join request for the given agent address.| Parameter | Type | Description |
|---|---|---|
| agent_address * | string | Requesting agent address (0x...). |
| context_graph_id * | string | Target context graph. ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} |
dkg_knowledge_asset_createStep 1 of the canonical write flow (create → write → finalize → share → publish): create a Working Memory draft for a knowledge asset. Idempotent — duplicate names land as `alreadyExists: true` rather than throwing. Accepts any valid assertion name: an IRI-safe name up to 256 chars (no "/", no whitespace, no <>"{}|^`\ characters) — NOT restricted to a lowercase-hyphen slug.
ONE-SHOT (optional): pass non-empty `quads` to write + seal in this one call — it STOPS at a sealed Working Memory draft (private; does NOT auto-share). Add `alsoShareSwm: true` to also share to Shared Working Memory in the same call, landing a publish-ready knowledge asset in SWM — the recommended create→write→seal→share one-shot. This NEVER mints on-chain: to publish to Verifiable Memory you then call `dkg_knowledge_asset_publish` (the explicit VM step). For the stepwise flow instead, omit `quads` and use `dkg_knowledge_asset_write` / `dkg_knowledge_asset_finalize` / `dkg_knowledge_asset_share` separately.| Parameter | Type | Description |
|---|---|---|
| alsoShareSwm | boolean | When true (and `quads` are supplied), also SHARE the sealed asset to Shared Working Memory in the same call, landing a publish-ready knowledge asset in SWM (the full create→write→seal→share one-shot). Default false: stop at a sealed, private WM draft — sharing (the private→networked step) stays explicit. Ignored when there are no `quads`. |
| name * | string | Assertion name. Any IRI-safe name up to 256 chars (e.g. "session-2026-04-30", "My_Asset.v2") — no "/", whitespace, or <>"{}|^`\ characters. |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| quads | array | Subject URI. Plain string like "urn:my-thing". Angle brackets are tolerated and stripped (`<urn:foo>` → `urn:foo`). MUST NOT contain spaces. |
| subGraphName | string | Optional sub-graph to scope the assertion to |
dkg_knowledge_asset_discardDiscard a Working Memory draft without sharing it. Idempotent — no-op on a missing draft. Use before re-writing an asset whose name you want to keep stable but whose contents you want to *replace* rather than *merge*.| Parameter | Type | Description |
|---|---|---|
| name * | string | Existing assertion name |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string |
dkg_knowledge_asset_finalizeStep 3 of the canonical write flow: seal a knowledge asset's Working Memory draft — computes the merkle root and signs the EIP-712 AuthorAttestation. Finalize always seals the WHOLE draft. The share step also seals automatically, so call this explicitly when custom authorship options are needed or after editing a previously-sealed draft. Sealing works even if the context graph is NOT yet registered on-chain (registration happens at publish). Existing root-scoped SWM assets are read-only. (External-signer / pre-signed attestation is a tracked follow-up and is not exposed by this tool — author with authorAgentAddress.)| Parameter | Type | Description |
|---|---|---|
| authorAgentAddress | string | Optional 0x author address to attest as. Omit to let the daemon default the author to the request token's agent. |
| layer | string | Deprecated no-op compatibility value; omitted on the wire. |
| name * | string | Existing knowledge asset name to finalize |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| schemeVersion | number | Optional attestation scheme version (positive integer) |
| subGraphName | string |
dkg_knowledge_asset_historyFetch an assertion's lifecycle descriptor: author, extraction status, promotion state, timestamps. Returns a 404 (surfaced as a tool error) if no record exists for the (contextGraphId, name, agentAddress) tuple. Useful for debug/audit; not required for the canonical write flow.| Parameter | Type | Description |
|---|---|---|
| agentAddress | string | Optional author — defaults to this node's agent address |
| name * | string | Assertion name |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string |
dkg_knowledge_asset_import_artifact_read_markdownRead Markdown for a completed imported attachment via the daemon content-addressed file store. This never reads arbitrary filesystem paths.| Parameter | Type | Description |
|---|---|---|
| assertionUri * | string | Completed imported assertion URI from the attachment ref |
| fileHash | string | Optional source file hash to verify |
| maxBytes | number | Optional byte cap; daemon maximum is 5 MiB |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string |
dkg_knowledge_asset_import_artifact_resolveOptional validation/debug helper: resolve a completed imported attachment/assertion into deterministic metadata such as source file hash, Markdown hash/form, extraction method, root entity, and structural counts. Skipped imports are rejected.| Parameter | Type | Description |
|---|---|---|
| assertionUri * | string | Completed imported assertion URI from the attachment ref |
| fileHash | string | Optional source file hash to verify |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string |
dkg_knowledge_asset_import_fileImport a local document (markdown, PDF, DOCX, etc.) into a Working Memory draft: the daemon runs its extraction pipeline and writes the resulting triples. text/markdown is native; other types need a registered converter (extraction returns `status: "skipped"` if none). Useful for seeding a context graph from existing documents in a single step.| Parameter | Type | Description |
|---|---|---|
| contentType | string | MIME override (e.g. "text/markdown", "application/pdf"). Inferred from extension when omitted. |
| filePath * | string | Absolute local path to the file to import |
| name * | string | Target assertion name |
| ontologyRef | string | Optional ontology URI to guide extraction |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string |
dkg_knowledge_asset_publishStep 5 of the canonical write flow: publish ONE finalized + shared knowledge asset (by name) from Shared Working Memory to Verifiable Memory on-chain, minting or updating it. Returns the asset's UAL (Universal Asset Locator, `did:dkg:<chainId>/<knowledgeAssetsContractAddress>/<number>` — the middle segment is the KnowledgeAssets (KAV10) contract address, NOT the author; the separate `authorAddress` response field is the (different) seal author) plus `kaId`, `txHash`, `status`, and `kas`. The seal already selects the author and the whole asset — do not pass author or selection overrides. Multi-root-safe. This is THE canonical publish for a single named asset. Fails 409 if the asset is not yet finalized + shared (run dkg_knowledge_asset_finalize / dkg_knowledge_asset_share first). vm/publish AUTO-registers an unregistered context graph on-chain at gas/TRAC cost regardless of `registerIfNeeded` (no explicit register step is needed). `registerIfNeeded: true` only lets you choose the registration's accessPolicy first.| Parameter | Type | Description |
|---|---|---|
| accessPolicy | any | 0 = open, 1 = private. Requires `registerIfNeeded: true` — it only applies when registering the CG, and is rejected otherwise. Sets only the access policy; it does NOT preserve a stored custom publishPolicy (see registerIfNeeded; OriginTrail/dkg#1085). |
| name * | string | Knowledge asset name to publish (must be finalized + shared) |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| publishEpochs | number | Optional number of epochs to publish for (positive integer) |
| publisherNodeIdentityIdOverride | string | Optional publisher node identity id override (non-negative integer, decimal string) |
| registerIfNeeded | boolean | Run an EXPLICIT on-chain registration before publishing, which lets you set `accessPolicy` on that registration. NOTE: this does NOT gate whether registration happens — vm/publish AUTO-registers an unregistered context graph at gas/TRAC cost regardless of this flag. Set it only to choose the registration's accessPolicy (the implicit auto-register on publish otherwise defaults the policy). CAVEAT: this explicit register route registers with the daemon's DEFAULT publishPolicy (derived from accessPolicy) and does NOT preserve a context graph's stored custom publishPolicy / contribution governance. For a CG created with a non-default publishPolicy/PCA, register it explicitly with the desired policy first rather than relying on registerIfNeeded. (Read access is unaffected; daemon-side rehydration tracked in OriginTrail/dkg#1085.) |
| subGraphName | string |
dkg_knowledge_asset_pull_fromSeed a fresh Working Memory draft for a knowledge asset from its current Shared Working Memory (swm) or Verifiable Memory (vm) state — the edit-loop primitive (like git checkout). Use this to re-open an already-shared or published asset for editing. Fails 409 (WM_DRAFT_CONFLICT) if an open draft already exists; pass `onConflict: "replace"` to overwrite it or discard the draft first.| Parameter | Type | Description |
|---|---|---|
| layer * | string | Which layer to seed the draft from: "swm" (Shared Working Memory) or "vm" (Verifiable Memory) |
| name * | string | Knowledge asset name to seed a draft for |
| onConflict | string | What to do if an open WM draft already exists. Defaults to "reject". |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string |
dkg_knowledge_asset_queryReturn every quad in a knowledge asset's Working Memory DRAFT (the un-shared working copy). Query it BEFORE sharing: an atomic share empties the WM draft, so a query after sharing returns 0 quads. To inspect already-shared content use `dkg_query` with `view: "shared-working-memory"` (or `"verifiable-memory"` once published). Not a SPARQL endpoint — for ad-hoc filtering of the draft use `dkg_query` with `view: "working-memory"`.| Parameter | Type | Description |
|---|---|---|
| name * | string | Existing assertion name |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| subGraphName | string |
dkg_knowledge_asset_semantic_enrichment_writeAppend model-derived semantic triples to a completed imported assertion with daemon-stamped provenance. Does not promote, finalize, or publish.| Parameter | Type | Description |
|---|---|---|
| agentIdentity | string | Agent identity URI or label; only URIs are emitted as prov:wasAttributedTo resources |
| assertionUri * | string | Source imported assertion URI from the attachment ref |
| fileHash | string | Optional source file hash to verify |
| generatedAt | string | |
| generationMethod | string | |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| semanticQuads * | array | Model-derived semantic triples; plain-text objects become RDF literals, provenance is added by the daemon, and all triples are appended to the source imported assertion graph |
| subGraphName | string |
dkg_knowledge_asset_shareStep 4 of the canonical write flow: atomically seal and share the complete knowledge asset from private Working Memory to Shared Working Memory. The exact submitted triple set is the asset boundary; root-entity subset selection and unsealed shares are not supported. A successful share is publish-ready — follow it with dkg_knowledge_asset_publish to mint the asset on-chain (Verifiable Memory). If sealing or the complete transfer fails, the operation fails CLOSED (Working Memory preserved) and returns a recovery hint. For custom finalize/attestation options — authorAgentAddress / schemeVersion — call dkg_knowledge_asset_finalize EXPLICITLY first (the default seal cannot carry them).| Parameter | Type | Description |
|---|---|---|
| entities | string | Deprecated no-op compatibility value; omitted on the wire. |
| name * | string | Existing knowledge asset name |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| skipSeal | string | Deprecated no-op compatibility value; omitted on the wire. |
| subGraphName | string |
dkg_knowledge_asset_writeStep 2 of the canonical write flow: append RDF quads into an existing Working Memory draft. Writes are additive (set-merge); callers that want replace semantics should call `dkg_knowledge_asset_discard` first or mint a unique asset name per snapshot.
IMPORTANT — triple shape: each triple has subject/predicate/object. Subjects and predicates are ALWAYS URIs (no spaces). The `object` field accepts EITHER a URI (no surrounding quotes) OR a literal string WRAPPED IN DOUBLE QUOTES. Most common mistake: passing free-text literals without quotes — those get parsed as URIs and fail on the embedded spaces.| Parameter | Type | Description |
|---|---|---|
| name * | string | Existing assertion name (e.g. "my-notes-2026-05-07") |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| quads * | array | Subject URI. Plain string like "urn:my-thing" or "did:dkg:agent/abc". Angle brackets are tolerated and stripped (`<urn:foo>` → `urn:foo`). MUST NOT contain spaces — URIs are space-free by spec. |
| subGraphName | string |
dkg_list_activityRecent activity across all sub-graphs, newest first. Mirrors the "Recent activity" feed on the project overview page: decisions, tasks, PRs, chat turns. Each row shows what changed, when, and who was attributed. Use to catch up at the start of a session.| Parameter | Type | Description |
|---|---|---|
| agentUri | string | Only items attributed to this agent |
| includeSharedMemory | boolean | When set with view: "working-memory", include SWM in the result set (the WM∪SWM combined view). |
| limit | number | |
| projectId | string | |
| sinceIso | string | Earliest timestamp, ISO-8601 |
| subGraph | string | Narrow to one sub-graph (e.g. "decisions", "chat") |
| view | string | Memory tier (explicit selection is STRICT — pick one tier only): "working-memory" (private WM only — pair with includeSharedMemory: true to add SWM), "shared-working-memory" (team SWM only), "verifiable-memory" (on-chain VM only). Omit `view` to get the WM ∪ SWM default (the V9-era `layer: "union"` shape). |
dkg_list_context_graphsList context graphs (shown as 'Context Graphs' in the DKG node UI). Defaults to this caller's created/joined context graphs so agents do not have to sift through noisy discovered public graphs. Pass scope: "all" to inspect every known graph.| Parameter | Type | Description |
|---|---|---|
| scope | string | Defaults to "mine" (created/joined context graphs for this caller). Use "all" for every known graph. |
dkg_memory_searchSearch agent-backed memory across WM/SWM/VM layers in the agent-context graph (and an optional project graph) with trust-weighted ranking. Higher-trust layers (VM > SWM > WM) collapse lower-trust hits for the same entity URI. Use this for "ask my memory anything" recall — for ad-hoc SPARQL prefer `dkg_query`.| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum hits to return after ranking + dedup |
| projectId | string | Optional project context-graph id. When supplied, fan-out adds the project's WM/SWM/VM layers to the agent-context layers. |
| query * | string | Free-text query (case-insensitive, ≥2 chars) |
dkg_participant_addAdd an agent address to a curated/private context graph allowlist. Use this when you know the friend's DKG agent address. For "share with my friend" requests on private projects, prefer returning an invite code too when you also have their peer ID, because allowlisting alone is not the full UI join flow.| Parameter | Type | Description |
|---|---|---|
| agent_address * | string | Friend's DKG agent address (0x...). |
| context_graph_id * | string | Target context graph. ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} |
dkg_participant_listList the allowed agent addresses for a context graph.| Parameter | Type | Description |
|---|---|---|
| context_graph_id * | string | Target context graph. ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} |
dkg_participant_removeRemove an agent address from a curated/private context graph allowlist.| Parameter | Type | Description |
|---|---|---|
| agent_address * | string | Agent address to remove (0x...). |
| context_graph_id * | string | Target context graph. ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} |
dkg_peer_infoDiagnose connectivity to a specific peer. Returns open connections (direction + transport + limited flag), peerStore contents, outbox state, and a `getConnectionsReturnsForPeer` field that diverges from `rawConnectionCount` when libp2p's peerId-keyed lookup is filtering out connections the raw walk can see (the smoking-gun signature for the "inbound circuit open but outbound dial fails" class of asymmetric reachability bugs).| Parameter | Type | Description |
|---|---|---|
| peerId * | string | The libp2p peer ID to diagnose (a base58btc or base32 string, typically starting with `12D3Koo…`). Names are NOT accepted here — resolve first with `dkg_list_agents` if needed. |
dkg_queryExecute an arbitrary SPARQL SELECT / ASK / CONSTRUCT against a DKG context graph. Known prefixes are auto-prepended so you can just write `SELECT ?d WHERE { ?d a decisions:Decision }`. Scope with `view` — "working-memory" (default, private), "shared-working-memory" (team), or "verifiable-memory" (on-chain). `contextGraphId` and `view` are authoritative: local `GRAPH ?g` patterns are constrained to that resolved graph set. Set `includeSharedMemory: true` alongside `view: "working-memory"` to query WM ∪ SWM in one call. Quad writes preserve predicate strings: a predicate written as `rdf:type` is queried as `<rdf:type>`, and an absolute IRI such as `urn:item:1` must be written as `<urn:item:1>`.| Parameter | Type | Description |
|---|---|---|
| includeContextGraphPartitions | boolean | Without view, expand scoped GRAPH variables to registered content partitions. |
| includeSharedMemory | boolean | When set with view: "working-memory", include SWM in the result set (the legacy `layer: "union"` semantics). |
| includeSharedMemoryMeta | boolean | With includeContextGraphPartitions and no view, also read registered subgraph SWM attribution metadata; child context graphs remain excluded. |
| limit | number | Row cap when rendering to markdown; does NOT modify the query |
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
| semantics | string | With a view: "merged" matches patterns outside GRAPH across the view's assets; "per-asset" (the default) inside one asset at a time. |
| sparql * | string | Raw SPARQL query body without Markdown. Prefixes are auto-injected. Wrap absolute IRIs in <...>. Match compact predicate strings written by the quad API exactly: `rdf:type` → `<rdf:type>`, `schema:category` → `<schema:category>`. |
| subGraphName | string | Limit the query to a single sub-graph |
| view | string | Memory tier: working-memory (default, private), shared-working-memory (team), verifiable-memory (on-chain). |
dkg_query_catalog_context_graphsInspect accessible DKG Context Graphs and return only graphs that actually contain saved query-catalog entries. Use only for explicit cross-graph questions such as which/all Context Graphs have catalogs; never infer catalog presence from graph names or descriptions. This tool does not resolve words such as default or current to one graph.| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum number of Context Graphs to inspect. |
| scope | string | Defaults to "mine" (created/joined Context Graphs). Use "all" for every graph known to this node. |
| selectorLimit | number | Maximum saved-query selectors returned per matching Context Graph. Use 0 when only graph ids and counts are needed. |
dkg_query_catalog_listList saved, parameterized queries available in one DKG Context Graph. Returns stable selectors, declared parameters, execution views, and sub-graph scopes. Use this for catalog discovery; it does not execute a query.| Parameter | Type | Description |
|---|---|---|
| catalogSlug | string | |
| limit | number | |
| subGraph | string |
dkg_query_catalog_runExecute one saved query by its stable selector, slug, or exact name. Runtime parameter values are rendered by the DKG query-catalog contract; they are never interpolated as raw SPARQL.| Parameter | Type | Description |
|---|---|---|
| limit | number | |
| parameters | object | |
| selector * | string | Prefer the selector returned by dkg_query_catalog_list. Selectors are scoped to a Context Graph, so pass the same projectId used for that list call. |
dkg_query_catalog_saveSave an immutable parameterized SPARQL query revision in the Context Graph profile catalog. This mutates local DKG state. Never call it unless the user explicitly asks to save a catalog query. Repeating the exact same definition is idempotent; changed definitions create new revisions. Use raw SPARQL and wrap absolute or compact quad IRIs in angle brackets (for example `<urn:item:1>`, `<rdf:type>`, and `<schema:category>`).| Parameter | Type | Description |
|---|---|---|
| catalogDescription | string | |
| catalogName | string | |
| catalogRank | number | |
| catalogSlug | string | |
| description | string | |
| name * | string | |
| parameters | array | |
| rank | number | |
| resultColumn | string | |
| sparql * | string | Parameterized raw SPARQL. Wrap absolute IRIs in <...>. Match predicates written through the quad API exactly, e.g. `<rdf:type>` and `<schema:category>`. Parameter placeholders use {{name}}. |
| subGraph | string | |
| view | string |
dkg_read_messagesRead locally-persisted chat history (messages sent + received through the DKG node). Backed by the node's local message store, so it returns full history offline. Optional filters: `peer` (peer ID or agent name), `limit`, `since` (Unix-ms cutoff).| Parameter | Type | Description |
|---|---|---|
| limit | string | Max messages (default 100, max 1000). |
| peer | string | Filter by peer ID or agent name. |
| since | string | Only messages after this Unix-ms timestamp. |
dkg_send_messageSend an encrypted libp2p chat to another agent on the DKG network. Use when the operator says "ask <name>", "tell <name>", or otherwise asks to communicate with an agent on a different node. `to` accepts either a friendly node name (registered in the agent registry) or a raw peerId. The message is signed with this node's Ed25519 key and encrypted with XChaCha20-Poly1305 against the recipient's libp2p key — the daemon handles all of that. If the receiver has a scoped chat ACL the call fails fast with `unauthorized: …` — surface that to the operator so they can ask the recipient to whitelist this node.| Parameter | Type | Description |
|---|---|---|
| contextGraphId | string | Optional context graph the sender is talking on behalf of. Embedded in the encrypted payload so a scoped receiver can validate the claim against its ACL. Must be supplied explicitly — the daemon does NOT auto-fill from the local node's ACL config, since inbound ACL policy and outbound wire claim are distinct concerns (the local node's chosen scope should not silently appear on every outgoing chat). |
| text * | string | The message body. Plain text. |
| to * | string | Recipient agent. Friendly node name (preferred — e.g. "alice-node") or a raw libp2p peerId. |
dkg_statusShow DKG node status: peer ID, connected peers, multiaddrs, and wallet addresses. Call this to verify the daemon is running and to diagnose connectivity issues.dkg_sub_graph_createCreate a named sub-graph inside a context graph (an optional partition for scoped assertions, e.g. "code", "tasks", "meta"). Idempotent — a pre-existing sub-graph with the same name is silently reused, no error. Names must be lowercase letters, digits, and hyphens, and must not start with `_`.| Parameter | Type | Description |
|---|---|---|
| contextGraphId * | string | Parent context graph id. ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} |
| subGraphName * | string | Sub-graph name (lowercase letters, digits, hyphens; not starting with "_") |
dkg_sub_graph_listList the sub-graphs inside a DKG context graph (e.g. code, github, decisions, tasks, meta, chat) with entity counts. Use to figure out what kind of knowledge the context graph exposes before querying.| Parameter | Type | Description |
|---|---|---|
| projectId | string | ${EXISTING_CONTEXT_GRAPH_ID_DESCRIPTION} Defaults to .dkg/config.yaml. |
dkg_subscribeSubscribe to a context graph so its data syncs locally from peers. Call once before querying or publishing a remotely-authored CG. Defaults to also syncing Shared Working Memory; pass `includeSharedMemory: false` to skip SWM sync (saves bandwidth when you only need on-chain data).| Parameter | Type | Description |
|---|---|---|
| contextGraphId * | string | |
| includeSharedMemory | boolean | Also sync SWM. Default true. |
dkg_wallet_balancesCheck TRAC and ETH token balances for the node's operational wallets. Use before publishing to verify sufficient funds. Returns per-wallet balances, chain id, and RPC URL.memory_searchSearch your DKG-backed memory across all trust tiers (Working Memory drafts, Shared Working Memory, and on-chain Verifiable Memory) in both your agent-context graph and the currently-selected project context graph. Returns the top-N most relevant memory snippets with trust-weighted ranking (VM > SWM > WM). Prefer this over dkg_query for free-text recall; use dkg_query only when you need precise SPARQL control over a known graph pattern.| Parameter | Type | Description |
|---|---|---|
| limit | any | Max hits to return. Integer in [1, 100]. Default 20. |
| query * | string | Free-text search query. Case-insensitive keyword match (≥2 chars). |
Security checks
Static checks derived from the repository 11 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 4.5K words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- ✓Dependencies pinnedDependency versions are pinned by pnpm-lock.yaml.
2 checks have not been run yet.
Releases
README
The repository's README runs to about 4.5K words, fetched a month ago. The original in the repository is authoritative.
Read full README