Skip to main content

How to use graph-memory

Provides a local SQLite knowledge

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

graph-memory

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add github:adoresever/graph-memory

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • TASK: goals, execution, and outcomes;
  • SKILL: validated reusable methods;
  • EVENT: errors, fixes, decisions, changes, and facts.
  • Loaded by the DSH/Cordis plugin lifecycle, not simulated through an MCP side channel.
  • Integrates Session, Tool, Agent Loop, Prompt Assembly, LLM, and Credentials seams.

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

Where is data stored? Is it uploaded to the cloud?

By default it is stored locally at $DSH_HOME/graph-memory/graph-memory.db (or ~/.dsh/graph-memory/graph-memory.db when DSH_HOME is not set). The entire plugin does not initiate any data uploads, all retrieval and extraction are completed locally in SQLite.

Can it be used normally without configuring Embedding (vectors)?

Yes. When embedding configuration is empty, the plugin automatically switches to FTS5 full-text search mode, retrieval capability will not disappear; after connecting to a vector service it will automatically upgrade to semantic search and backfill historical nodes.

How to configure API key securely?

Do not write the key directly into Cordis configuration or chat box. The recommended method is to set GRAPH_MEMORY_EMBEDDING_API_KEY / BASE_URL / MODEL / DIMENSIONS in the environment where DSH is started; the plugin only saves variable name references, and the DSH's Credentials service resolves the actual value when actually calling.

Can gm_update and gm_maintain tools be found in the DSH entry?

Not found. Currently the DSH/Cordis adapter only registers four tools: gm_status, gm_search, gm_record, gm_stats. gm_update and gm_maintain are only retained in the OpenClaw entry and have not been exposed on the DSH side.

What is the relationship between this plugin and the official built-in session compression and context retrieval?

They do not conflict or replace each other. Compression solves "how much history can still fit in the current window", while Graph Memory solves "which past knowledge is worth waking up now". The two directions are complementary and can be enabled simultaneously.

How to reliably remember key content? Does automatic extraction occasionally miss things?

Automatic extraction relies on auxiliary model output. It is recommended to actively write using the gm_record tool during the beta phase - it forces storage through typed fields, does not depend on LLM extraction logic, and will not be forgotten.

Is Neo4j really not needed? How large a graph can this solution handle?

Community uses SQLite by default, and local graph sorting works smoothly for thousands of nodes; both README and DSH_NATIVE_PLAN clearly state that Neo4j only appears as an optional adapter for "larger graph + GDS + complex analysis", and has not been implemented yet.

Can it be directly installed via npm add?

Current beta 1.6.0-beta.1 has not been published to npm registry yet. You need to first git clone, npm install, npm run build, npm pack to generate a tarball, then use dsh plugin --profile web add /path/to/.tgz for local installation.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 未声明(官方适配基于 DSH 0.1.0-rc.5 验证,DSH 仍为 Developer Preview)
  • Node: >=20(DSH 环境建议 Node 22.19+ 或 24+,见 README.md:200)
  • Platforms: macOS, Windows, Linux
  • Native modules: @photostructure/sqlite, @sinclair/typebox

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule