Introduction

In the DeepSeek Harness (DSH) plugin ecosystem, most memory plugins focus on storing conversations or documents, answering “what was said.” When it is necessary to answer “what happened” and “why,” this kind of general-purpose memory cannot directly provide support. dsh-plugin-asmemory, as an Action-State Memory Engine, aims to provide typed time-series memory for Agents, supporting trend, anomaly, and causal analysis.

Core Features

The plugin provides the following core capabilities:
* Event logging: typed events that distinguish “State” (such as resource metrics) and “Action” (such as operational behavior).
* Data analysis: supports trend analysis, anomaly detection (based on z-score), and causal analysis.
* Data export: supports exporting analysis results to DataLens.
* MCP tools: provides 7 standard MCP tools for invocation.

Installation and Activation

Installation consists of two steps: first install the plugin package, then enable it in DSH.

  1. Install the plugin
    Use pip to install the plugin in the current directory:
    pip install .
If you do not want to install the command-line tools, you can also specify the absolute path of the executable file via the environment variable `ASMEMORY_MCP_PATH`.
  1. Start DSH
    Use the --patch parameter to load the configuration file cordis.yml to register the plugin:
    dsh web --patch "$PWD/cordis.yml"
The configuration file is usually located in the plugin root directory. Once released, it can also be installed via `dsh plugin add dsh-plugin-asmemory`.
  1. Technical details
    • Dependencies: Uses only the Python 3.10+ standard library.
    • Persistence: The default database path is ~/.asmemory/memory.db, and can be overridden by ASMEMORY_DB_PATH.

Typical Usage

The plugin provides Python examples, demonstrating Agent self-tracking and industrial monitoring scenarios.

  1. Agent self-tracking
    Record the Agent’s own actions and resource states, and analyze the impact of actions on metrics. Run the following command to view the demo:
    python3 examples/demo_agent_self_tracking.py
  1. Industrial monitoring and DataLens export
    In industrial scenarios, record process variables and control actions, and export the data for visual analysis.

MCP Tool List

The plugin exposes 7 tools via the MCP protocol. When invoking them, add the prefix mcp__asmemory__:

  • memory_store_state: Records state events.
  • memory_store_action: Records action events.
  • memory_trend: Gets the trend direction and slope of a metric.
  • memory_anomaly: Detects anomalies using z-score.
  • memory_causal: Calculates the mean change of a metric before and after an action.
  • memory_summary: Views memory store statistics.
  • memory_export_datalens: Exports CSV and configuration files to DataLens.

Notes

  • The plugin is maintained by Xplore-LAB and licensed under MIT.
  • The database file is stored by default in the user directory. Ensure read/write permissions.
  • Before use, ensure Python 3.10 or higher is installed.

Summary

dsh-plugin-asmemory provides intelligent agents in DSH with a memory layer for the physical world and operational world. Through typed event logging and causal analysis, Agents can more accurately understand their own behavior and environmental changes, rather than relying only on textual conversations.