Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Wiring Dify into WeCom Customer Service: install a Runner plugin, let an Agent own message.received

说明与用途

使用 Dify Agent Runner 插件实现 WeCom 客服与 Dify 的自动消息交互,消除手动复制粘贴。

问题

The WeCom customer‑service side only answers customers; every question is retyped into Dify’s chat box and the answer copied back, so the two systems are not connected.

结果

The WeCom Customer Service bot now automatically forwards incoming messages to Dify and returns Dify’s responses, eliminating manual re‑typing.

工作流

  • Create a local LangBot instance (docker network, core and runtime containers).
  • Create a WeCom Customer Service bot in LangBot with required credentials.
  • Install the Dify Agent runner plugin from the marketplace.
  • Create an Agent processor, selecting the Dify Agent runner.
  • Configure the runner with Dify base URL, API key, timeout, expiry and identity.
  • Bind the event route: set the message.received event to use the new Agent processor.
  • Verify the route with the route‑check reply.
  • Run an event‑debug test by sending a sample question.
  • Check Dify endpoint logs to confirm the request was received.

证据

The knowledge base, prompts and tools live in a Dify application; the WeCom customer-service side only answers customers.

来源

On 4.10 the only route was a pipeline: Dify as a provider (Dify service API), wired into one pipeline.

来源

4.11 makes a processor an Agent, whose Runner comes from a plugin.

来源

Runners are marketplace plugins. Dify is the official langbot-team/DifyAgent plugin, runner id plugin:langbot-team/DifyAgent/default.

来源

Connection details live in the processor's runner config. Choose Agent mode, pick Dify Agent, then fill Dify-side values; DOM readings here (measured 2026-10-16): 基础 URL (http://dify:5001/v1), API 密钥, 超时 (30), 过期 (3600), 身份 (发送者).

来源

Event routing maps events to processors; the first match wins. Matching picks by priority from high to low, then list order, and runs exactly one response target.

来源

Run one event-debug pass: Agent detail → event debug → run test with 「请问你们支持私有化部署吗?」.

来源

One measured request line, verbatim: [2026-10-16T16:28:29] POST /v1/chat-messages auth=Bearer app-dem... body={"inputs":{},"query":"…"}

来源

  • 记录日期: 2026-10-19T03:41:25.005Z