Preface

The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing agents, tracking behaviors and achievements (Achievements) often requires writing repetitive logic or relying on specific environments. The agpa-dsh-plugin aims to solve the problem of sharing an achievement engine across tools. Instead of re-implementing achievement logic on the DSH side, it bridges an existing AGPA engine to enable unified achievement data storage and cross-agent triggering.

Plugin Overview

  • Name: agpa-dsh-plugin
  • Author: eiainano
  • License: MIT
  • Core Value: Provides native achievement_* tool shells for DSH, calls the AGPA MCP engine directly, and automatically captures data from DSH session events.

Core Features

  1. Native achievement_* tool shells
    The plugin registers 7 native tools, such as achievement_stats. These tools act only as thin shells, forwarding parameters as-is to the AGPA MCP server.
  2. MCP bridging
    The plugin includes an MCP-over-stdio client with zero runtime dependencies (src/agpa-bridge.ts) for connecting to the AGPA engine.
  3. Automatic event tracking
    It subscribes to DSH’s session/event, normalizes events such as file.create, file.write, command.run, and tool.complete, and automatically triggers agpa-hook auto for processing.
  4. Cross-agent achievement support
    Because the AGPA engine and data storage (~/.agent-achievements) are shared, achievements triggered in DSH also take effect in other tools such as Claude Code.
  5. Model workflow manual
    The plugin includes skills/agpa/SKILL.md, which guides the model on when to track, poll, or announce unlocks.

Installation and Enablement

  1. Add the plugin to the configuration file
   dsh plugin --profile web add agpa-dsh-plugin
  1. Install the model workflow manual
   cp -r ~/.dsh/profiles/web/node_modules/agpa-dsh-plugin/skills/agpa ~/.agents/skills/
  1. Verify the installation
    After restarting DSH, check whether an agpa entry appears in the configuration tree:
   dsh --profile web --dump-config | grep -A3 agpa

Typical Usage

  • Retrieve AGPA statistics:
  achievement_stats tool_source=dsh
  • Event marking:
    Events triggered through DSH are marked with tool_source:'dsh' and stored in the shared ~/.agent-achievements directory.
  • Correlation key:
    The correlation key for event tracking is located at result.data.message.source.callId.

Environment Variable Configuration

The plugin relies on the following environment variables for configuration and debugging:

  • AGPA_MCP_CMD: AGPA MCP startup command (default: npx -y -p @eiainano/agpa@0.1.10 agpa-mcp).
  • AGPA_AUTOTRACK=1: Enables automatic event tracking. Each normalized event starts an agpa-hook auto process.
  • AGPA_HOOK_CMD: Overrides the ingest command (default: npx -y -p @eiainano/agpa@0.1.10 agpa-hook auto).
  • AGPA_DEBUG=1: Prints debugging information, including MCP stderr, event types, and normalized payloads.
  • DSH_AGENTS_HOME: Skills root directory (default: ~/.agents).

Applicable Scenarios and Precautions

  • Runtime Environment: Node.js version >= 22 is required.
  • Current Status: Phase 1 (tool shells + bridging) and Phase 2 (automatic event tracking) have been validated and implemented; Phase 3 (optional client components) has not yet been implemented.
  • Permission Notice: The plugin runs with the permissions of the current DSH process. Please review the source code and license before installing.
  • Node Version Management: Managed Node runtime version updates may affect global installations, so pay attention to path configuration.

Summary

By bridging the AGPA engine, this plugin enables achievement data interoperability between DSH and other agent tools, reducing duplicated development. For more details and source code, visit: GitHub.