ANIDIAGRAM / SOURCE-BACKED CASE STUDY   SOURCE-READING DRAFT

From documents to answers.
How do Dify’s three layers work?

Uploading a file does not finish a knowledge index. Online chat does not always go through a task queue. Follow both paths across real service and storage boundaries.

Document ingestionOnline chatShared interfaces

Same architecture and source evidence; presentation only.

Dify architecture in three logical layers. Access: Web console, Nginx and API client. Execution: API service, indexing Worker and Plugin Daemon. Data: file store, Redis, SQL and vector database. Indexing tasks reach the Worker through Redis; basic Chat performs retrieval and model calls inside the API process.
10 nodes · 13 selected relationships · Three logical layers, not three deployed services. Switch between “Document ingestion” and “Online chat” in the interactive viewer. On small screens, open it and zoom in. Arrows show calls or task delivery, not a complete execution sequence.
Static SVG

Indexing is queued. The chat path shown here is not.

Basic CHAT retrieves knowledge, assembles context and calls the model in a new thread inside the API process. A separate Celery Worker extracts, splits and embeds documents, then writes the index.

Pinned source: Dify 1.17.0 · 09a855d
This architecture draft is based on source reading. Verified references do not establish semantic accuracy. Independent semantic review is pending; Dify has not been run and no real model calls were made.

What does this diagram include—and leave out?
Ask another Agent to review this case
Use AniDiagram to analyze langgenius/dify at the pinned commit
09a855dcef24c0edc7431c46c0cfaa494481daf5 (1.17.0).
Trace high_quality paragraph indexing of local text files and basic CHAT
using semantic_search on a selected internal dataset to generate an answer.
Check when documents are committed and indexing tasks are dispatched.
Which process owns the Chat worker thread? What do files, SQL, Redis and
the vector database store? How do embedding cache hits change model calls?
Distinguish modules from deployed services. Do not route all chat through Celery.
Give pinned source references for each key edge. Review semantics before visuals.

Source index and build commands · Fact-check report · Semantic Plan