DSH Hub

Xplore-LAB/dsh-plugin-asmemory

dsh-plugin-asmemory

BundleMemory0 GitHub stars· updated 2026-08-14

Action-State Memory Engine: typed time-series memory (states + actions) with trend/anomaly/causal analysis for DeepSeek Harness

Install

npx @deepseek-ai/dsh plugin --profile web add github:Xplore-LAB/dsh-plugin-asmemory

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-plugin-asmemory DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/dsh-plugin-asmemory.svg)](https://dshhub.dev/plugins/dsh-plugin-asmemory)

Paste this into your README. The star count updates with every catalog sync.

From the README

Excerpt from Xplore-LAB/dsh-plugin-asmemory, cleaned of badges and images.

asmemory — Action-State Memory Engine

Give your agent a time memory: record what happened and what changed, then analyze trends, anomalies, and causality — not just what was said.

Language: English | 简体中文

⭐ If this helps you, a star is the best way to say thanks — it keeps the project visible to others.


What it does

asmemory stores two kinds of typed events, not raw text:

  • State — a value of some entity/metric at a point in time (gpu.temperature = 78°C)
  • Action — something that happened (agent ran training, operator adjusted a valve)

On top of this memory it provides four analyses:

AnalysisQuestion it answers
TrendIs my metric going up or down? (slope + direction)
AnomalyWhich readings are outliers? (z-score)
CausalDid action X move metric Y? (before/after delta)
SummaryWhat's in my memory? (counts + entities)

Why asmemory

Most memory plugins store conversations or documents, so they answer "what did you say". asmemory stores actions and states, so it answers "what happened, and why":

"Did GPU temperature rise after training started?" → causal "Is my sleep trending down this week?" → trend "Which readings are outliers?" → anomaly

It is the memory layer for the physical and operational world — agents observing themselves, industrial processes, and personal metrics.

Example: agent self-tracking

Record your agent's own actions and resource states, then ask why the GPU got hot:

from asmemory import StateEvent, ActionEvent, MemoryStore, analysis

store = MemoryStore("memory.db")
store.add_state(StateEvent("gpu", "temperature", 78.5, "celsius"))
store.add_action(ActionEvent("agent", "run_training", "qwen3.6", ts=1723500000))

# Did training actually heat the GPU?
causal = analysis.causal_effect(store, "run_training", "gpu", "temperature")
print(causal["before_mean"], "->", causal["after_mean"], f"(Δ={causal['delta']})")

Real output (24h simulated agent, 72 states + 20 actions):

【因果】run_training → gpu.temperature:  45.3 → 78.7  (Δ=33.4, up)   ← significant
【因果对照】git_commit → gpu.temperature: 53.7 → 56.4  (Δ=2.7, up)    ← no effect
【异常】ram.usage: 1 outlier (z=-2.4)

The engine cleanly separates real causality (training) from coincidence (git commits) — no LLM guessing involved, just time-series math.

Example: industrial monitoring → DataLens

Air-separation plant: oxygen purity (monitored metric) vs. valve opening (control action). asmemory remembers the causality, then exports to DataLens for over-control optimization:

from asmemory.export import export_datalens

export_datalens(store, entity="oxygen", metric="purity",
                action_verb="valve_adjust",
                pollutant="氧纯度", regulator="导叶开度",
                regulatory_limit=99.5)
# → data_datalens.csv + data_datalens.config.json

Real output (240 min, 240 states + 240 actions):

【因果】valve_adjust → oxygen.purity: Δ=0.0009 (up)
✅ CSV → data_datalens.csv          (时间,指标值,控制量,整点标记)
✅ config → data_datalens.config.json (pollutant/regulator/limit)

Open data_datalens.csv in DataLens to visualize the "still over-controlling in the safe zone" savings space.

Tools

Seven MCP tools, exposed to the model as mcp__asmemory__<tool>:

Related plugins