Skip to main content

Governed authoring layer above DKG v10: commit-gated Agience artifacts, policy-controlled projection, FLARE confidentiality, typed agience: RDF Knowledge Assets.

Project description

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) — exposes agience_wm_write, agience_promote, agience_search tools 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 dkg-create (privacy=public)
  • Searches across memory layers via dkg-sparql-query with typed predicates
  • All DKG calls use MCP Streamable HTTP at POST /mcp with SSE stream handling
  • Distinguishes MCP transport success from blockchain anchoring state (status: anchored vs status: 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.)

Add to your MCP client config:

{
  "mcpServers": {
    "agience-dkg": {
      "command": "agience-dkg-mcp",
      "env": {
        "DKG_BASE_URL": "http://localhost:8081",
        "DKG_TOKEN": "your-bearer-token"
      }
    }
  }
}

Tools: agience_wm_write, agience_promote, agience_search.

CLI

export DKG_BASE_URL=http://localhost:8081
export DKG_TOKEN=your-bearer-token

# 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 my-context-graph \
  --collection-id my-project

# Promote to Shared Memory (SHARE)
agience-dkg promote <turn-uri> --context-graph-id my-context-graph

# Search
agience-dkg search "architecture decisions" --context-graph-id my-context-graph

Python API

from agience_dkg_integration import DkgHttpClient, MemoryTurnRequest
from agience_dkg_integration.formatter import artifact_to_markdown, session_uri_for_collection

client = DkgHttpClient(base_url="http://localhost:8081", bearer_token="token")

result = client.memory_turn(MemoryTurnRequest(
    contextGraphId="my-context-graph",
    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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agience_flare_dkg_integration-0.3.1.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agience_flare_dkg_integration-0.3.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file agience_flare_dkg_integration-0.3.1.tar.gz.

File metadata

File hashes

Hashes for agience_flare_dkg_integration-0.3.1.tar.gz
Algorithm Hash digest
SHA256 591553c4ae73f76b6851e5f1c9c89c4db8cdd086a4619a8e96e6959d98402233
MD5 6878beaece9b07f4a0b3d32ae33abb2f
BLAKE2b-256 c5275795900d05a7e4d9c032f345856b9edb0c390499e2df8d832aa9e1c7d791

See more details on using hashes here.

Provenance

The following attestation bundles were made for agience_flare_dkg_integration-0.3.1.tar.gz:

Publisher: publish.yml on Muffinman75/agience-flare-dkg-integration

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agience_flare_dkg_integration-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agience_flare_dkg_integration-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 85784131f536377acac79d262ad216aea1be9e8548e98b993e3ab349e00bfaa3
MD5 063b6ce265fd0eb3fd1efc111cca0f41
BLAKE2b-256 606a3a959df3ac4a487bad7dcbbb11bb91ad90e80862ff00bb85436ac5ca9ca7

See more details on using hashes here.

Provenance

The following attestation bundles were made for agience_flare_dkg_integration-0.3.1-py3-none-any.whl:

Publisher: publish.yml on Muffinman75/agience-flare-dkg-integration

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page