Yogioo/dsh-agentmemory ↗★ 0

dsh-agentmemory

Agent-plane tool plugin: connects dsh to the agentmemory REST API (search / remember / forget / health) 用于为 DSH 智能体提供持久化记忆能力。适合需要通过 REST API 让智能体实现记忆存储、检索和删除任务的用户,需连接 agentmemory 服务。

Package
dsh-agentmemory
Compatibility
Unverified
Harness peer range
^0.1.0-rc.6
Version
0.1.2
License
MIT
Last updated
Aug 14, 2026

Other repositories with this package name

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

dsh-agentmemory

Agent-plane tool plugin: connects dsh (DeepSeek Harness) to an agentmemory persistent-memory REST API (rohitg00/agentmemory). No MCP, no skill+CLI indirection — four native tools registered directly on the harness tool runtime, each backed by one REST call.

Registered tools (visible to every agent after a dsh restart):

ToolEndpointPurpose
memory_searchPOST /agentmemory/searchsemantic + keyword search over stored memories
memory_rememberPOST /agentmemory/rememberstore a durable memory (type / concepts / files / ttlDays)
memory_forgetPOST /agentmemory/forgetdelete by memoryId or sessionId
memory_healthGET /agentmemory/healthconnectivity + engine status check

Quick install (from this repo)

Linux / macOS / Git Bash on Windows:

git clone https://github.com/Yogioo/dsh-agentmemory
cd dsh-agentmemory
./install.sh                       # agentmemory on the same machine
./install.sh --base-url https://:9999   # link a REMOTE agentmemory

Windows (PowerShell):

git clone https://github.com/Yogioo/dsh-agentmemory
cd dsh-agentmemory
powershell -ExecutionPolicy Bypass -File install.ps1                          # local
powershell -ExecutionPolicy Bypass -File install.ps1 -BaseUrl https://:9999  # remote

Both installers are idempotent: they copy the plugin into ~/.dsh/profiles/node_modules/dsh-agentmemory/ and register the entry in ~/.dsh/profiles/web/cordis.patch.yml. Re-running never duplicates the patch entry. No manual dependency linking is needed — dsh itself maintains the flat fallback directory at every boot (one link per package in the app's dependency closure: POSIX symlinks, Windows junctions — no admin rights).

Replace `` with the hostname of your agentmemory server (for a same-machine install, omit --base-url/-BaseUrl entirely and the default http://localhost:3111 is used).

Then make the secret reach the dsh process (systemd does not read ~/.bashrc) — add to /etc/systemd/system/dsh.service:

Environment=AGENTMEMORY_SECRET=

then sudo systemctl daemon-reload && sudo systemctl restart dsh.

Verify: ask any agent to call memory_health, or

curl -s -H "Authorization: Bearer $AGENTMEMORY_SECRET" \
  http://localhost:3111/agentmemory/health        # local
curl -sk -H "Authorization: Bearer $AGENTMEMORY_SECRET" \
  https://:9999/agentmemory/health # remote

Manual install (fallback)

  1. Copy this directory to ~/.dsh/profiles/node_modules/dsh-agentmemory/ (that flat fallback dir is where the dsh loader resolves out-of-tree plugins from).
  2. (Optional) Symlink the peer deps from the global dsh install — usually unnecessary, because dsh boot creates these links automatically:
    DSH_PKG=$(dirname "$(dirname "$(readlink -f "$(command -v dsh)")")")
    ln -s "$DSH_PKG/node_modules/@deepseek-ai/dsh-tools"   ~/.dsh/profiles/node_modules/@deepseek-ai/
    ln -s "$DSH_PKG/node_modules/@deepseek-ai/schemastery" ~/.dsh/profiles/node_modules/@deepseek-ai/
    
  3. Add to ~/.dsh/profiles/web/cordis.patch.yml:
    - insert:
        - id: agentmemory
          name: dsh-agentmemory
          config:
            baseUrl: http://localhost:3111
            apiKeyEnv: AGENTMEMORY_SECRET
    
  4. Restart dsh.

Config (all optional)

KeyDefaultMeaning
baseUrlhttp://localhost:3111agentmemory REST base URL (use https://host:9999 for a remote one)
apiKeyEnvAGENTMEMORY_SECRETenv var holding the Bearer secret
apiKey''literal secret, takes precedence over apiKeyEnv
apiKeyFile~/.agentmemory/.envdotenv fallback when the env var is unset
timeoutMs30000per-request timeout

Secret resolution order: config.apiKey → process.env[apiKeyEnv] → apiKeyFile (agentmemory's own ~/.agentmemory/.env).

Cross-platform notes

  • Code: the plugin is pure Node ESM (node:fs, node:os, global fetch, AbortSignal.any) — no native modules, same code runs on Linux / macOS / Windows.
  • Fallback directory: dsh maintains $DSH_HOME/profiles/node_modules at every boot (one junction/symlink per package in its dependency closure), so on Windows no ln/admin rights are ever needed — install.ps1 only drops the plugin directory and patches the config.
  • Git Bash users on Windows: install.sh works too; its ln steps skip anything already present.
  • Restart: on Linux with systemd: sudo systemctl restart dsh; on Windows: close and relaunch dsh web (or restart whatever service runs it). Config edits in cordis.patch.yml hot-reload; a fresh plugin install needs a process restart.

Notes

  • Remote linking: agentmemory's REST endpoint is reachable over the network (Nginx TLS + Bearer auth). Point baseUrl at https://:9999 and share the secret — the only access control is that bearer token, so treat it like a password.
  • Dependencies: imports only @deepseek-ai/dsh-tools and @deepseek-ai/schemastery; both live in dsh's own dependency closure and are linked into the fallback directory automatically at dsh boot — no pnpm install or network access needed at runtime.
  • Restart: cordis.patch.yml config edits hot-reload; plugin code changes need a dsh process restart.
  • Shared stores: with several machines on one memory store, tag memory_remember entries with project / cwd and filter searches by them to keep namespaces tidy.

License

MIT — see LICENSE.