• DISCOVERY
  • EXECUTION
  • RESULTS
  • HUMAN

How to run Dify workflows with your AI agent

Connect your agent to Dify to trigger complex logic chains. Once linked, your AI handles the parameter mapping and execution for you.

Ask AI about this page

Short answer

How can I make my AI run a Dify workflow?

Your agent uses the Dify.AI SDK to fetch workflow details and required inputs. It then maps your natural language to those parameters and triggers the execution. You get the final output right in your chat.

The outcomes

Where your requests land

Your agent acts as the bridge between your chat and your Dify logic.

DISCOVERY

Identify required inputs

The AI looks up the specific variables a workflow needs. It knows exactly what data to pull from your conversation to satisfy the requirements.

EXECUTION

Trigger the workflow

Your agent sends the gathered data to Dify to start the process. The logic runs in the background while you continue chatting.

RESULTS

Get the final output

The AI captures the completed data or text from the Dify engine. You see the finished result immediately in your current session.

HUMAN

Review the outcome

The AI presents the workflow result to you. You decide if the output is correct or if you need to run it again with different data.

The workflow

What your AI does when a request arrives.

The AI manages the technical handoff between your prompt and the Dify engine.

  1. Inspect workflow

    The AI checks the specific workflow to understand its purpose and structure.

    get_workflow_info
  2. Fetch parameters

    The AI identifies the exact variables needed to satisfy the workflow's requirements.

    get_workflow_parameters
  3. Run the logic

    The AI sends the mapped data to Dify to trigger the execution.

    run_workflow
  4. Deliver results

    The AI processes the response from the Dify engine to show you the final output.

    run_workflow

Try it

Copy these to start.

Use these prompts to trigger your Dify workflows.

Starting points

Swap the bracketed text for your actual workflow IDs or specific variable names.

Dify.AI Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_esFwQvD1BTqmueeHwIOlGHPDJ8Oq0FzvLe2J4jkV/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Dify.AI capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "difyai-sdk-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_esFwQvD1BTqmueeHwIOlGHPDJ8Oq0FzvLe2J4jkV/mcp"
    }
  }
}
Copy into chat04
  • Run the 'customer_onboarding' workflow using the email 'user@example.com'.

  • What parameters are required for the 'data_summarizer' workflow?

  • Execute the 'report_generator' workflow with the topic 'quarterly sales'.

  • Get the info for the workflow with ID 'wf_98765' to see what it does.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Dify.AI SDK once, then ask.

One link connects your agent to Dify. Your credentials stay encrypted on our side, and you can start running workflows immediately.

Connect Dify.AI SDK to your AI

FAQ

How this task behaves

  • 01

    Can my AI create new workflows in Dify?

    No. The AI can only run, inspect, and get parameters for workflows that already exist.

  • 02

    Can the AI change the logic inside a workflow?

    No. The AI can only execute the workflow as it is currently configured in Dify.

  • 03

    Does the AI decide which parameters to use?

    Yes. The AI looks at the workflow requirements and pulls the necessary data from your chat.

  • 04

    Can the AI delete a workflow?

    No. There are no tools available to delete or remove workflows from your Dify account.

  • 05

    How does the AI know what a workflow needs?

    It uses the tool to fetch the specific parameter requirements defined in your Dify setup.

  • More questions about Dify.AI SDK? The Connector page answers them. See everything the Dify.AI SDK Connector can do

Connect Dify.AI to Claude, Cursor, ChatGPT & more