# Dify: self-hosted AI agent and RAG workspace

> Sets up a free, self-hosted workspace for building AI agents and apps.

- **What it does:** Sets up your own free copy of Dify, a workspace where you build AI apps and agents by dragging and connecting steps, including ones that answer questions from your own documents. You end up with a working AI app builder you control.
- **Agents:** Claude Code and Codex (through orbit-connect), Claude and ChatGPT (through the Orbit connector)
- **Install:** `npx -y --loglevel=error orbit-connect@0.3.33 install skl_165c4ec19a11d9b5c1a716c9`
- **Creator:** @orbit.builders on Instagram
- **Safety:** Checked by Orbit: nothing risky found in what it runs or reads
- **Last updated:** 2026-11-15
- **Page:** https://orbitinbox.app/s/dify-self-hosted-ai-agent-and-rag-workspace

## Skill

---
name: dify-ai-workspace
description: Use when you want one command to spin up a free workspace where AI agents and RAG pipelines wire together to build AI apps; it self-hosts Dify, an open-source LLM app platform with a workflow canvas, RAG pipeline, prompt IDE, and model management.
---

# Dify: self-hosted AI agent and RAG workspace

## What it does
Dify is an open-source LLM app development platform. It combines several pieces in one workspace:
- **Workflow**: a visual canvas for building and testing AI workflows.
- **Comprehensive model support**: hundreds of proprietary and open-source LLMs, covering GPT, Mistral, Llama3, and any OpenAI API-compatible model.
- **Prompt IDE**: an interface for crafting and comparing prompts, plus extras like text-to-speech for chat apps.
- **RAG Pipeline**: document ingestion and retrieval, with built-in text extraction from PDFs, PPTs, and other common formats.
- **Agent**: autonomous agents that run commands, install software, and handle files; you describe the agent and it builds itself, and you can give it skills, tools from the Dify Marketplace, MCP servers, or your own APIs.
- **LLMOps**: monitoring and analysis of application logs and performance over time, with observability integrations (Opik, Langfuse, Arize Phoenix).
- **Backend-as-a-Service**: APIs for every feature, so you can integrate Dify into your own app logic.

You can deploy it on Dify Cloud, self-host the Community Edition, or (for organizations) use Dify Enterprise with SSO and RBAC.

## What you need
- Docker with a running daemon
- Docker Compose v2.35.0 or later
- OpenSSL
- A machine with CPU >= 2 Core and RAM >= 4 GiB
- A web browser to open the local install page

## Setup
Run these from the repository root after cloning `github.com/langgenius/dify`:

```bash
cd docker
cp .env.example .env
openssl rand -hex 32
```

Open the `.env` file and set `DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN` to the value `openssl` generated. Keep the default `COMPOSE_PROFILES` value for the bundled services.

Then start the services from the same `docker` directory:

```bash
docker compose up -d
docker compose ps --all
```

Once the services are running, open `http://localhost/install` in your browser to complete the initial setup. The one-time `init_permissions` service is expected to exit with code `0`.

For optional settings, observability, and deployment options, see the project's Docker deployment guide and Advanced Setup doc at https://github.com/langgenius/dify.

## How to use it with Claude
- "Build me a workflow in Dify that takes a PDF, extracts the text, and summarizes it."
- "Set up a RAG pipeline in Dify over my documents and let me query them in the Prompt IDE."
- "Create an agent in Dify, give it a tool from the Dify Marketplace, and use it as a chat app."
- "Compare how GPT and Llama3 perform on this prompt inside Dify's Prompt IDE."
- "Connect an MCP server to a Dify agent so it can use external tools."
- "Show me the application logs for this Dify app so I can improve the prompt."

## Credits
Made by langgenius (Dify), packaged by Orbit.
https://github.com/langgenius/dify — license: Dify Open Source License, based on Apache 2.0 with additional conditions (also listed on GitHub as NOASSERTION; check the LICENSE file in the repo for exact terms).

Shared by @orbit.builders, credited on Orbit.