RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • StreamSQL
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • StreamSQL
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

  • Extension Components

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

  • Trigger

  • Advanced Topic

  • Agent Framework

  • RuleGo-Server

    • Overview and Quick Start
    • Installation and Deployment
    • Authentication and Authorization
    • REST API Reference
    • MCP Service
    • AI Features
      • Architecture Overview
      • Prerequisites
      • Built-in AI Agents
        • assistant — Rule Chain Assistant
      • Skill Management
        • Built-in Skills
      • Custom AI Agents
        • Creation Steps
        • Tool Configuration
        • Input Parameter Definition
      • Managing Rule Chains via MCP
      • Using AI in the Editor
        • Rule Chain AI Assistant Panel
        • One-Click AI Generation
        • AI Agent Chat
    • Component Marketplace
    • Run Logs
    • Internationalization
    • Extension Development
    • Deploying and Invoking Rule Chains
    • Visual Editor

  • FAQ

  • Endpoint Module

  • Support

  • StreamSQL

目录

AI Features

RuleGo-Server's AI capabilities are built on the "rule chain as Agent" concept. It includes a built-in AI Agent assistant, supports Skill management, and can integrate with AI programming tools like Claude Code and Cursor to enable intelligent rule chain management.

For complete documentation on AI extension components (agent framework architecture, ai/agent node configuration, tool system, aspect framework, session management, LLM/intent recognition/MCP component references), see AI Extension Components.

# Architecture Overview

User/AI Tools
    |
    v
OpenAI Compatible API ----------------------------------
    POST /api/v1/rules/{id}/v1/chat/completions        |
    |                                                    |
    v                                                    |
Rule Chain (ai/agent node)                               |
    |                                                    |
    |-- System Prompt (AGENTS.md)                        |
    |-- LLM Call (Global Config)                         |
    |-- Tool Calls                                       |
         |-- MCP self tools (rule chain management)      |
         |-- skill tools (knowledge/skills)              |
         |-- builtin tools                               |
                                                        |
MCP Endpoint <------------------------------------------
/api/v1/mcp/{apiKey}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

# Prerequisites

Configure LLM connection information in the [global] section of config.conf:

[global]
llm_url = https://api.openai.com/v1
llm_api_key = sk-xxx
llm_model = gpt-4o
1
2
3
4

Supports all LLM services compatible with the OpenAI API (DeepSeek, Qwen, Ollama, etc.).

# Built-in AI Agents

# assistant — Rule Chain Assistant

A multi-turn conversational AI assistant capable of creating, modifying, and deploying rule chains.

Endpoint:

POST /api/v1/rules/assistant/v1/chat/completions
1

Features:

  • Rule chain based on ai/agent node
  • System prompt loaded via ${include()} from data/system/agents/_assistant/AGENTS.md
  • Up to 25 rounds of tool call iterations (maxStep: 25)
  • Supported MCP tools: list_rule_chains, get_rule_chain, preview_rule_chain, save_rule_chain, delete_rule_chain, operate_rule_chain, execute_rule_chain, list_components, get_component_doc, list_node_pool
  • Supported builtin tools: skill (dynamically load skill knowledge)
  • Supports SSE streaming output

Use Cases:

  • Conversational creation/modification of rule chains in the editor's AI assistant panel
  • Automated rule chain management via API calls

Prompt files are stored in data/system/agents/{agentId}/AGENTS.md. Manage prompts and model configuration via API; see REST API Reference.

# Skill Management

Skills are knowledge fragments provided to AI Agents, stored as SKILL.md files, enabling the Agent to understand domain-specific knowledge. They can be managed through the editor or API; see REST API Reference.

Scope: Currently only global (globally shared) is supported.

The skill directory path is controlled by the skill_path configuration option in config.conf.

# Built-in Skills

The system includes a built-in StreamSQL skill (data/system/agents/_assistant/skills/streamsql/SKILL.md), providing complete usage reference for StreamSQL components.

# Custom AI Agents

Any rule chain containing an ai/agent node can serve as an AI Agent and automatically gets an OpenAI-compatible endpoint.

# Creation Steps

  1. Create a new rule chain
  2. Add an ai/agent type node
  3. Configure node parameters:
    • systemPrompt: System prompt
    • url/key/model: LLM connection configuration (can use ${global.xxx} to reference global variables, e.g., ${global.llm_url})
    • maxStep: Maximum tool call rounds
    • tools: Tool list

# Tool Configuration

{
  "tools": [
    {
      "type": "mcp",
      "config": {
        "server": "self",
        "tools": ["list_rule_chains", "get_rule_chain", "save_rule_chain"]
      }
    },
    {
      "type": "builtin",
      "name": "skill",
      "config": {
        "globalDirs": ["${global.skill_path}"],
        "useChinese": true
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  • server: "self": Callback to the built-in MCP service
  • type: "builtin", "name: "skill": Load skill files

# Input Parameter Definition

Define the Agent's input parameter format through additionalInfo.inputSchema:

{
  "additionalInfo": {
    "inputSchema": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "Query content"
        }
      },
      "required": ["query"]
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Once configured, this Agent will also register as a tool in MCP with the corresponding parameter format.

# Managing Rule Chains via MCP

RuleGo-Server includes built-in MCP tools, supporting AI programming tools like Claude Code, Cursor, and Trae to manage rule chains through natural language — create, view, modify, deploy, and execute, all without manually writing JSON.

For client configuration, available tool list, and usage examples, see MCP Service.

# Using AI in the Editor

For an illustrated guide, see AI Assistant Tutorial.

# Rule Chain AI Assistant Panel

After opening a rule chain in the editor, an AI assistant panel appears on the right:

  • Multi-turn conversation with context including the current rule chain
  • AI can directly preview and save modifications to the canvas
  • Quick prompt suggestions
  • Supports message copy and regeneration
  • Chat history is stored locally per rule chain

# One-Click AI Generation

The [AI Generate] button in the toolbar:

  • Enter a requirement description
  • Provides common scenario example prompts (data filtering, IoT, API orchestration, AI Agent, etc.)
  • One-click generate rule chain JSON and load it onto the canvas

# AI Agent Chat

When the rule chain category is AI Agent, the bottom of the editor displays the full Agent chat interface:

  • Supports displaying reasoning process
  • Shows tool calls (read, write, edit, bash, rulechain, mcp, skill) and their status
  • SSE streaming output with progress indicator for each tool

For an illustrated tutorial, see Creating an Agent Tutorial.

Edit this page on GitHub (opens new window)
Last Updated: 2026/05/30, 11:18:53
MCP Service
Component Marketplace

← MCP Service Component Marketplace→

Theme by Vdoing | Copyright © 2023-2026 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式