claude-mem
Captures what your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions so work carries over. Works with Claude Code and several other coding agents.
Give your AI agents the ultimate memory that survives the session. The Decentralized Knowledge Graph V10 is the shared, verifiable memory layer for multi-agent AI systems.
Claude Code
$ npx -y skills add OriginTrail/dkg --agent claude-code
Codex
$ npx skills add OriginTrail/dkg -a codex
Cursor
$ npx skills add OriginTrail/dkg -a cursor
Gemini CLI
$ npx skills add OriginTrail/dkg -a gemini-cli
GitHub Copilot
$ npx skills add OriginTrail/dkg -a github-copilot
OpenCode
$ npx skills add OriginTrail/dkg -a opencode
Windsurf
$ npx skills add OriginTrail/dkg -a windsurf

Give your AI agents the ultimate memory that survives the session.
The Decentralized Knowledge Graph V10 is the shared, verifiable memory layer for multi-agent AI systems. Every finding your agents produce can flow from a private draft to a team-visible share to a durable, cryptographically anchored record โ queryable by permitted agents and owned by the publisher. No black boxes. No vendor lock-in. No context that evaporates when the session ends.
This is the monorepo for the Decentralized Knowledge Graph V10 node โ the node software, CLI, dashboard UI, protocol packages, adapters, and tooling needed to run a DKG node and participate in the network.
Any AI agent โ whether built with OpenClaw, ElizaOS, Hermes, or any custom framework โ can run a DKG node and start exchanging knowledge with other agents across the network, without any central authority, API gateway, or vendor platform in between.
Most agent memory today is flat: conversation logs, vector embeddings, Markdown files. A knowledge graph stores facts as structured relationships (subject โ predicate โ object), so agents can reason over connections, not just retrieve similar text. When Agent A publishes "Company X acquired Company Y on March 5", any other agent can query for all acquisitions by Company X, all events on March 5, or all entities related to Company Y โ without knowing what to search for in advance. The graph structure turns isolated findings into composable, queryable collective intelligence. Packaging that graph into DKG Knowledge Assets gives it clear ownership, history, and integrity.
A Knowledge Asset (KA) is a unit of published knowledge: a set of RDF statements committed by a Merkle root anchored to the blockchain. Each published version is integrity-bound to its on-chain commitment, so later updates cannot silently rewrite its history. Agents can verify the content against that commitment instead of trusting a data provider.
A Context Graph is a scoped knowledge domain (the UI calls them "projects") with configurable access and governance. Agents can keep a context graph private, open it to specific peers, or back it with on-chain M-of-N signatures so a group must agree before anything is finalized. Every context graph can be further partitioned into named sub-graphs for finer-grained organization of knowledge within the same domain.
DKG V10 gives every agent a three-layer verifiable memory system. Knowledge is written in the cheapest, most private layer first and promoted outward as it matures.
| Layer | Scope | Cost | Trust | Persistence |
|---|---|---|---|---|
| Working Memory (WM) | Private to your agent | Free | Self-attested | Local, survives restarts |
| Shared Working Memory (SWM) | Visible to context-graph peers | Free | Self-attested, gossip-replicated | TTL-bounded |
| Verifiable Memory (VM) | Network-queryable, chain-anchored | Gas + TRAC | Self-attested โ endorsed โ consensus-verified | Durable |
The canonical flow for a new assertion is WM โ SWM โ VM:
create KA โโโบ write triples โโโบ finalize โโโบ share โโโบ publish โโโบ (optional) M-of-N verify
(WM) (WM) (WM) (WMโSWM) (SWMโVM) (VM)
All on-chain publishing goes through SWM first โ the chain transaction is a finality signal that seals data peers already hold via gossip. Assertions themselves carry a durable lifecycle record (created โ promoted โ published โ finalized, or discarded) in the context graph's _meta graph, so their history is auditable independently of the data.
SWM gossip is signed when the node has a local agent private key. Context graphs
that declare DKG_ALLOWED_AGENT or DKG_PARTICIPANT_AGENT require a signed
GossipEnvelope from one of those agent addresses; unsigned legacy SWM payloads
are accepted only for context graphs without agent gates. Signatures authenticate
the writer, but do not encrypt GossipSub payload bytes.
Prerequisites: Node.js 22.23.4+, 24.22.1+ or 26.12.1+, npm 10+. DKG starts on Node.js 22.13+ (or 23.4+), but older releases miss the 2026-10-21 Node.js security fixes, and dkg start and dkg doctor warn about them. macOS, Linux, and Windows (PowerShell 5.1+ or WSL2) all supported.
Two commands:
npm install -g @origintrail-official/dkg
dkg hermes setup
dkg hermes setup bootstraps the DKG node config (no separate dkg init needed), starts the daemon, optionally funds wallets, and wires the Hermes profile with replace-by-default provider election (use --preserve-provider to opt out, --no-start / --no-fund for advanced flows). See the adapter guide for details.
Network: setup defaults to mainnet-gnosis; pass --network <mainnet-gnosis | mainnet-base | testnet> to choose another. Mainnet nodes have no faucet; testnet nodes auto-fund their wallets when the faucet is reachable.
Two commands:
npm install -g @origintrail-official/dkg # installs CLI + bundled adapter
dkg openclaw setup # configures + starts the daemon, registers the plugin
dkg openclaw setup is non-interactive and idempotent. It writes ~/.dkg/config.json, merges the adapter into ~/.openclaw/openclaw.json (under plugins.entries.adapter-openclaw.config โ daemonUrl, memory.enabled, channel.enabled), syncs the canonical DKG node skill into the OpenClaw workspace at skills/dkg-node/SKILL.md, and verifies the install. The right-panel "Connect OpenClaw" button in the node UI runs the same in-process flow.
Restart the OpenClaw gateway if it does not auto-reload:
openclaw gateway restart
First-run verification. A healthy setup satisfies all four:
dkg_status works from the OpenClaw agenthttp://127.0.0.1:9200/uiNetwork: setup defaults to mainnet-gnosis; pass --network <mainnet-gnosis | mainnet-base | testnet> to choose another. Mainnet nodes have no faucet; testnet nodes auto-fund their wallets when the faucet is reachable.
Flags. --network <name> (choose network), --no-fund (skip faucet), --no-start (configure only), --no-verify (skip verification), --dry-run (preview without writing). Faucet funding is best-effort: a failed call logs a ready-to-paste curl block and setup continues. See the Funding section below for the full request/response shape.
The full adapter reference โ daemon URL config, channel-port overrides, disconnect/reconnect semantics โ lives in packages/adapter-openclaw/README.md.
~/.openclaw/openclaw.json has plugins.entries.adapter-openclaw populated; re-run dkg openclaw setup.curl block for manual funding; the node still works for non-on-chain flows (P2P, queries, WM/SWM writes).dkg openclaw setup --port <N> after Reconnect. Default-port users see no visible difference across the cycle.9201 already in use โ set channel.port manually under plugins.entries.adapter-openclaw.config in ~/.openclaw/openclaw.json.Two commands wire DKG V10 into MCP-aware clients (Cursor, Claude Code, Claude Desktop, Windsurf, VSCode + GitHub Copilot Chat, Cline, Codex CLI):
npm install -g @origintrail-official/dkg
dkg mcp setup
dkg mcp setup bootstraps the DKG node config (no separate dkg init needed), starts the daemon, optionally funds wallets, and registers MCP entries in each detected client (you confirm per client unless --yes is passed). See the MCP integration guide for client-by-client paths, mode overrides (--installed / --monorepo), the manual JSON shape, the contributor monorepo dev workflow, and troubleshooting (including the WSL2 caveat for Windows-side MCP clients).
Network: setup defaults to mainnet-gnosis; pass --network <mainnet-gnosis | mainnet-base | testnet> to choose another. Mainnet nodes have no faucet; testnet nodes auto-fund their wallets when the faucet is reachable.
Skip the framework wiring โ run the daemon directly and use the CLI or HTTP API:
npm install -g @origintrail-official/dkg
dkg init # interactive: prompts for network (default: mainnet-gnosis), node name, role, triple-store backend, port
dkg start # starts the node daemon on http://127.0.0.1:9200
dkg init asks which network to join โ mainnet-gnosis (default), mainnet-base, or testnet. Mainnet nodes have no faucet; testnet nodes auto-fund their wallets when the faucet is reachable. Pass --network <name> to skip the prompt.
For a Core Node, choose the core role during setup or pass it explicitly:
dkg init --role core --network mainnet-gnosis
dkg start
Core Nodes need an on-chain node profile (identityId). The daemon attempts registration automatically on Core startup. The primary operational wallet needs native gas and TRAC for the initial staking conviction, while the admin wallet needs native gas for profile and key-management transactions. If the node is already running after you fund or repair wallets, trigger the same identity-creation path manually:
TOKEN=$(dkg auth show)
curl -X POST -H "Authorization: Bearer $TOKEN" \
http://127.0.0.1:9200/api/identity/ensure
Verify with GET /api/identity or /api/status: Core registration is complete when identityId is non-zero and hasIdentity is true. The two node roles are edge and core. See Daemon Lifecycle for the full Core profile checklist.
Once running, open the dashboard at http://127.0.0.1:9200/ui, or query directly:
TOKEN=$(dkg auth show)
curl -H "Authorization: Bearer $TOKEN" http://127.0.0.1:9200/api/agents
To update DKG, run one command:
Captures what your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions so work carries over. Works with Claude Code and several other coding agents.
Local-first memory for Claude Code. It stores conversations verbatim in a private palace you can search before answering about past work, people, projects, or decisions, with optional shared-brain hub setup.
Gives Claude Code long-term memory through Hindsight. It recalls relevant past context before answering, retains durable facts as the agent learns them, and reflects over stored memory.
Gives Claude Code a private memory that stays on your machine. It stores past conversations word for word, so you can ask what was decided, what happened before, or who was involved and get the original context back. It can also hand tasks to other agents.
Give your AI agents the ultimate memory that survives the session. The Decentralized Knowledge Graph V10 is the shared, verifiable memory layer for multi-agent AI systems. Install it with the command on its page. It includes dkg-importer, dkg-node. Its skills do not fire on their own yet. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it