Dify LLM Application Development Platform

repository·main·Indexed 12 days ago

https://github.com/langgenius/dify

An open-source LLM application development platform providing a visual interface for AI workflows, RAG pipelines, and agentic capabilities. It features a modular provider architecture for Vector Databases (VDB) and observability tracing, including Enterprise telemetry support via OpenTelemetry (OTEL) for integration with Prometheus, Grafana, Jaeger, and Honeycomb.

Tokens
460.1K
Snippets
1.3K
Records
2K
Agent score
100%

What's inside Dify

  1. Overview of Agent V2 Configuration Runtime

    main

    The agent-v2/agent-detail/configure feature manages the runtime for the Agent V2 configuration interface. This includes the Agent App configuration page and the inline Agent configuration surface within workflows.

    Key capabilities managed by this module include:

    • Editable Composer Drafts: Wiring for managing unsaved changes in the agent composer.
    • Chat Session Building: Constructing and managing chat sessions for testing.
    • Version Management: Viewing different versions of the agent configuration.
    • Draft Mode: Building and managing agent drafts before deployment.
    • Previewing: Providing side panels for real-time previewing of agent behavior.
  2. Overview of Dify Agent runtime

    main

    Dify Agent is a runtime that hosts Agenton-composed Pydantic AI runs via a FastAPI API. It is structured into two main components:

    1. Dify Agent Logic: Located in src/dify_agent, containing the specific implementation for Dify.
    2. Agenton Framework: Located in src/agenton and src/agenton_collections, providing framework-neutral code used to compose agents.

    For details on managing the local server, refer to the operations guide.

  3. What is Dify?

    main

    Dify is an open-source LLM app development platform designed to take applications from prototype to production. It provides a visual interface for building AI workflows and includes several core capabilities:

    • Workflow: A visual canvas for building and testing complex AI workflows.
    • Model Support: Integration with hundreds of proprietary and open-source LLMs (e.g., GPT, Mistral, Llama3) via various providers or OpenAI-compatible APIs.
    • Prompt IDE: Tools for crafting prompts, comparing model performance, and adding features like text-to-speech.
    • RAG Pipeline: End-to-end Retrieval Augmented Generation capabilities, including document ingestion (PDF, PPT, etc.) and retrieval.
    • Agent Capabilities: Support for LLM Function Calling or ReAct agents with over 50 built-in tools (e.g., Google Search, DALL·E, WolframAlpha).
    • LLMOps: Observability features to monitor application logs and performance, with integrations for Opik, Langfuse, and Arize Phoenix.
    • Backend-as-a-Service: Full API coverage for all Dify offerings to integrate them into existing business logic.
  4. Overview of Dify core features

    main

    Dify is an open-source LLM app development platform designed to move prototypes to production quickly. Key capabilities include:

    • Workflow: Visual canvas for building and testing AI workflows.
    • Comprehensive Model Support: Integration with hundreds of proprietary and open-source LLMs (GPT, Mistral, Llama3, etc.) via OpenAI-compatible APIs.
    • Prompt IDE: Interface for prompt engineering, model comparison, and adding features like text-to-speech.
    • RAG Pipeline: End-to-end Retrieval Augmented Generation, including document ingestion (PDF, PPT, etc.) and retrieval.
    • Agent Capabilities: Support for LLM Function Calling or ReAct agents with 50+ built-in tools (e.g., Google Search, DALL·E, WolframAlpha).
    • LLMOps: Observability for monitoring application logs, performance, and production data annotations.
    • Backend-as-a-Service: Full API coverage for all Dify features to allow integration into existing business logic.
  5. Overview of the New RAG Feature

    main

    The New RAG feature in Dify provides a comprehensive interface for managing Retrieval-Augmented Generation (RAG) workflows. It is built upon a KnowledgeFS backend and handles the following core functionalities:

    • Knowledge Management: Rendering knowledge lists and managing knowledge spaces.
    • Creation Flows: Facilitating the creation of new knowledge bases through various workflows.
    • Source & Document Management: Managing data sources, individual documents, and document versions.
    • Processing Tasks: Monitoring and managing document processing, chunking, and re-indexing tasks.
  6. Overview of the Deployments List feature

    main

    The Deployments List is a feature page designed for browsing app instances. It provides capabilities to:

    • Filter deployments: Search for specific instances using keywords or filter by environment.
    • Monitor status: View deployment status via rendered status cards.
    • Manage instances: Access deployment actions and release creation entry points directly from the list view.
  7. Deployment Instances Row Actions Overview

    main

    The row-actions module provides the UI components for managing environment deployments at the row level within the deployment interface. It specifically handles the row action menu and the associated dialogs required for three primary lifecycle operations:

    1. Deploying: Initiating a new deployment for an environment.
    2. Redeploying: Triggering a redeployment of an existing environment.
    3. Undeploying: Removing an existing environment deployment.

    This module coordinates with internal modules to manage the deployment drawer and ensure the correct application instance identity is used during mutations.

  8. Console API Overview

    main

    The Console API (Version 1.0) provides management endpoints for Dify administration, including account management, app configuration, and monitoring.

    Available Account Endpoints:

    • GET /account/avatar: Retrieve account avatar.
    • POST /account/avatar: Update account avatar.
    • POST /account/change-email: Initiate email change.
    • POST /account/change-email/check-email-unique: Verify if a new email is unique.
    • POST /account/change-email/reset: Reset email change process.
    • POST /account/change-email/validity: Check email change validity.
    • POST /account/delete: Delete account.
    • POST /account/delete/feedback: Provide feedback during account deletion.
  9. Review dify-agent-runtime architecture and components

    main

    The dify-agent-runtime is composed of several key binaries and internal components:

    • shellctl: The main server binary (run via shellctl serve).
    • sanitize-pty: A tmux pipe-pane PTY sanitizer that filters stdin to stdout.
    • runner-exit: A post-drain SQLite exit recorder.
    • dify-agent-cli: A CLI tool used to communicate with the agent backend.
    • runner: A process runner used to bootstrap agent commands.
    • internal/: Contains the core implementation logic.