All plugins

dingtalk

DingTalk (钉钉) messaging platform: Stream Mode bot connection, DMs and group chats with @mention gating, AI Card streaming replies, media download, per-user/per-chat allowlists, cron delivery through a robot webhook, and QR-code app registration in the setup wizard. Formerly built into Hermes core; existing users are migrated automatically. A Hermes Labs plugin: built by Nous Research, not supported, and likely not maintained going forward. Fixes from the community are welcome. Disclosure — messages, media and sender ids travel between DingTalk's servers (Alibaba) and your Hermes gateway over DingTalk's Stream Mode WebSocket using your own app Client ID and Client Secret; replies post to DingTalk session webhooks or the AI Card API, and reactions go through DingTalk's robot API; cron deliveries post to the robot webhook URL you configure. Media download codes in inbound messages are resolved to DingTalk download URLs. The optional setup-wizard QR registration calls DingTalk's registration API (oapi.dingtalk.com), whose scan page is branded OpenClaw.

NousResearch189Platformv2.0.0Updated 4 days ago

About

DingTalk (钉钉) messaging platform: Stream Mode bot connection, DMs and group chats with @mention gating, AI Card streaming replies, media download, per-user/per-chat allowlists, cron delivery through a robot webhook, and QR-code app registration in the setup wizard. Formerly built into Hermes core; existing users are migrated automatically. A Hermes Labs plugin: built by Nous Research, not supported, and likely not maintained going forward. Fixes from the community are welcome. Disclosure — messages, media and sender ids travel between DingTalk's servers (Alibaba) and your Hermes gateway over DingTalk's Stream Mode WebSocket using your own app Client ID and Client Secret; replies post to DingTalk session webhooks or the AI Card API, and reactions go through DingTalk's robot API; cron deliveries post to the robot webhook URL you configure. Media download codes in inbound messages are resolved to DingTalk download URLs. The optional setup-wizard QR registration calls DingTalk's registration API (oapi.dingtalk.com), whose scan page is branded OpenClaw.

DingTalk

Labs plugin: works, but unsupported. DingTalk is now a Hermes Labs plugin: built by Nous Research, not supported, and likely not maintained going forward. Fixes from the community are welcome. See what "labs" means.

Part of Hermes Labs Plugins: built by Nous Research, not supported. Formerly built into
hermes-agent core (plugins/platforms/dingtalk and
hermes_cli/dingtalk_auth.py); this directory carries their full history.

Connect Hermes to DingTalk (钉钉) as a chatbot, in direct messages and group
chats. The adapter uses DingTalk's Stream Mode, a long-lived WebSocket opened from your machine (no public
URL or webhook server), and replies with markdown through each message's session webhook, or with AI Cards.

Everything an existing setup relies on is unchanged: platform name dingtalk, every DINGTALK_* env var,
the platforms.dingtalk (and gateway.platforms.dingtalk) config keys and DINGTALK_HOME_CHANNEL.

Install

hermes plugins install dingtalk

The plugin brings its own dependencies (dingtalk-stream, alibabacloud-dingtalk, qrcode, and the
websockets version dingtalk-stream needs). If the gateway reports dingtalk-stream not installed or a
websocket incompatibility, reinstall the plugin (hermes plugins update dingtalk).

Needs a Hermes release in which DingTalk has left core. On an older Hermes the plugin stays inactive and
logs one line (the plugin stays inactive until core drops it): that Hermes still ships its own DingTalk
support, which keeps working. The check is whether core's plugins/platforms/dingtalk/ is present, not
whether the built-in is enabled.

How Hermes behaves

ContextBehavior
DMs (1:1 chat)Hermes answers every message; each DM has its own session.
Group chatsWith require_mention: true, Hermes answers only when @mentioned (or a mention_patterns regex matches, or the chat is in free_response_chats).
Shared groupsBy default each user gets their own session inside the group (group_sessions_per_user: true in config.yaml).

Setup

1. Create a DingTalk app (or use the QR flow in step 3)

  1. Go to the DingTalk Developer Console and log in with an admin account.
  2. Application Development → Custom Apps → create an app (H5 Micro-App or Robot, depending on
    your console version).
  3. Under Credentials & Basic Info, copy the Client ID (AppKey) and Client Secret (AppSecret).
    The secret is shown once.
  4. Add Capability → Robot, enable it, and choose Stream Mode for message reception.

2. Find your DingTalk user ID

User IDs are set by your organization's admin (Contacts → Members in the admin console). The bot
also logs each sender's sender_id: start the gateway, message the bot, and read it from
hermes logs gateway.

3. Run the setup wizard

hermes gateway setup

