Zum Inhalt springen

OpenClaw Plugin

The Hashee OpenClaw Plugin (@hasheeai/hashee-plugin) lets OpenClaw agents communicate with Hashee users. It follows the standard OpenClaw ChannelPlugin adapter pattern and delegates all protocol handling to the @hasheeai/agent-sdk-ts.

What is OpenClaw?

OpenClaw is an open-source AI agent framework. It uses a plugin architecture where channel adapters connect agents to different messaging platforms (Telegram, Discord, Hashee, etc.).

Architecture

OpenClaw Gateway
└── Hashee ChannelPlugin
├── Config Adapter → Multi-account parsing
├── Gateway Adapter → SDK connection lifecycle
├── Outbound Adapter → sendText via SDK
├── Streaming Adapter → Stream via SDK
├── Security Adapter → DM policy (H2A relationships)
├── Status Adapter → Connection status from SDK
├── Groups Adapter → @mention filtering
└── Heartbeat Adapter → SDK built-in heartbeat

The plugin is a thin translation layer between OpenClaw’s adapter interface and the Hashee Agent SDK. All encryption, authentication, and protocol handling is done by the SDK.

Setup

1. Install the Plugin

Add @hasheeai/hashee-plugin to your OpenClaw project.

2. Configure Channels

Add Hashee to your OpenClaw channel configuration:

{
"channels": {
"hashee": {
"accounts": {
"myagent": {
"enabled": true,
"agentToken": "hsk_your-token",
"agentId": "your-agent-uuid",
"connectionMode": "websocket"
}
},
"dmPolicy": "open",
"historyLimit": 20
}
}
}

3. Register the Plugin

In your OpenClaw entry point:

import hasheePlugin from "@hasheeai/hashee-plugin";
export default {
id: "hashee",
name: "Hashee",
register(api) {
api.registerChannel({ plugin: hasheePlugin });
},
};

Multi-Account Support

The plugin supports multiple Hashee agent accounts in a single OpenClaw instance. Each account has its own Agent ID, token, and connection mode:

{
"accounts": {
"customerbot": {
"agentToken": "hsk_customer_...",
"agentId": "01906-aaa-...",
"connectionMode": "websocket"
},
"translator": {
"agentToken": "hsk_translator_...",
"agentId": "01906-bbb-...",
"connectionMode": "webhook",
"webhookSecret": "whsec_..."
}
}
}

Session Key Mapping

The plugin maps Hashee conversations to OpenClaw session keys:

Hashee TypeSession Key Format
H2A (direct message){user_id}@hashee
H2A (multi-account){user_id}@hashee:{accountId}
Groupgroup:hashee:{conversation_id}

Features

FeatureStatus
Text messages (send and receive)Supported
Streaming outputSupported
A2H ArtifactsSupported
Group chat with @mention filteringSupported
Event handling (relation events)Supported
End-to-end encryptionHandled by SDK
Webhook modePlanned
Media messagesPlanned

How Encryption Works

The plugin does not implement any encryption logic. Everything is handled by @hasheeai/agent-sdk-ts:

  • X25519 key pair generation and public key registration
  • Inbound messages: encrypted payload arrives, SDK decrypts, plugin receives plaintext
  • Outbound messages: plugin sends plaintext, SDK encrypts and transmits
  • Relation events: SDK caches public keys automatically

Next Steps