agience-flare-dkg-integration
The governance layer above dkg mcp setup. OriginTrail's official dkg mcp setup (shipped 7 May 2026) makes MCP-to-DKG a two-command commodity. This package is what sits upstream — committed Agience Core artifacts, optional FLARE confidentiality, and typed agience: RDF Knowledge Assets — so what reaches Working Memory is governed, attributable, and SPARQL-queryable, not raw LLM output.
See the head-to-head comparison and design brief.
Features
- MCP stdio server (
agience-dkg-mcp) — exposesagience_wm_write,agience_share(agience_promotealias),agience_searchtools for Claude Desktop, Cursor, Claude Code, and any MCP host - Writes committed Agience artifacts to DKG v10 Working Memory as typed JSON-LD Knowledge Assets with the
agience:RDF vocabulary — SPARQL-queryable by type, author, collection, and memory layer - Promotes eligible assets to Shared Memory (SHARE) via the daemon's
POST /api/knowledge-assets/{name}/swm/share(ordkg-createwithprivacy=publicon MCP transport) - Searches across memory layers via the daemon's
POST /api/query(ordkg-sparql-queryon MCP transport) - Default transport: direct HTTP to the local DKG v10 daemon at
http://127.0.0.1:9201; bearer token auto-read from~/.dkg/auth.token. Alternative transport: MCP Streamable HTTP atPOST /mcpwith SSE stream handling - Distinguishes transport success from blockchain anchoring state (
status: anchoredvsstatus: pending) - FLARE optional path: when
policy_class = "internal-confidential", only derived projections reach DKG; raw content stays encrypted
Install
pip install agience-flare-dkg-integration
MCP Server (Claude Desktop, Cursor, etc.)
Default config uses the local DKG v10 daemon — no token is needed because the daemon transport auto-reads ~/.dkg/auth.token:
{
"mcpServers": {
"agience-dkg": {
"command": "agience-dkg-mcp",
"env": {
"DKG_BASE_URL": "http://127.0.0.1:9201"
}
}
}
}
Tools: agience_wm_write, agience_share (agience_promote alias), agience_search.
To target an MCP-fronted DKG node instead, add "DKG_TRANSPORT": "mcp", set "DKG_BASE_URL": "http://localhost:8083", and add "DKG_TOKEN": "<mcp-bearer>".
CLI
# Default: local DKG v10 daemon. Bearer token auto-read from ~/.dkg/auth.token.
# DKG_BASE_URL defaults to http://127.0.0.1:9201 if unset.
# Write to Working Memory
agience-dkg wm-write \
--title "Architecture Decision: use DKG v10" \
--artifact-type decision \
--artifact-id art-001 \
--content "We will use DKG v10 Working Memory as the shared knowledge substrate." \
--context-graph-id agience-demo \
--collection-id my-project
# Share to Shared Memory (SHARE)
# Pass the Knowledge Asset NAME from the wm-write output (e.g. "art-001-Architecture-Decision-..."),
# NOT the v10.0.1 turnUri (its trailing revision index does not contain the KA name).
agience-dkg share <ka-name> --context-graph-id agience-demo
# agience-dkg promote is still accepted as a backward-compatible alias.
# Search
agience-dkg search "architecture decisions" --context-graph-id agience-demo
Resolved invocation block. Every
wm-writecall prints a# agience-dkg wm-write — resolved invocation (copy to replay):block to stdout before the HTTP call fires, showing all fully-resolved flags with tokens truncated to 8 chars. Useful for testers and reviewers to copy and replay the exact command.
For MCP-fronted DKG nodes, add --transport mcp --base-url http://localhost:8083 --token <mcp-bearer>.
Python API
from agience_dkg_integration import DkgDaemonClient, MemoryTurnRequest
from agience_dkg_integration.formatter import artifact_to_markdown, session_uri_for_collection
# Default: local DKG v10 daemon. Bearer token auto-resolves from ~/.dkg/auth.token.
client = DkgDaemonClient(base_url="http://127.0.0.1:9201")
# Alternative: MCP-fronted DKG node
# from agience_dkg_integration import DkgHttpClient
# client = DkgHttpClient(base_url="http://localhost:8083", bearer_token="<mcp-bearer>")
result = client.memory_turn(MemoryTurnRequest(
contextGraphId="agience-demo",
markdown=artifact_to_markdown(title="My Note", content="...", artifact_type="research-note", artifact_id="art-001"),
layer="wm",
sessionUri=session_uri_for_collection("my-project"),
))
print(result.turn_uri)
Links
License
MIT
Metadata
Release files for agience-flare-dkg-integration 0.4.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agience_flare_dkg_integration-0.4.5.tar.gz | 27.9 kB | With provenance | Details for agience_flare_dkg_integration-0.4.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agience_flare_dkg_integration-0.4.5-py3-none-any.whl | Python 3 | none | any | Details for agience_flare_dkg_integration-0.4.5-py3-none-any.whl |
Total release size: 59.3 kB
Release files / agience_flare_dkg_integration-0.4.5.tar.gz
| Download URL | agience_flare_dkg_integration-0.4.5.tar.gz |
|---|---|
| Size | 27.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e8741fc4f7231e71722e03ba239a41af5c8a1dcf8b1d058b0a8c5c8aa67592b
|
|
BLAKE2b-256 checksum How to use checksums |
a374c40caa095edb8af4be3a3f2e32f7980c5cd4acf9de57963bc8fdf9036a85
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 29, 2026.
Transparency logRelease files / agience_flare_dkg_integration-0.4.5-py3-none-any.whl
| Download URL | agience_flare_dkg_integration-0.4.5-py3-none-any.whl |
|---|---|
| Size | 31.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76657d88188f3e0070c83016e6f7f50efd10d9721632d0b27803ffbea037510e
|
|
BLAKE2b-256 checksum How to use checksums |
de9a7f0cd06162eb0f4432e2b2e211b9d43d31797efaf195938b2314c4bf756d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 29, 2026.
Transparency logSecurity for agience-flare-dkg-integration 0.4.5
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for agience_flare_dkg_integration-0.4.5.tar.gz
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 Jun 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.