Select DingTalk, then either:

  • QR code (recommended): scan the QR printed in your terminal with the DingTalk mobile app. The Client
    ID and Client Secret come back automatically and are saved to your profile's .env. Without the qrcode
    package the wizard prints the authorization link instead. The consent page is branded openClaw
    (DingTalk's onboarding bridge for this flow); the bot you create is yours and private to your tenant.
  • Manual input: paste the Client ID and Client Secret.

4. Environment variables

In ~/.hermes/.env (or your profile's .env):

# Required
DINGTALK_CLIENT_ID=your-app-key
DINGTALK_CLIENT_SECRET=your-app-secret

# Who may talk to the bot (comma-separated; * = anyone)
DINGTALK_ALLOWED_USERS=user-id-1,user-id-2
# DINGTALK_ALLOW_ALL_USERS=true          # dev only

# Group-chat gating
# DINGTALK_REQUIRE_MENTION=true
# DINGTALK_MENTION_PATTERNS=["^小马"]      # JSON list or comma-separated regexes
# DINGTALK_FREE_RESPONSE_CHATS=cidABC==,cidDEF==
# DINGTALK_ALLOWED_CHATS=cidABC==         # empty = every chat

# Cron / notification delivery
# DINGTALK_HOME_CHANNEL=cidXXXX==
# DINGTALK_HOME_CHANNEL_NAME=Ops
# DINGTALK_WEBHOOK_URL=https://oapi.dingtalk.com/robot/send?access_token=...

DINGTALK_WEBHOOK_URL is a static robot webhook used for out-of-process sends (cron jobs, send_message
from another platform): session webhooks are only available while replying to an inbound message.

5. Config keys

The same settings can live in config.yaml under platforms.dingtalk (or
gateway.platforms.dingtalk); env vars win when both are set:

group_sessions_per_user: true

platforms:
  dingtalk:
    enabled: true
    require_mention: true
    mention_patterns: ["^小马"]
    free_response_chats: [cidABC==]
    allowed_chats: [cidABC==, cidDEF==]
    allowed_users: [user-id-1, user-id-2]
    extra:
      client_id: your-app-key          # alternative to DINGTALK_CLIENT_ID
      client_secret: your-app-secret   # alternative to DINGTALK_CLIENT_SECRET
      robot_code: your-robot-code      # defaults to the client id
      card_template_id: your-card-template-id   # enables AI Cards
      webhook_url: https://oapi.dingtalk.com/robot/send?access_token=...

allowed_users may also sit at gateway.platforms.dingtalk.extra.allowed_users; it is bridged to
DINGTALK_ALLOWED_USERS, which is what the gateway's authorization check reads.

6. Start the gateway

hermes gateway

The bot connects within a few seconds. Message it in a DM, or @mention it in a group it has joined.

Features

  • Stream Mode: no public URL; works behind NAT and firewalls. Reconnects with exponential backoff
    (2s → 5s → 10s → 30s → 60s), with a circuit breaker for a repeating error.
  • AI Cards (card_template_id): replies stream into a card instead of plain markdown.
  • Emoji reactions: 🤔Thinking while working, 🥳Done when finished (localized like core's strings).
  • Inbound media: images, audio, video, files and rich text are resolved so vision and file tools can
    use them.
  • Deduplication of redelivered messages; replies are capped at 20,000 characters.

Per-platform display settings work as before:

display:
  platforms:
    dingtalk:
      streaming: true
      tool_progress: off
      interim_assistant_messages: false

Troubleshooting

  • Bot not responding: check the robot capability is on with Stream Mode, and that your user ID is in
    DINGTALK_ALLOWED_USERS. Without an allowlist the gateway denies everyone.
  • "DINGTALK_CLIENT_ID and DINGTALK_CLIENT_SECRET required": set both in .env (or extra).
  • "dingtalk-stream cannot open its websocket": the installed websockets does not match
    dingtalk-stream 0.24.3; reinstall the plugin.
  • "No session_webhook available": the reply came after the inbound message's webhook expired (or a
    restart); send a new message.

Disclosure

  • Talks to DingTalk's endpoints only: the Stream Mode gateway, the session/robot webhooks
    (*.dingtalk.com), the DingTalk OpenAPI (AI Cards, emoji reactions, media download) and, during QR setup,
    the device-flow registration API (https://oapi.dingtalk.com/app/registration/*).
  • Received media is cached in the profile's Hermes media cache; QR setup writes the credentials to the
    profile's .env.
  • No telemetry of its own.

Tests

cd dingtalk
HERMES_AGENT_REPO=../../hermes-agent PYTHONPATH=../../hermes-agent python -m pytest -q

The DingTalk SDKs are faked where tests need them; two tests that exercise the real dingtalk-stream and
qrcode packages skip when those are absent. On a core that still bundles DingTalk the plugin is inert and
the tests that need the plugin's own registry entry are skipped.

License

MIT

README from the reviewed commit 7d46f6d; it updates when the author re-pins.

More by NousResearch

38 plugins by NousResearch in the catalog.

NousResearchaccent-pickerOKLCH accent colour picker for the Hermes Desktop status bar: drag it and the whole theme retints live, with palette commands to reset to the theme default or copy the current colour. A theme-authoring tool; the colour is scratch state and is never persisted. Desktop-only (desktop/plugin.js inside the plugin SDK surface); no agent tools, hooks, middleware or env vars.OfficialDesktop app849NousResearchadvanced-delegationTwo extra delegation modes for delegate_task, next to the built-in default. Model routes (delegation.backend: model_map): the agent picks a named model route per subagent from a list you define (e.g. fast, deep, local). Profile routes (delegation.backend: profile_routes): the agent runs a subagent as one of your Hermes profiles, with that profile's own model, credentials, skills and SOUL.md. Only route names and their one-line descriptions reach the model. Adds hermes delegation config (pick the mode and edit its routes; --show prints the setup) and the /delegation slash command (save a mode for the next session, or --now to apply it to the current chat). Needs Hermes 0.22.5 or newer, the first release with pluggable delegation providers; Hermes 0.22.0 to 0.22.4 refuses to install it, and on a core older than 0.22.0 it installs, logs one warning and does nothing. A model route can set daybreak: true to run its model with OpenAI's Daybreak trusted-access program; it is sent only from your own CLI, TUI or Desktop chats, on openai-codex, for models your Codex catalog lists, and a route that breaks a rule is refused. Disclosure — no Python dependencies and no network or model calls of its own, except that a Daybreak route checks the Codex catalog through core's cached lookup with your existing Codex login; subagents run through core's delegate_task on the routes you configured. Writes only delegation.backend and delegation.backends.* (model_map / profile_routes) in the active profile's config.yaml, through core's config writer. A model route's optional api_key is stored in config.yaml in plain text (provider: keeps keys in .env / auth.json). Listing a profile under profile routes lets this profile's subagents use that profile's credentials, SOUL.md and terminal policy.Officialtools849NousResearchagent-importershermes import-agent: import an OpenClaw (~/.openclaw, or legacy ~/.clawdbot / ~/.moltbot), Claude Code (~/.claude), Codex CLI (~/.codex), Cursor (~/.cursor), Grok Bot (a self-export the Bot writes from a prompt the importer prints) or OpenBot desktop (its openbot.db) setup into Hermes in one command; always previews first and asks before applying. Claude Code / Codex / Cursor: instructions, Cursor rules and memories become memory entries, Bash permission rules become command allow/deny lists, MCP servers land in config.yaml, skills are copied, and --sync re-imports sources that changed. OpenClaw (core's former hermes claw migrate; the plugin keeps that spelling, hermes claw cleanup and the openclaw-migration skill): persona, memories, skills, model and messaging settings, MCP servers and agent behaviour. Formerly built into Hermes core; hermes setup offers to install it when it finds one of these agents, and profiles with a registered sync source are migrated automatically. Disclosure — no Python dependencies, no network calls and no model calls. Claude Code / Codex / Cursor: reads those agents' local config trees (never their credential files; secret-looking MCP env vars and headers are stripped and listed) and writes only into the active profile (memories/MEMORY.md with a backup, config.yaml, skills/ and import-sync.json). OpenClaw: reads the OpenClaw dir (openclaw.json, its .env, workspace files such as SOUL.md / MEMORY.md / USER.md, skills); API keys and bot tokens come over only with --migrate-secrets (allowlisted names, shown in the preview). It writes into the active profile (config.yaml, .env, SOUL.md, memories/, skills/openclaw-imports/, a migration/openclaw/<time>/ report with item backups, and a backups/pre-migration-*.zip restore point), plus a workspace dir only when --workspace-target names one. It runs local pgrep / systemctl / tasklist checks to warn when OpenClaw or a Hermes gateway is still running, and hermes claw cleanup renames the OpenClaw dir to *.pre-migration after a confirmation. Grok Bot / OpenBot: instructions become SOUL.md, memories and user facts become memory entries, skills land in skills/<source>-imports/, scheduled routines become paused cron jobs (--activate-routines to start them) and event routines a notes file; credential-looking export keys refuse the file, and secret MCP env vars and headers are stripped and listed. OpenBot's database is opened read-only (or read from a scratch copy that is deleted after the read).Officialtools849NousResearchblenderOfficial Blender Lab MCP server over stdio, pinned to upstream v1.0.3, with a Blender workflow skill. Needs Git and uv; Blender 5.1+ is not needed at install. The skill opens Blender itself when a task needs it and, after you agree, installs Blender and Blender Lab's MCP add-on. First startup downloads Python dependencies; prepare the uv environment before connecting. Disclosure — tools execute arbitrary Python in Blender with your privileges; the skill starts Blender with online access for that session only (your saved preference is unchanged), and the add-on's local server on port 9876 has no password, so any program on this computer can use it while Blender is open; only after you agree does the skill download Blender from download.blender.org (about 400 MB, about 1.5 GB unpacked), check it against blender.org's sha256 list and install it in your own folder without administrator rights (Linux ~/.local/opt, macOS ~/Applications, Windows %LOCALAPPDATA%\Programs\Blender Foundation; never over an existing Blender), and download the v1.0.3 add-on, check its hash and install or enable it; first start downloads the pinned Blender Lab MCP server and its Python dependencies with uv. Server discovery does not prove scene readiness.Officialtools849

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section