Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Infiniflow Ragflow Agent Constants

From Leeroopedia
Knowledge Sources
Domains Frontend, Agent_System, Configuration
Last Updated 2026-02-12 06:00 GMT

Overview

Concrete central registry of enums, constants, and configuration values for the agent workflow system in the RAGFlow frontend.

Description

The constants/agent.tsx module defines the Operator enum (listing all agent operator types like Retrieval, Generate, Categorize, Message, etc.), operator display metadata, default operator configurations, and connection validation rules. This is the single source of truth for agent workflow operator definitions on the frontend.

Usage

Import Operator enum and related constants when building agent canvas components, operator configuration forms, or workflow validation logic.

Code Reference

Source Location

Signature

export enum Operator {
  Retrieval = 'Retrieval',
  Generate = 'Generate',
  Categorize = 'Categorize',
  Message = 'Message',
  Answer = 'Answer',
  // ... 20+ operator types
}

export const operatorMap: Record<Operator, OperatorConfig>;

Import

import { Operator, operatorMap } from '@/constants/agent';

I/O Contract

Inputs

Name Type Required Description
Module-level constants; no inputs

Outputs

Name Type Description
Operator enum All agent operator type identifiers
operatorMap Record Operator metadata and default configs

Usage Examples

import { Operator, operatorMap } from '@/constants/agent';

const config = operatorMap[Operator.Retrieval];
console.log(config.label, config.icon);

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment