This page provides a technical overview of the administrative and operational infrastructure of RAGFlow. The system employs a dual-server architecture for administration (Python-based and Go-based), a secure sandbox for code execution, and a comprehensive suite of CLI and migration tools to manage multi-tenant environments and system health.
RAGFlow features a dedicated administrative layer separate from the core RAG services. This layer is implemented as both a Python-based server and a high-performance Go-based service.
The Admin Service manages system-wide entities such as users, tenants, and global settings.
admin/server/, this Flask-based application handles administrative routes like /api/v1/admin/users admin/server/routes.py35-79 It utilizes UserMgr for logic admin/server/services.py40-153 and enforces admin-only access via the @check_admin_auth decorator admin/server/auth.py136-149internal/admin/, providing high-performance endpoints. The Router in internal/admin/router.go defines a comprehensive suite of protected routes for user management, service control, and system variables internal/admin/router.go58-131/healthz and /live endpoints internal/admin/router.go40-42admin@ragflow.io) and a corresponding tenant if none exist admin/server/auth.py88-114The ragflow-cli is a command-line interface that translates SQL-like commands into API requests.
internal/cli/ featuring a recursive descent Parser internal/cli/parser.go27-50 and a Lexer internal/cli/lexer.go25-36 It supports two distinct modes: AdminMode and APIMode internal/cli/cli_http.go26-36admin_login_user internal/cli/admin_parser.go26-60 admin_list_services internal/cli/admin_parser.go154-162 and management of roles, resources, and ingestion tasks internal/cli/admin_command.go120-163admin/client/, it uses a Lark grammar to parse commands.For details, see Admin Service and CLI.
To support the Code component within agent workflows, RAGFlow utilizes a secure sandbox environment. This ensures that user-provided scripts (Python, Node.js) are executed in isolation.
SandboxMgr to handle code execution requests admin/server/services.py28Code component in the agent canvas to process data or perform custom logic safely.For details, see Sandbox Code Executor.
RAGFlow maintains a multi-layered testing suite to ensure system stability across different document engines and model providers.
For details, see Testing Infrastructure.
The system includes utilities for operational maintenance, data integrity, and versioning.
DocumentHandler in the Go backend provides sophisticated methods for batch updating metadata, status changes, and ingestion task removal internal/handler/document.go76-84For details, see Migration and Utility Tools.
This diagram bridges the Go-based CLI interface to the backend management entities.
Sources: internal/cli/parser.go27-50 internal/cli/cli_http.go38-195 internal/admin/router.go36-136 internal/handler/document.go93-106
This diagram maps the administrative probes to the ingestion and storage infrastructure.
Sources: internal/admin/router.go40-42 internal/admin/router.go108-112 internal/cli/admin_command.go53-90 internal/handler/document.go78-82
Sources:
internal/admin/router.go 36-136internal/cli/parser.go 27-251internal/cli/lexer.go 79-232internal/cli/cli_http.go 25-195internal/cli/admin_command.go 29-191internal/cli/admin_parser.go 26-278internal/handler/document.go 48-142admin/server/routes.py 35-214admin/server/services.py 40-179api/utils/health_utils.py 34-186Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.