DashScopeAgent

Dashscope Agent

langbot-team / DashScopeAgent
Plugin0 downloadsAgent Runner1

Run an Aliyun DashScope application as a LangBot AgentRunner.

DashScope Agent

Run an Aliyun DashScope application as a LangBot AgentRunner.

Runner ID

plugin:langbot-team/DashScopeAgent/default

Configuration

FieldTypeRequiredDefaultDescription
app-typeselectyesagentApplication type (agent/workflow)
api-keysecretyes''DashScope API key
app-idstringyes''Application ID
references_quotestringno参考资料来自:Quote text for references
timeoutnumberno120Request timeout in seconds
langbot-assets-enabledbooleannofalseRegister a short-lived LangBot asset token for each run and pass it via biz_params
langbot-assets-gateway-hoststringno0.0.0.0Host for the local LangBot Asset Gateway
langbot-assets-gateway-portintegerno8765Port for the local LangBot Asset Gateway
langbot-assets-gateway-request-timeoutintegerno60Timeout for individual gateway tool calls
langbot-assets-token-ttlintegerno3600Lifetime of each run token in seconds
langbot-assets-input-namestringnolangbot_asset_run_tokenbiz_params key that receives the run token

Capabilities

  • streaming: yes

LangBot Asset Callback Through 百炼 MCP

The DashScope (百炼) agent app can call back into LangBot assets through the SDK Asset Gateway, the same mechanism the Dify runner uses. The gateway is a run-token-authorized MCP server (POST /mcp, JSON-RPC) exposing the run-authorized LangBot tools: langbot_list_assets, langbot_get_current_event, langbot_history_page, langbot_retrieve_knowledge, langbot_get_tool_detail, and langbot_call_tool.

How it works

  1. When langbot-assets-enabled is true, this runner registers a short-lived, run-scoped token before calling the app and passes it through DashScope biz_params under the key langbot-assets-input-name (default langbot_asset_run_token). This works for both agent and workflow app types; the asset callback needs the agent app type (tool-calling).
  2. The 百炼 app references that value (e.g. via a prompt/plugin variable bound to biz_params) and passes it as the run_token argument on every LangBot MCP tool call.
  3. The runner removes the token when the run ends. Tool calls without a valid token are rejected by the gateway.

The gateway accepts the token via an Authorization: Bearer header or via a run_token tool-call argument. Use the run_token argument approach here.

Configure 百炼

  1. In the 百炼 agent app, attach the LangBot Asset Gateway as an MCP service whose URL routes to the gateway /mcp (a public HTTPS URL for 百炼 Cloud).
  2. Add an app input/variable bound to biz_params.langbot_asset_run_token.
  3. In the app prompt, instruct the agent to pass that value as run_token on every LangBot MCP tool call, and to call langbot_list_assets first when it needs to discover the run's assets.

Configure LangBot

Select the DashScope runner and set:

app-type = agent
api-key = <DashScope API key>
app-id = <百炼 app id>
langbot-assets-enabled = true
langbot-assets-gateway-host = 0.0.0.0
langbot-assets-gateway-port = 8765
langbot-assets-token-ttl = 3600
langbot-assets-input-name = langbot_asset_run_token

Limitations

  • 百炼 Cloud cannot reach localhost; use a public HTTPS URL for the gateway /mcp endpoint.
  • The run token is short-lived and run-scoped; the app must complete its asset callbacks within the app run.
  • The gateway exposes only the assets permitted by the current run: current event, history page, knowledge retrieval, tool detail, and tool call.
  • The 百炼 app must support attaching an external MCP service and forwarding the biz_params value into the tool call. Verify the tools/list handshake and end-to-end token passing in your 百炼 app before relying on it.

Legacy Runner

Migrated from dashscope-app-api in LangBot.

Use Dashscope Agent in Feishu/Lark bots, DingTalk bots, WeCom bots, WeChat bots, QQ bots, Slack bots, Discord bots, Telegram bots, LINE Bots, and Matrix Bots.

Host your bot on LangBot Cloud and connect this extension to the collaboration platforms your team already uses.

Open LangBot Cloud

Comments