2024-08-22 13:33:01 +09:00
<div align="center">
2026-03-16 14:44:39 +08:00
<a href="https://cloud.ragflow.io/">
2025-10-15 11:46:24 +08:00
<img src="web/src/assets/logo-with-text.svg" width="520" alt="ragflow logo">
2024-08-22 13:33:01 +09:00
</a>
</div>
<p align="center">
2025-05-28 18:31:50 +08:00
<a href="./README.md"><img alt="README in English" src="https://img.shields.io/badge/English-DFE0E5"></a>
<a href="./README_zh.md"><img alt="简体中文版自述文件" src="https://img.shields.io/badge/简体中文-DFE0E5"></a>
2025-06-16 21:14:50 +08:00
<a href="./README_tzh.md"><img alt="繁體版中文自述文件" src="https://img.shields.io/badge/繁體中文-DFE0E5"></a>
2025-05-28 18:31:50 +08:00
<a href="./README_ja.md"><img alt="日本語のREADME" src="https://img.shields.io/badge/日本語-DFE0E5"></a>
<a href="./README_ko.md"><img alt="한국어" src="https://img.shields.io/badge/한국어-DBEDFA"></a>
2026-05-06 11:57:29 +08:00
<a href="./README_fr.md"><img alt="README en Français" src="https://img.shields.io/badge/Français-DFE0E5"></a>
2025-05-28 18:31:50 +08:00
<a href="./README_id.md"><img alt="Bahasa Indonesia" src="https://img.shields.io/badge/Bahasa Indonesia-DFE0E5"></a>
<a href="./README_pt_br.md"><img alt="Português(Brasil)" src="https://img.shields.io/badge/Português(Brasil)-DFE0E5"></a>
2026-03-02 19:10:11 +08:00
<a href="./README_ar.md"><img alt="README in Arabic" src="https://img.shields.io/badge/Arabic-DFE0E5"></a>
docs: add Turkish README translation (README_tr.md) (#13750)
## Summary
Add a complete Turkish translation of the README and include a Turkish
language badge across all existing README files.
## Changes
- **New file**: `README_tr.md` - Full Turkish translation of README.md,
covering all sections (What is RAGFlow, Demo, Latest Updates, Key
Features, System Architecture, Get Started, Configurations, Docker
Image, Development from Source, Documentation, Roadmap, Community,
Contributing)
- **Updated 9 existing README files** (README.md, README_zh.md,
README_tzh.md, README_ja.md, README_ko.md, README_id.md,
README_pt_br.md, README_fr.md, README_ar.md) to include the Turkish
language badge in the language selector
## Impact
- 10 files changed, 417 insertions
- Follows the same structure and conventions as other language-specific
README files (README_ja.md, README_ko.md, etc.)
- Turkish badge uses the same styling pattern (highlighted with DBEDFA
in README_tr.md, standard DFE0E5 in others)
---------
Co-authored-by: bakiburakogun <bakiburakogun@users.noreply.github.com>
2026-03-24 14:00:48 +03:00
<a href="./README_tr.md"><img alt="Türkçe README" src="https://img.shields.io/badge/Türkçe-DFE0E5"></a>
2024-08-22 13:33:01 +09:00
</p>
<p align="center">
2024-10-29 21:05:38 +08:00
<a href="https://x.com/intent/follow?screen_name=infiniflowai" target="_blank">
<img src="https://img.shields.io/twitter/follow/infiniflow?logo=X&color=%20%23f5f5f5" alt="follow on X(Twitter)">
2024-08-22 13:33:01 +09:00
</a>
2026-03-16 14:44:39 +08:00
<a href="https://cloud.ragflow.io" target="_blank">
2026-05-06 11:57:29 +08:00
<img alt="Static Badge" src="https://img.shields.io/badge/Get-Started-4e6b99">
2024-10-29 21:05:38 +08:00
</a>
2024-08-22 13:33:01 +09:00
<a href="https://hub.docker.com/r/infiniflow/ragflow" target="_blank">
2026-06-29 09:40:45 +08:00
<img src="https://img.shields.io/docker/pulls/infiniflow/ragflow?label=Docker%20Pulls&color=0db7ed&logo=docker&logoColor=white&style=flat-square" alt="docker pull infiniflow/ragflow:v0.26.2">
2024-10-29 21:05:38 +08:00
</a>
<a href="https://github.com/infiniflow/ragflow/releases/latest">
<img src="https://img.shields.io/github/v/release/infiniflow/ragflow?color=blue&label=Latest%20Release" alt="Latest Release">
</a>
2024-08-22 13:33:01 +09:00
<a href="https://github.com/infiniflow/ragflow/blob/main/LICENSE">
2024-10-29 21:05:38 +08:00
<img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?labelColor=d4eaf7&color=2e6cc4" alt="license">
</a>
2025-05-28 09:29:33 +08:00
<a href="https://deepwiki.com/infiniflow/ragflow">
<img alt="Ask DeepWiki" src="https://deepwiki.com/badge.svg">
</a>
2024-08-22 13:33:01 +09:00
</p>
<h4 align="center">
2026-05-06 11:57:29 +08:00
<a href="https://cloud.ragflow.io">Cloud</a> |
2024-08-22 13:33:01 +09:00
<a href="https://ragflow.io/docs/dev/">Document</a> |
2025-12-31 12:49:42 +08:00
<a href="https://github.com/infiniflow/ragflow/issues/12241">Roadmap</a> |
2026-05-06 11:57:29 +08:00
<a href="https://discord.gg/NjYzJD3GM3">Discord</a>
2024-08-22 13:33:01 +09:00
</h4>
2025-10-29 00:34:39 +08:00
<div align="center" style="margin-top:20px;margin-bottom:20px;">
<img src="https://raw.githubusercontent.com/infiniflow/ragflow-docs/refs/heads/image/image/ragflow-octoverse.png" width="1200"/>
</div>
<div align="center">
<a href="https://trendshift.io/repositories/9064" target="_blank"><img src="https://trendshift.io/api/badge/repositories/9064" alt="infiniflow%2Fragflow | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</div>
2025-05-28 18:31:50 +08:00
2024-08-22 13:33:01 +09:00
## 💡 RAGFlow란?
2025-12-31 20:07:40 +08:00
[RAGFlow ](https://ragflow.io/ ) 는 최첨단 [RAG ](https://ragflow.io/basics/what-is-rag )(Retrieval-Augmented Generation)와 Agent 기능을 융합하여 대규모 언어 모델(LLM)을 위한 우수한 컨텍스트 계층을 생성하는 선도적인 오픈소스 RAG 엔진입니다. 모든 규모의 기업에 적용 가능한 효율적인 RAG 워크플로를 제공하며, 통합 [컨텍스트 엔진 ](https://ragflow.io/basics/what-is-agent-context-engine )과 사전 구축된 Agent 템플릿을 통해 개발자들이 복잡한 데이터를 예외적인 효율성과 정밀도로 고급 구현도의 프로덕션 준비 완료 AI 시스템으로 변환할 수 있도록 지원합니다.
2024-08-22 13:33:01 +09:00
2026-05-06 11:57:29 +08:00
## 🎮 시작하기
2025-01-21 00:22:29 -03:00
2026-05-06 11:57:29 +08:00
[https://cloud.ragflow.io ](https://cloud.ragflow.io )에서 저희 클라우드 서비스를 이용해 보세요.
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
<div align="center" style="margin-top:20px;margin-bottom:20px;">
2025-08-01 20:42:12 +08:00
<img src="https://raw.githubusercontent.com/infiniflow/ragflow-docs/refs/heads/image/image/chunking.gif" width="1200"/>
<img src="https://raw.githubusercontent.com/infiniflow/ragflow-docs/refs/heads/image/image/agentic-dark.gif" width="1200"/>
2024-08-22 13:33:01 +09:00
</div>
## 🔥 업데이트
Feat: chat channels — connect assistants to external messaging bots (#15850)
### What problem does this PR solve?
#15844
Adds a **Chat channels** capability so a RAGFlow assistant (Dialog) can
be exposed as a bot on external messaging platforms (Feishu/Lark,
Discord, Telegram, Slack, WeCom, LINE, etc.). An admin configures a bot
in the UI, connects it to an assistant, and inbound messages are
answered from that assistant's knowledge base — replies are delivered
back on the channel.
**Feishu/Lark is implemented and tested end-to-end.** Discord, Telegram,
LINE, and WeCom are scaffolded against the same interface; the remaining
listed channels are tracked as follow-ups.
### Design
**Backend**
- New `chat_channel` table (`tenant_id`, `name`, `channel`, `config`
JSON holding `{credential: {...}}`, `dialog_id`, `status`) +
`ChatChannelService` and RESTful CRUD under `/api/v1/chat_channels`.
- Channel framework under `api/channels/`: a `core` registry +
per-channel packages that self-register a builder and implement a common
`Channel` interface (`start`/`stop`/`send` + inbound normalization) over
`IncomingMessage`/`OutgoingMessage`.
- Embedded **reconcile loop** in `ragflow_server`
(`api/channels/bootstrap.py`): loads enabled bots, and
starts/stops/restarts them as rows change (no server restart needed).
Inbound messages run the connected dialog via the non-streaming
completion path, keeping per-end-user conversation history.
- Missing optional channel SDKs degrade gracefully (channel skipped with
a warning; others unaffected). Channel-level errors are logged, not
crashed.
- Feishu's WebSocket client runs in a dedicated thread with its own
event loop to avoid cross-loop/contextvars conflicts with the channel
runtime.
**Frontend**
- **Settings → Chat channels** panel: available-channels grid +
configured-bots list with add/edit/delete and a **Connect assistant**
popup that binds a bot to a dialog.
- Brand icons via simple-icons / reused shared data-source assets, with
colored fallbacks for brands not available.
- Route, sidebar entry, i18n (en/zh), and a top-nav segment-boundary fix
so the settings page no longer highlights the Chat tab.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
### Notes
- DB: new `chat_channel` table is auto-created; `chat_channel.dialog_id`
is also covered by a `migrate_db` `alter_db_add_column` for existing
installs.
- Channel SDKs (`lark-oapi`, `discord.py`, `python-telegram-bot`,
`line-bot-sdk`, `wechatpy`, `aiohttp`) added to dependencies.
- Screenshots / per-channel credential docs to follow.
<img width="1338" height="1290" alt="Image"
src="https://github.com/user-attachments/assets/042cb2f9-0dad-4e6a-bcf7-43ced4bbd704"
/>
<img width="1344" height="738" alt="Image"
src="https://github.com/user-attachments/assets/373cd08e-ec40-4c67-9c51-4d948b1ba617"
/>
<img width="672" height="887" alt="Image"
src="https://github.com/user-attachments/assets/5a34953f-a9a3-4c1e-869e-5eff0dc64c84"
/>
---------
2026-06-12 18:21:30 +08:00
- 2026-06-15 Feishu, Discord, Telegram, Line 등 다양한 채팅 채널을 지원합니다.
2026-04-30 20:12:29 +08:00
- 2026-04-24 DeepSeek v4를 지원합니다.
2026-04-03 17:29:48 +08:00
- 2026-03-24 [RAGFlow Skill on OpenClaw ](https://clawhub.ai/yingfeng/ragflow-skill ) — OpenClaw를 통해 RAGFlow 데이터셋에 접근하는 공식 스킬 제공.
2025-12-27 20:44:35 +08:00
- 2025-12-26 AI 에이전트의 '메모리' 기능 지원.
2025-11-19 14:16:03 +08:00
- 2025-11-19 Gemini 3 Pro를 지원합니다.
2025-11-21 14:51:58 +08:00
- 2025-11-12 Confluence, S3, Notion, Discord, Google Drive에서 데이터 동기화를 지원합니다.
2025-10-27 12:20:23 +08:00
- 2025-10-23 문서 파싱 방법으로 MinerU 및 Docling을 지원합니다.
2025-10-15 09:58:07 +08:00
- 2025-10-15 조정된 데이터 파이프라인 지원.
2025-08-08 11:54:40 +08:00
- 2025-08-08 OpenAI의 최신 GPT-5 시리즈 모델을 지원합니다.
2025-08-05 20:27:43 +08:00
- 2025-08-01 에이전트 워크플로우와 MCP를 지원합니다.
2025-05-28 18:31:50 +08:00
- 2025-05-23 Agent에 Python/JS 코드 실행기 구성 요소를 추가합니다.
2025-04-14 14:45:37 +08:00
- 2025-03-19 PDF 또는 DOCX 파일 내의 이미지를 이해하기 위해 다중 모드 모델을 사용하는 것을 지원합니다.
Feat: chat channels — connect assistants to external messaging bots (#15850)
### What problem does this PR solve?
#15844
Adds a **Chat channels** capability so a RAGFlow assistant (Dialog) can
be exposed as a bot on external messaging platforms (Feishu/Lark,
Discord, Telegram, Slack, WeCom, LINE, etc.). An admin configures a bot
in the UI, connects it to an assistant, and inbound messages are
answered from that assistant's knowledge base — replies are delivered
back on the channel.
**Feishu/Lark is implemented and tested end-to-end.** Discord, Telegram,
LINE, and WeCom are scaffolded against the same interface; the remaining
listed channels are tracked as follow-ups.
### Design
**Backend**
- New `chat_channel` table (`tenant_id`, `name`, `channel`, `config`
JSON holding `{credential: {...}}`, `dialog_id`, `status`) +
`ChatChannelService` and RESTful CRUD under `/api/v1/chat_channels`.
- Channel framework under `api/channels/`: a `core` registry +
per-channel packages that self-register a builder and implement a common
`Channel` interface (`start`/`stop`/`send` + inbound normalization) over
`IncomingMessage`/`OutgoingMessage`.
- Embedded **reconcile loop** in `ragflow_server`
(`api/channels/bootstrap.py`): loads enabled bots, and
starts/stops/restarts them as rows change (no server restart needed).
Inbound messages run the connected dialog via the non-streaming
completion path, keeping per-end-user conversation history.
- Missing optional channel SDKs degrade gracefully (channel skipped with
a warning; others unaffected). Channel-level errors are logged, not
crashed.
- Feishu's WebSocket client runs in a dedicated thread with its own
event loop to avoid cross-loop/contextvars conflicts with the channel
runtime.
**Frontend**
- **Settings → Chat channels** panel: available-channels grid +
configured-bots list with add/edit/delete and a **Connect assistant**
popup that binds a bot to a dialog.
- Brand icons via simple-icons / reused shared data-source assets, with
colored fallbacks for brands not available.
- Route, sidebar entry, i18n (en/zh), and a top-nav segment-boundary fix
so the settings page no longer highlights the Chat tab.
### Type of change
- [x] New Feature (non-breaking change which adds functionality)
### Notes
- DB: new `chat_channel` table is auto-created; `chat_channel.dialog_id`
is also covered by a `migrate_db` `alter_db_add_column` for existing
installs.
- Channel SDKs (`lark-oapi`, `discord.py`, `python-telegram-bot`,
`line-bot-sdk`, `wechatpy`, `aiohttp`) added to dependencies.
- Screenshots / per-channel credential docs to follow.
<img width="1338" height="1290" alt="Image"
src="https://github.com/user-attachments/assets/042cb2f9-0dad-4e6a-bcf7-43ced4bbd704"
/>
<img width="1344" height="738" alt="Image"
src="https://github.com/user-attachments/assets/373cd08e-ec40-4c67-9c51-4d948b1ba617"
/>
<img width="672" height="887" alt="Image"
src="https://github.com/user-attachments/assets/5a34953f-a9a3-4c1e-869e-5eff0dc64c84"
/>
---------
2026-06-12 18:21:30 +08:00
2024-08-22 13:33:01 +09:00
2024-09-30 16:21:56 +08:00
## 🎉 계속 지켜봐 주세요
2025-01-21 00:22:29 -03:00
2024-09-30 16:21:56 +08:00
⭐️우리의 저장소를 즐겨찾기에 등록하여 흥미로운 새로운 기능과 업데이트를 최신 상태로 유지하세요! 모든 새로운 릴리스에 대한 즉시 알림을 받으세요! 🌟
2025-01-21 00:22:29 -03:00
2024-09-30 16:21:56 +08:00
<div align="center" style="margin-top:20px;margin-bottom:20px;">
<img src="https://github.com/user-attachments/assets/18c9707e-b8aa-4caf-a154-037089c105ba" width="1200"/>
</div>
2024-08-22 13:33:01 +09:00
## 🌟 주요 기능
### 🍭 **"Quality in, quality out"**
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
- [심층 문서 이해 ](./deepdoc/README.md )를 기반으로 복잡한 형식의 비정형 데이터에서 지식을 추출합니다.
- 문자 그대로 무한한 토큰에서 "데이터 속의 바늘"을 찾아냅니다.
### 🍱 **템플릿 기반의 chunking**
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
- 똑똑하고 설명 가능한 방식.
- 다양한 템플릿 옵션을 제공합니다.
### 🌱 **할루시네이션을 줄인 신뢰할 수 있는 인용**
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
- 텍스트 청킹을 시각화하여 사용자가 개입할 수 있도록 합니다.
- 중요한 참고 자료와 추적 가능한 인용을 빠르게 확인하여 신뢰할 수 있는 답변을 지원합니다.
### 🍔 **다른 종류의 데이터 소스와의 호환성**
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
- 워드, 슬라이드, 엑셀, 텍스트 파일, 이미지, 스캔본, 구조화된 데이터, 웹 페이지 등을 지원합니다.
### 🛀 **자동화되고 손쉬운 RAG 워크플로우**
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
- 개인 및 대규모 비즈니스에 맞춘 효율적인 RAG 오케스트레이션.
- 구성 가능한 LLM 및 임베딩 모델.
- 다중 검색과 결합된 re-ranking.
- 비즈니스와 원활하게 통합할 수 있는 직관적인 API.
## 🔎 시스템 아키텍처
<div align="center" style="margin-top:20px;margin-bottom:20px;">
2025-10-16 14:30:55 +08:00
<img src="https://github.com/user-attachments/assets/31b0dd6f-ca4f-445a-9457-70cb44a381b2" width="1000"/>
2024-08-22 13:33:01 +09:00
</div>
2026-05-06 11:57:29 +08:00
## 🎬 자체 호스팅
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
### 📝 사전 준비 사항
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
- CPU >= 4 cores
- RAM >= 16 GB
- Disk >= 50 GB
- Docker >= 24.0.0 & Docker Compose >= v2.26.1
2026-05-25 20:23:30 +08:00
- Python >= 3.13
2025-05-16 16:28:21 +08:00
- [gVisor ](https://gvisor.dev/docs/user_guide/install/ ): RAGFlow의 코드 실행기(샌드박스) 기능을 사용하려는 경우에만 필요합니다.
> [!TIP]
> 로컬 머신(Windows, Mac, Linux)에 Docker가 설치되지 않은 경우, [Docker 엔진 설치](<(https://docs.docker.com/engine/install/)>)를 참조하세요.
2024-08-22 13:33:01 +09:00
### 🚀 서버 시작하기
1. `vm.max_map_count` 가 262144 이상인지 확인하세요:
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
> `vm.max_map_count`의 값을 아래 명령어를 통해 확인하세요:
>
> ```bash
> $ sysctl vm.max_map_count
> ```
>
> 만약 `vm.max_map_count` 이 262144 보다 작다면 값을 쟈설정하세요.
>
> ```bash
> # 이 경우에 262144로 설정했습니다.:
> $ sudo sysctl -w vm.max_map_count=262144
> ```
>
> 이 변경 사항은 시스템 재부팅 후에 초기화됩니다. 변경 사항을 영구적으로 적용하려면 /etc/sysctl.conf 파일에 vm.max_map_count 값을 추가하거나 업데이트하세요:
>
> ```bash
> vm.max_map_count=262144
> ```
2. 레포지토리를 클론하세요:
```bash
$ git clone https://github.com/infiniflow/ragflow.git
```
3. 미리 빌드된 Docker 이미지를 생성하고 서버를 시작하세요:
2025-03-04 19:21:28 +08:00
> [!CAUTION]
> 모든 Docker 이미지는 x86 플랫폼을 위해 빌드되었습니다. 우리는 현재 ARM64 플랫폼을 위한 Docker 이미지를 제공하지 않습니다.
> ARM64 플랫폼을 사용 중이라면, [시스템과 호환되는 Docker 이미지를 빌드하려면 이 가이드를 사용해 주세요](https://ragflow.io/docs/dev/build_docker_image).
2026-06-29 09:40:45 +08:00
> 아래 명령어는 RAGFlow Docker 이미지의 v0.26.2 버전을 다운로드합니다. 다양한 RAGFlow 버전에 대한 설명은 다음 표를 참조하십시오. v0.26.2와 다른 RAGFlow 버전을 다운로드하려면, docker/.env 파일에서 RAGFLOW_IMAGE 변수를 적절히 업데이트한 후 docker compose를 사용하여 서버를 시작하십시오.
2024-10-10 19:24:54 +08:00
2024-08-22 13:33:01 +09:00
```bash
2025-02-19 13:19:36 +08:00
$ cd ragflow/docker
2025-12-31 20:07:40 +08:00
2026-06-29 09:40:45 +08:00
# git checkout v0.26.2
2025-11-19 19:40:55 +08:00
# Optional: use a stable tag (see releases: https://github.com/infiniflow/ragflow/releases)
2025-11-13 09:50:47 +08:00
# 이 단계는 코드의 entrypoint.sh 파일이 Docker 이미지 버전과 일치하도록 보장합니다.
2025-11-11 19:56:54 +08:00
2025-11-12 13:57:35 +08:00
# Use CPU for DeepDoc tasks:
2025-02-19 13:19:36 +08:00
$ docker compose -f docker-compose.yml up -d
2025-03-17 09:51:13 +08:00
2025-11-12 13:57:35 +08:00
# To use GPU to accelerate DeepDoc tasks:
2025-10-23 23:02:27 +08:00
# sed -i '1i DEVICE=gpu' .env
# docker compose -f docker-compose.yml up -d
2025-11-12 13:57:35 +08:00
```
> 참고: `v0.22.0` 이전 버전에서는 embedding 모델이 포함된 이미지와 embedding 모델이 포함되지 않은 slim 이미지를 모두 제공했습니다. 자세한 내용은 다음과 같습니다:
2024-08-22 13:33:01 +09:00
2025-12-17 19:27:47 +08:00
| RAGFlow image tag | Image size (GB) | Has embedding models? | Stable? |
|-------------------|-----------------|-----------------------|----------------|
| v0.21.1 | ≈9 | ✔️ | Stable release |
| v0.21.1-slim | ≈2 | ❌ | Stable release |
2024-08-22 13:33:01 +09:00
2025-11-12 13:57:35 +08:00
> `v0.22.0`부터는 slim 에디션만 배포하며 이미지 태그에 **-slim** 접미사를 더 이상 붙이지 않습니다.
2025-10-27 11:31:56 +08:00
2025-03-04 19:21:28 +08:00
1. 서버가 시작된 후 서버 상태를 확인하세요:
2024-08-22 13:33:01 +09:00
```bash
2025-10-23 23:02:27 +08:00
$ docker logs -f docker-ragflow-cpu-1
2024-08-22 13:33:01 +09:00
```
_ 다음 출력 결과로 시스템이 성공적으로 시작되었음을 확인합니다: _
```bash
2025-01-21 00:22:29 -03:00
__ __ ___ ____ __ ____ __ _ _
2024-09-29 16:28:07 +08:00
/ _ _ \ / | / __ __ // __ __ // /____ _ _ _
/ /_/ // /| | / / _ _ / /_ / // _ _ \| | /| / /
2025-01-21 00:22:29 -03:00
/ _ , _ // ___ |/ /_/ // __ / / // /_/ /| |/ |/ /
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
2024-08-22 13:33:01 +09:00
* Running on all addresses (0.0.0.0)
```
2025-01-21 00:22:29 -03:00
2025-12-30 09:39:28 +08:00
> 만약 확인 단계를 건너뛰고 바로 RAGFlow에 로그인하면, RAGFlow가 완전히 초기화되지 않았기 때문에 브라우저에서 `network abnormal` 오류가 발생할 수 있습니다.
2024-08-22 13:33:01 +09:00
2025-03-04 19:21:28 +08:00
2. 웹 브라우저에 서버의 IP 주소를 입력하고 RAGFlow에 로그인하세요.
2024-08-22 13:33:01 +09:00
> 기본 설정을 사용할 경우, `http://IP_OF_YOUR_MACHINE`만 입력하면 됩니다 (포트 번호는 제외). 기본 HTTP 서비스 포트 `80`은 기본 구성으로 사용할 때 생략할 수 있습니다.
2025-03-04 19:21:28 +08:00
3. [service_conf.yaml.template ](./docker/service_conf.yaml.template ) 파일에서 원하는 LLM 팩토리를 `user_default_llm` 에 선택하고, `API_KEY` 필드를 해당 API 키로 업데이트하세요.
2025-01-21 00:22:29 -03:00
2024-08-22 13:33:01 +09:00
> 자세한 내용은 [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup)를 참조하세요.
_ 이제 쇼가 시작됩니다! _
## 🔧 설정
시스템 설정과 관련하여 다음 파일들을 관리해야 합니다:
- [.env ](./docker/.env ): `SVR_HTTP_PORT` , `MYSQL_PASSWORD` , `MINIO_PASSWORD` 와 같은 시스템의 기본 설정을 포함합니다.
2024-12-10 10:19:50 +08:00
- [service_conf.yaml.template ](./docker/service_conf.yaml.template ): 백엔드 서비스를 구성합니다.
2024-08-22 13:33:01 +09:00
- [docker-compose.yml ](./docker/docker-compose.yml ): 시스템은 [docker-compose.yml ](./docker/docker-compose.yml )을 사용하여 시작됩니다.
2024-12-10 10:19:50 +08:00
[.env ](./docker/.env ) 파일의 변경 사항이 [service_conf.yaml.template ](./docker/service_conf.yaml.template ) 파일의 내용과 일치하도록 해야 합니다.
2024-08-22 13:33:01 +09:00
2024-12-10 12:11:39 +08:00
> [./docker/README](./docker/README.md) 파일 ./docker/README은 service_conf.yaml.template 파일에서 ${ENV_VARS}로 사용할 수 있는 환경 설정과 서비스 구성에 대한 자세한 설명을 제공합니다.
2024-08-22 13:33:01 +09:00
기본 HTTP 서비스 포트(80)를 업데이트하려면 [docker-compose.yml ](./docker/docker-compose.yml ) 파일에서 `80:80` 을 `<YOUR_SERVING_PORT>:80` 으로 변경하세요.
> 모든 시스템 구성 업데이트는 적용되기 위해 시스템 재부팅이 필요합니다.
>
> ```bash
2025-02-19 13:19:36 +08:00
> $ docker compose -f docker-compose.yml up -d
2024-08-22 13:33:01 +09:00
> ```
2024-11-19 12:31:20 +08:00
### Elasticsearch 에서 Infinity 로 문서 엔진 전환
2024-11-19 11:31:11 +08:00
RAGFlow 는 기본적으로 Elasticsearch 를 사용하여 전체 텍스트 및 벡터를 저장합니다. [Infinity]로 전환(https://github.com/infiniflow/infinity/), 다음 절차를 따르십시오.
2025-01-21 00:22:29 -03:00
2024-11-19 11:31:11 +08:00
1. 실행 중인 모든 컨테이너를 중지합니다.
```bash
2024-12-10 12:11:39 +08:00
$docker compose-f docker/docker-compose.yml down -v
2024-11-19 11:31:11 +08:00
```
2025-02-19 16:51:33 +08:00
Note: `-v` 는 docker 컨테이너의 볼륨을 삭제하고 기존 데이터를 지우며, 이 작업은 컨테이너를 중지하는 것과 동일합니다.
2024-11-19 11:31:11 +08:00
2. **docker/.env**의 "DOC_ENGINE" 을 "infinity" 로 설정합니다.
3. 컨테이너 부팅:
```bash
2024-12-10 12:11:39 +08:00
$docker compose-f docker/docker-compose.yml up -d
2025-01-21 00:22:29 -03:00
```
> [!WARNING]
> Linux/arm64 시스템에서 Infinity로 전환하는 것은 공식적으로 지원되지 않습니다.
2025-11-12 13:57:35 +08:00
## 🔧 소스 코드로 Docker 이미지를 컴파일합니다
2024-09-29 17:27:15 +08:00
2024-09-29 20:03:25 +08:00
이 Docker 이미지의 크기는 약 1GB이며, 외부 대형 모델과 임베딩 서비스에 의존합니다.
2024-09-29 17:27:15 +08:00
```bash
git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
2025-04-13 23:07:39 -03:00
docker build --platform linux/amd64 -f Dockerfile -t infiniflow/ragflow:nightly .
2025-12-29 17:43:55 +08:00
```
프록시 환경인 경우, 프록시 인수를 전달할 수 있습니다:
```bash
docker build --platform linux/amd64 \
--build-arg http_proxy=http://YOUR_PROXY:PORT \
--build-arg https_proxy=http://YOUR_PROXY:PORT \
-f Dockerfile -t infiniflow/ragflow:nightly .
2024-09-29 17:27:15 +08:00
```
2024-09-29 20:03:25 +08:00
## 🔨 소스 코드로 서비스를 시작합니다.
2024-09-29 17:27:15 +08:00
2025-08-28 09:53:16 +08:00
1. `uv` 와 `pre-commit` 을 설치하거나, 이미 설치된 경우 이 단계를 건너뜁니다:
2025-01-21 00:22:29 -03:00
2024-09-29 17:27:15 +08:00
```bash
2025-04-24 00:25:33 -03:00
pipx install uv pre-commit
2024-09-29 17:27:15 +08:00
```
2024-09-29 20:03:25 +08:00
2. 소스 코드를 클론하고 Python 의존성을 설치합니다:
2025-01-21 00:22:29 -03:00
2024-09-29 17:27:15 +08:00
```bash
git clone https://github.com/infiniflow/ragflow.git
cd ragflow/
2026-05-21 19:09:19 +08:00
uv sync --python 3.13 # install RAGFlow dependent python modules
feat(agent): align Go agent behavior with Python (except retrieval component) (#16225)
## Summary
Aligns the **Go agent runtime/canvas/components/tools** behavior with
the **Python `agent/` implementation** so the same stored canvas DSL
produces the same execution result on either side. Every component,
tool, and runtime primitive in `internal/agent/` is now driven by the
same semantics as its Python counterpart — variable resolution, template
substitution, control flow, error reporting, retry/cancel, and stream
event shapes.
The **retrieval component is the one explicit exception** in this PR. It
is being reworked in a separate change and is excluded from this
alignment pass; the wrapper slot (`universe_a_wrappers.go →
newRetrievalComponent`) is preserved.
## Scope of alignment
### Components (all aligned with `agent/component/`)
`Begin` · `Message` · `LLM` (incl. ChatTemplateKwargs,
MessageHistoryWindowSize, VisualFiles, Cite, OutputStructure,
JSONOutput, TopP, MaxRetries, DelayAfterError, credentials) · `Agent`
(react + tool artifact capture + `Reset()` interface-assert) · `Switch`
(12/12 operators, Python-equivalent semantics) · `Categorize` · `Invoke`
· `Iteration` · `Loop` (macro-expansion through `workflowx.AddLoopNode`)
· `UserFillUp` (Python-equivalent interrupt/resume via eino
`compose.Interrupt`/`ResumeWithData`) · `FillUp` · `DataOperations` ·
`ListOperations` · `StringTransform` · `VariableAggregator` ·
`VariableAssigner` · `Browser` (full stagehand runtime parity) ·
`DocsGenerator` · `ExcelProcessor`.
### Tools (all aligned with `agent/tools/`)
`Retrieval` (wrapper slot only — logic out of scope) · `MCPToolAdapter`
(streamable-HTTP) · `CodeExec` (sandbox bridge with
`code_exec_contract.go` matching Python contract) · `AkShare` · `ArXiv`
· `Crawler` · `DeepL` · `DuckDuckGo` · `Email` · `ExeSQL` · `GitHub` ·
`Google` · `GoogleScholar` · `Jin10` · `PubMed` · `QWeather` · `SearXNG`
· `Tavily` · `Tushare` · `Wencai` · `Wikipedia` · `YahooFinance` —
uniform `eino tool.InvokableTool` interface, SSRF protection, shared
HTTP client.
### Canvas execution engine (`internal/agent/canvas/`)
Aligned with Python's `agent/canvas.py`:
- **Scheduler** (`scheduler.go`): state pre/post handlers, node lambdas,
per-component timeout resolver (4-level: per-class env → per-class table
→ uniform env → 600s fallback), `legacyNoOpNames`.
- **Loop subgraph** (`loop_subgraph.go`): Python-equivalent
`AddLoopNode` macro expansion + condition translation.
- **Multibranch** (`multibranch.go`): `Switch` / `Categorize` routing
via `compose.NewGraphMultiBranch` — same branch selection semantics as
Python.
- **Parallel subgraph** (`parallel_subgraph.go`): matches Python's
parallel fan-out contract.
- **Interrupt/Resume** (`interrupt_resume.go`): `UserFillUpNodeBody` /
`IsInterruptError` / `ExtractInterruptContexts` — replaces the
deprecated Python sentinel chain with eino's native interrupt API,
preserving the same external behavior.
- **Checkpoint** (`checkpoint_store.go`): `RedisCheckPointStore`
Get/Set/Delete, with business metadata (status / canvas_id /
parent_run_id) on a parallel Redis Hash.
- **RunTracker** (`run_tracker.go`): Start / MarkSucceeded / MarkFailed
/ MarkCancelled / AttachCheckpoint — same lifecycle as the Python run
record.
- **Cancel** (`cancel.go`): Redis pub/sub watch.
- **Stream** (`stream.go`): SSE channel with `messages` / `waiting` /
`errors` / `done` events, same shape as Python's `agent.canvas.RunEvent`
payload.
### DSL bridge (`internal/agent/dsl/`)
- `normalize.go`: v1↔v2 collapsed into a single wire format — Python and
Go consume the same stored JSON.
- `reset.go`: per-run state reset matches Python's `Canvas.reset()`
semantics.
- Testdata mirrors Python's `agent_msg.json` / `all.json` / etc.
### Runtime (`internal/agent/runtime/`)
- `CanvasState` / `NewCanvasState` / `GetVar` / `SetVar` / `ReadVars`:
same `{{cpn_id@param}}` resolution model.
- `ResolveTemplate` (regex fast path + gonja fallback) — Python
Jinja-style semantics.
- `selector.go`, `metrics.go`, `component.go`: shared runtime contracts.
## Out of scope (intentionally)
- **`Retrieval` component logic** — wrapped only; full parity lands in a
follow-up PR.
- **Frontend** — only minor dsl-bridge / canvas UX fixes ride along.
- **CLI / admin / model registry** — orthogonal to agent behavior.
## How alignment is verified
`internal/service/agent_run_e2e_test.go` exercises the **full production
chain** against real Python-shaped DSL fixtures:
```
loadCanvasForUser → versionDAO.GetLatest → decodeCanvasFromDSL →
canvas.Compile → cc.Workflow.Invoke → answer extraction
```
using in-memory SQLite + miniredis (no Docker). Covers:
- `TestRunAgent_RealCanvas_BeginMessage` — happy path, `{{sys.query}}`
resolution
- `TestRunAgent_RealCanvas_WaitForUserResume` — two-run resume cycle
(Python-equivalent)
- `TestRunAgent_RealCanvas_CompileFails` — unknown component name →
sanitized error (Python-equivalent)
- `TestRunAgent_RealCanvas_InvokeFails` — unresolvable template ref
(Python-equivalent)
- `TestRunAgent_RunTracker_AttachCheckpoint_CallSequence` —
Start→AttachCheckpoint→MarkSucceeded lifecycle
`internal/handler/agent_test.go` — SSE streaming parity (`Content-Type:
text/event-stream`, `data: {…}\n\n`, trailing `data: [DONE]\n\n`,
OpenAI-compatible non-stream `choices`).
`internal/agent/canvas/fixture_compile_test.go` + per-component tests
pin the Python-equivalent outputs.
```
go test -count=1 -v -run 'TestRunAgent_RealCanvas|TestRunAgent_RunTracker' ./internal/service/
```
## Design reference
`docs/develop/agent-go-port-design.md` (1329 lines, last cross-checked
2026-06-17) — module layout, per-component / per-tool inventory,
corner-case catalogue, and the actionable backlog (Section 14, including
the retrieval alignment follow-up).
---------
Co-authored-by: Claude <noreply@anthropic.com>
2026-06-22 11:58:29 +08:00
uv run python3 ragflow_deps/download_deps.py
2025-04-24 00:25:33 -03:00
pre-commit install
2024-09-29 17:27:15 +08:00
```
2024-09-29 20:03:25 +08:00
3. Docker Compose를 사용하여 의존 서비스(MinIO, Elasticsearch, Redis 및 MySQL)를 시작합니다:
2025-01-21 00:22:29 -03:00
2024-09-29 17:27:15 +08:00
```bash
docker compose -f docker/docker-compose-base.yml up -d
```
2025-01-21 00:22:29 -03:00
`/etc/hosts` 에 다음 줄을 추가하여 **conf/service_conf.yaml ** 에 지정된 모든 호스트를 `127.0.0.1` 로 해결합니다:
2024-09-29 17:27:15 +08:00
```
2025-05-16 11:14:57 +08:00
127.0.0.1 es01 infinity mysql minio redis sandbox-executor-manager
2025-01-21 00:22:29 -03:00
```
2024-09-29 17:27:15 +08:00
2024-09-29 20:03:25 +08:00
4. HuggingFace에 접근할 수 없는 경우, `HF_ENDPOINT` 환경 변수를 설정하여 미러 사이트를 사용하세요:
2025-01-21 00:22:29 -03:00
2024-09-29 17:27:15 +08:00
```bash
export HF_ENDPOINT=https://hf-mirror.com
```
2025-05-14 15:44:24 +08:00
5. 만약 운영 체제에 jemalloc이 없으면 다음 방식으로 설치하세요:
```bash
# ubuntu
sudo apt-get install libjemalloc-dev
# centos
sudo yum install jemalloc
2025-09-03 10:50:39 +08:00
# mac
sudo brew install jemalloc
2025-05-14 15:44:24 +08:00
```
6. 백엔드 서비스를 시작합니다:
2025-01-21 00:22:29 -03:00
2024-09-29 17:27:15 +08:00
```bash
source .venv/bin/activate
export PYTHONPATH=$(pwd)
bash docker/launch_backend_service.sh
```
2025-05-14 15:44:24 +08:00
7. 프론트엔드 의존성을 설치합니다:
2024-09-29 17:27:15 +08:00
```bash
cd web
2024-12-30 18:19:58 +08:00
npm install
2025-01-21 00:22:29 -03:00
```
2025-05-14 15:44:24 +08:00
8. 프론트엔드 서비스를 시작합니다:
2025-01-21 00:22:29 -03:00
2024-09-29 17:27:15 +08:00
```bash
2025-01-21 00:22:29 -03:00
npm run dev
2024-09-29 17:27:15 +08:00
```
2025-01-21 00:22:29 -03:00
_ 다음 인터페이스는 시스템이 성공적으로 시작되었음을 나타냅니다: _
2024-09-29 17:27:15 +08:00

2025-05-14 15:44:24 +08:00
9. 개발이 완료된 후 RAGFlow 프론트엔드 및 백엔드 서비스를 중지합니다.
```bash
pkill -f "ragflow_server.py|task_executor.py"
```
2025-09-04 11:16:42 +08:00
2025-05-14 15:44:24 +08:00
2024-08-22 13:33:01 +09:00
## 📚 문서
- [Quickstart ](https://ragflow.io/docs/dev/ )
2025-03-18 19:49:06 +08:00
- [Configuration ](https://ragflow.io/docs/dev/configurations )
- [Release notes ](https://ragflow.io/docs/dev/release_notes )
2026-03-16 07:53:52 +05:30
- [User guides ](https://ragflow.io/docs/category/user-guides )
- [Developer guides ](https://ragflow.io/docs/category/developer-guides )
2024-08-22 13:33:01 +09:00
- [References ](https://ragflow.io/docs/dev/category/references )
2025-03-18 19:49:06 +08:00
- [FAQs ](https://ragflow.io/docs/dev/faq )
2024-08-22 13:33:01 +09:00
## 📜 로드맵
2025-12-31 12:49:42 +08:00
[RAGFlow 로드맵 2026 ](https://github.com/infiniflow/ragflow/issues/12241 )을 확인하세요.
2024-08-22 13:33:01 +09:00
## 🏄 커뮤니티
2025-04-07 12:18:43 +08:00
- [Discord ](https://discord.gg/NjYzJD3GM3 )
2026-05-09 11:28:44 +08:00
- [X ](https://x.com/infiniflowai )
2024-08-22 13:33:01 +09:00
- [GitHub Discussions ](https://github.com/orgs/infiniflow/discussions )
## 🙌 컨트리뷰션
2025-05-16 16:28:21 +08:00
RAGFlow는 오픈소스 협업을 통해 발전합니다. 이러한 정신을 바탕으로, 우리는 커뮤니티의 다양한 기여를 환영합니다. 참여하고 싶으시다면, 먼저 [가이드라인 ](https://ragflow.io/docs/dev/contributing )을 검토해 주세요.