Table of Contents

Dify

Dify is an open-source agentic workflow platform that enables developers and non-technical users to build, deploy, and manage LLM-powered applications through a visual workflow designer and programmatic APIs. With over 134,000 GitHub stars, Dify has become one of the most popular platforms for orchestrating AI agents and RAG pipelines.

Repository github.com/langgenius/dify
License Apache 2.0
Language Python, TypeScript
Stars 134K+
Category Agentic Workflow Platform

Key Features

Architecture

Dify employs a Beehive modular architecture where each component can be developed, tested, and deployed independently. The platform comprises three core operational layers:

Model suppliers and models are configured declaratively using YAML-based DSL, standardizing the process of adding new models while maintaining API consistency across integration points.

graph TB subgraph Client["Client Layer"] WebUI[Web UI] API[REST API] MCP[MCP Server] end subgraph Core["Core Engine"] WF[Workflow Engine] Agent[Agent Node] Prompt[Prompt IDE] end subgraph Models["LLM Orchestration"] OpenAI[OpenAI] Claude[Anthropic] OSS[Open Source Models] end subgraph Data["Data Layer"] RAG[RAG Pipeline] VDB[(Vector DB)] KB[Knowledge Base] end Client --> Core Core --> Models Core --> Data RAG --> VDB RAG --> KB Agent --> WF

Agent Strategies

The Agent Node functions as a decision center within workflows, supporting multiple reasoning strategies:

Developers can create custom strategy plugins using CLI tools and customize configuration forms.

Code Example

import requests
 
DIFY_API_KEY = "app-your-api-key"
BASE_URL = "https://api.dify.ai/v1"
 
def run_workflow(inputs, user_id="default"):
    response = requests.post(
        f"{BASE_URL}/workflows/run",
        headers={
            "Authorization": f"Bearer {DIFY_API_KEY}",
            "Content-Type": "application/json"
        },
        json={
            "inputs": inputs,
            "response_mode": "blocking",
            "user": user_id
        }
    )
    return response.json()
 
result = run_workflow({"query": "Summarize this document"})
print(result["data"]["outputs"])

References

See Also