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
    • Component Marketplace
    • Run Logs
    • Internationalization
    • Extension Development
    • Deploying and Invoking Rule Chains
    • Visual Editor

      • Visual Editor
      • AI Assistant Tutorial
        • Prerequisites
        • Step 1: Create a Blank Rule Chain
        • Step 2: Open the AI Assistant
        • Step 3: Generate Rule Chain via Conversation
        • Step 4: Test the Rule Chain
        • Advanced: Customizing the AI Assistant
          • Settings Entry
          • System Prompt
          • Model Configuration
          • Skill Management
        • Advanced: Extending Tool Capabilities
          • How to Add Tools
          • Available Built-in Tools
          • Configuration Example
          • Tool Configuration Notes
          • Summary of Modification Steps
        • FAQ
          • AI assistant not responding?
          • Generated rule chain doesn't meet expectations?
          • How to use a local model?
      • Debugging Rule Chains
      • Creating an Agent Tutorial
  • FAQ

  • Endpoint Module

  • Support

  • StreamSQL

目录

AI Assistant Tutorial

This tutorial introduces how to use the AI assistant in RuleGo-Editor to quickly create, modify, and deploy rule chains through conversation.

# Prerequisites

  1. RuleGo-Server is running (see Installation and Deployment)
  2. LLM connection information is configured in config.conf:
[global]
llm_url = https://open.bigmodel.cn/api/coding/paas/v4
llm_api_key = your_api_key
llm_model = glm-5.1
1
2
3
4

# Step 1: Create a Blank Rule Chain

Open the editor and click the New button on the toolbar to create a blank rule chain.

Create blank rule chain

# Step 2: Open the AI Assistant

Click the AI assistant icon in the right toolbar to open the AI assistant panel.

Open AI Assistant

# Step 3: Generate Rule Chain via Conversation

In the AI assistant panel, describe your requirements in natural language. The AI will automatically generate a rule chain and render it on the canvas in real time.

For example, enter:

Create a rule chain: receive data, filter records where age is greater than 18, then call a REST API to forward

Chat with AI Assistant

You can also select a node on the canvas and ask the AI directly about that node's usage and purpose:

Ask AI about node usage

