Foreword

When performing agent collaboration in DSH, it is often necessary to enable multiple agents to discover each other, send messages within the same project, and maintain a queryable project history. Existing solutions typically require manual handling of socket management, online status, message idempotency, and attachment budgets. @dpskh/a2a packages these capabilities into a DSH plugin: once mounted, it provides a hub, mesh client, a2a tools, and an /a2a command interface.

The following sections introduce this plugin based on its capabilities, configuration, usage, and limitations.

What This Is

@dpskh/a2a is an Agent2Agent real-time mesh plugin for DeepSeek Harness, maintained by dpskh, and licensed under MIT. The documentation specifies a mounting version of 0.3.

It consolidates the following capabilities into a single entry plugin:

  • ctx.a2aHub: Project registry, immutable message history, optional hub server, and real-time WebSocket
  • ctx.a2aMesh: WebSocket presence for each joined agent, with serial injection of inbound messages
  • a2a_peers, a2a_message, a2a_history tools
  • /a2a hub, project, connect, disconnect, status, peers, history, help command interface

It is designed for real-time collaboration within trusted private networks.

Core Features

Hub and Messaging

The hub side provides a project registry and immutable message history. Messages support idempotent processing based on messageId. Text and attachments share a 4 MiB decoded-content budget, with a maximum of eight attachments per message.

Mesh Client

The mesh client side maintains a WebSocket presence for each joined agent and serially injects inbound messages. Presence is based on WebSocket connection status; only currently online receivers can be directly messaged, with no offline delivery or persistent roster.

Tools

The following three tools are available for the model side:

  • a2a_peers: View the current roster names present in the project
  • a2a_message: Send a message to target.type=agent/name or target.type=project, with optional replyTo, attachment path, and messageId
  • a2a_history: View past project messages using before, after, limit, or from parameters

Command Interface

The /a2a command interface includes:

  • /a2a hub
  • /a2a project
  • /a2a connect
  • /a2a disconnect
  • /a2a status
  • /a2a peers
  • /a2a history
  • /a2a help

Command examples provided in the documentation include:

  • /a2a connect <project> [--as <name>]
  • /a2a status
  • /a2a peers
  • /a2a history

Browser Collaboration Control

@dpskh/ui-a2a provides collaboration controls. The browser consumes Host a2a.snapshot and does not directly connect to the Hub WebSocket.

Installation and Enabling

The documentation does not provide official installation commands that can be directly copied, so this article does not supplement installation commands.

The enabling method described in the documentation is: Mount @dpskh/a2a version 0.3 to obtain the real-time A2A mesh. Before enabling the hub and mesh, the storage backend must be routed to the a2a domain.

Typical Configuration

Below are configuration examples from the documentation. The hub configuration is used to run the optional hub server; the mesh configuration is used to declare mesh client-related fields.

- id: a2a
  name: '@dpskh/a2a'
  config:
    hub:
      host: 127.0.0.1
      port: 43123
      maxPort: 43223
    mesh:
      project: main
      agentId: main
      name: main
      autoConnect: true
      persistConnections: false
      reconnectMs: 500

Where:

  • hub.host, hub.port, hub.maxPort are used to configure the optional hub server
  • mesh.project, mesh.agentId, mesh.name, mesh.autoConnect, mesh.persistConnections, mesh.reconnectMs are mesh configuration items listed in the documentation

If you copy a 0.2 configuration, the 0.2 mesh fields persistBindings, autoRejoin, pollIntervalMs, heartbeatMs, and caps will be ignored.

Typical Usage

First, connect to a project, then view current peers, send a message, and finally query history as needed.

  1. Connect to a project:
/a2a connect <project> [--as <name>]
  1. View the current roster names present in the project:
/a2a peers

You can also call the tool:

a2a_peers
  1. Send a message to current peers or the project:
a2a_message

You can include target.type=agent/name or target.type=project, replyTo, attachment path, and messageId.

  1. View past project messages:
/a2a history

You can also call:

a2a_history

Parameters can be controlled via before, after, limit, or from.

  1. Check status or disconnect:
/a2a status
/a2a disconnect
/a2a help

Trust Model and Limitations

This plugin assumes operation in a fully trusted private network: hub endpoints do not authenticate callers, and project and member identities provided by callers are trusted claims. Do not expose it to the public internet or untrusted networks.

Known limitations include:

  • Only currently online receivers can be directly messaged; no offline delivery or persistent roster
  • The mesh client connects to only one hub at a time
  • Delivery outcomes like delivered, failed, and disconnected are stored only in memory and are not persisted
  • Inbound attachments are written to the system’s temporary directory
  • 0.2 mesh fields persistBindings, autoRejoin, pollIntervalMs, heartbeatMs, and caps are ignored for compatibility with copied 0.2 configurations
  • package.json is marked private: true

Suitable Scenarios and Considerations

This plugin is suitable for:

  • Enabling multiple agents in DSH to communicate in real time within the same project
  • Needing to view the current online roster
  • Needing to query past messages within a project
  • Needing to use @dpskh/ui-a2a collaboration controls in the browser

Important considerations:

  • The plugin runs with the permissions of the current dsh process; review the source code and license before installation
  • The license is MIT
  • The documentation does not provide official installation commands; refer to the repository documentation for usage
  • The DSH plugin ecosystem emphasizes “everything is a plugin”; the community directory is an independent site and has no official affiliation with DeepSeek / 幻方

Links

  • GitHub: https://github.com/dpskh/dsh-a2a
  • Community directory hint: https://www.skillhub.cn/plugins/dpskh/dsh-a2a