About chat history: The conversation history for each rule chain is saved independently (stored in the browser's localStorage). When switching to another rule chain, the corresponding chat history is automatically loaded. Each rule chain retains up to 50 historical messages. When navigating between rule chains, if streaming output is in progress, it will be automatically interrupted.

The rule chain generated by the AI is previewed directly on the canvas. You can:

  • Continue the conversation to modify: Tell the AI what needs to be adjusted, such as "add a log node after the filter node"
  • Manually fine-tune: Drag and edit node properties directly on the canvas
  • Save and deploy: After confirming everything is correct, click the Save button on the toolbar to save and deploy the rule chain

# Step 4: Test the Rule Chain

After the rule chain is deployed, click the Run button on the toolbar, enter test data in the popup dialog, and verify that the rule chain works as expected.

For more debugging tips (debug console, single-node debugging, execution history, etc.), see Debugging Rule Chains.

You can also test directly via API:

curl -X POST http://localhost:9090/api/v1/rules/your_chain_id/execute/msgData \
  -H "Content-Type: application/json" \
  -d '{"name":"张三","age":25}'
1
2
3

# Advanced: Customizing the AI Assistant

# Settings Entry

Click the settings icon in the upper-right corner of the AI assistant panel to open the AI assistant settings page.

Settings entry

# System Prompt

In the System Prompt tab, you can edit the contents of AGENTS.md. The system prompt determines the AI assistant's behavior, available tools, and the style of generated rule chains.

System prompt settings

The prompt file is stored at data/system/agents/_assistant/AGENTS.md and takes effect immediately after modification.

# Model Configuration

In the Model Configuration tab, you can set the LLM model and connection parameters used by the AI assistant.

Model configuration

  • Preset providers: Select a known LLM provider from the dropdown list to auto-fill the API address and available models
  • Custom provider: Manually enter the API address, key, and model name
  • Global variable references: Use expressions like ${global.llm_url}, ${global.llm_api_key} to reference global configuration from config.conf
  • Advanced configuration: Temperature, Top P, max steps, and other parameter adjustments

# Skill Management

Skills are knowledge snippets for the AI assistant, stored as Markdown files. The AI assistant automatically loads relevant skill knowledge when answering questions.

Skill management

Create a skill:

  1. Click New on the skill management page
  2. Fill in the skill name and description
  3. Write the skill content (supports Markdown format)
  4. Save

Upload skill packages:

Supports batch uploading of skills via compressed archives (.zip, .tar.gz). Each skill directory in the archive must contain a SKILL.md file:

skills-archive.zip/
├── skill-a/
│   └── SKILL.md
├── skill-b/
│   └── SKILL.md
└── category/
    └── skill-c/
        └── SKILL.md
1
2
3
4
5
6
7
8

SKILL.md format:

---
name: my-skill
description: 技能简短描述
---

技能正文内容,支持 Markdown 格式。
AI Agent 在需要时会自动加载这些知识。
1
2
3
4
5
6
7

# Advanced: Extending Tool Capabilities

By default, the AI assistant is configured with only two tools: skill (skills) and MCP (rule chain management). If your skills require file reading/writing, code editing, or shell command execution capabilities, you need to manually add the corresponding tools.

# How to Add Tools

Edit the data/system/agents/_assistant/_assistant.json file, add the required tool configurations to the tools array, then restart RuleGo-Server for the changes to take effect.

# Available Built-in Tools

Tool Name Purpose
read Read Read file contents, search keywords, list directories
write Write Create new files, overwrite content
edit Edit Line-level editing, search and replace, insert and delete
bash Command Execute Shell commands

# Configuration Example

The following is a complete example that adds the read, write, edit, and bash tools on top of the default configuration:

{
  "tools": [
    {
      "config": {
        "globalDirs": ["${global.skill_path}"],
        "localDirs": ["${global.data_dir}/system/agents/_assistant/skills"],
        "useChinese": true
      },
      "name": "skill",
      "type": "builtin"
    },
    {
      "config": {
        "workDir": "${global.data_dir}"
      },
      "name": "read",
      "type": "builtin"
    },
    {
      "config": {
        "workDir": "${global.data_dir}"
      },
      "name": "write",
      "type": "builtin"
    },
    {
      "config": {
        "workDir": "${global.data_dir}"
      },
      "name": "edit",
      "type": "builtin"
    },
    {
      "config": {},
      "name": "bash",
      "type": "builtin"
    },
    {
      "config": {
        "server": "self",
        "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"
        ]
      },
      "type": "mcp"
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

# Tool Configuration Notes

workDir configuration for read / write / edit:

  • Sets the working directory for the tool; the agent can only operate on files within this directory
  • Use ${global.data_dir} to reference the RuleGo-Server data directory
  • Can also be set to other absolute paths, such as /home/user/workspace

bash security configuration:

{
  "config": {
    "mode": "deny",
    "deny": ["rm -rf", "format", "del /s"],
    "denyArgs": ["--no-preserve-root"]
  }
}
1
2
3
4
5
6
7
  • mode: deny (blacklist mode, default) or allow (whitelist mode)
  • deny: List of prohibited commands
  • allow: List of allowed commands only (used in whitelist mode)

# Summary of Modification Steps

  1. Stop RuleGo-Server
  2. Edit data/system/agents/_assistant/_assistant.json
  3. Add the required tool configurations to the tools array
  4. Save the file
  5. Restart RuleGo-Server

Tip: After modification, you can test whether the tools are working by chatting with the AI assistant, for example, asking it to "read the file list of the current directory" or "create a test file".

# FAQ

# AI assistant not responding?

  • Check that the LLM configuration in config.conf is correct
  • Verify that the LLM service is accessible (test the API address with curl)
  • Check the error messages in the RuleGo-Server logs

# Generated rule chain doesn't meet expectations?

  • Try describing the requirements in more detail, including data format, processing logic, and output targets
  • Explicitly specify the component types to use in the prompt
  • Use the skill feature to provide domain knowledge to the AI
  • Modify the system prompt: Edit the data/system/agents/_assistant/AGENTS.md file to adjust the AI assistant's behavior, component usage rules, and generation style. Changes take effect immediately without restarting
    • For example: add usage instructions for custom components, adjust default connection types, or supplement design patterns for specific scenarios
    • You can also edit online via Settings (top-right corner) → System Prompt

# How to use a local model?

Fill in the address of a local service such as Ollama in the model configuration:

API 地址:http://localhost:11434/v1
模型:qwen2.5:14b
密钥:ollama(可留空或填任意值)
1
2
3
Edit this page on GitHub (opens new window)
Last Updated: 2026/05/30, 12:00:16
Visual Editor
Debugging Rule Chains

← Visual Editor Debugging Rule Chains→

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

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