Documentation Index
Fetch the complete documentation index at: https://docs.zgi.cn/llms.txt
Use this file to discover all available pages before exploring further.
What is an agent?
The agent is the smallest delivery unit of ZGI and is the AI application that users ultimately publish, call and integrate. An agent is composed of workflow + model + knowledge base + prompt words, and provides conversational or workflow-style AI capabilities to the outside world.
Two types of agents
| Type | Description | Typical Scenario |
|---|
| Conversational Agent | Talk directly to users and answer questions based on knowledge base and models | Customer service, Q&A, consultation |
| Workflow Agent | Perform multi-step tasks according to preset workflows | Contract review, report generation, data analysis |
Agent life cycle
Create
Select the agent type and configure basic information: name, icon, description, permission scope (visible only to yourself/visible to the team/visible to the organization). The system automatically generates a unique identifier and initializes the workflow draft.
Arrangement
Drag and drop nodes on the visual canvas to build a business process. Supports multiple node types such as model nodes, knowledge base nodes, database nodes, HTTP nodes, code nodes, conditional branches, loops, iterations, etc.
Debugging
Enter test data in the debugging area, and the system displays the execution status and results of each node in real time through SSE. Drafts are automatically saved every 30 seconds to avoid losing edits.
Publish
Publish it as an accessible web application (agent landing page) with one click, or generate an API Key for external system calls. A version number is automatically generated for each release, which can be traced and rolled back.
Operation and maintenance
View running logs, token consumption, number of calls, exception rate and other running data. Supports configuring API Key’s quota limit, expiration time, and IP whitelist.
Workflow node type
ZGI provides a wealth of built-in nodes to cover most business process orchestration needs:
| Node | Function | Typical usage |
|---|
| Start Node | Define workflow input parameters | Receive user input or API request parameters |
| LLM Node | Call large models for inference | Text generation, analysis, translation, classification |
| Knowledge Base Node | Retrieve information from the knowledge base | Q&A, term query, answer with citation |
| Database Node | Query structured data | Contract ledger, project records, data statistics |
| NL2SQL node | Natural language to SQL | Business personnel do not need to write SQL to query the database |
| Conditional branch | Select execution path based on variable value | Risk level classification, type judgment |
| Code Node | Run Python/JS custom logic | Data processing, format conversion |
| HTTP node | Call external API | Connect with CRM, ERP, OA and other systems |
| Iteration node | Batch processing of array data | Contract review one by one, data processing one by one |
| Loop Node | Repeat execution according to conditions | Retry logic, iterative optimization |
| End Node | Output the final result | Return JSON, text or trigger subsequent actions |
Trigger method
| Trigger method | Description | Typical scenarios |
|---|
| User conversation | Workflow triggered when user sends message | Customer service Q&A, intelligent assistant |
| API calls | Triggered via REST API | System integration, automated processes |
| Scheduled tasks | Regular execution according to Cron expression | Periodic reports, data synchronization |
| File upload | Automatically triggered when user uploads a file | Automatic review of contract upload, automatic document storage |
| Webhook | Receive external system callback triggers | OA approval, CRM events, ERP changes |
Variables and context
Variables are the core mechanism for transferring data between nodes. ZGI supports a three-layer variable system:
| Variable types | Scope | Typical uses |
|---|
| Environment variables | Global | API Key, model configuration and other sensitive information |
| Session variables | Single conversation | Contextual memory, user preferences |
| Node variables | Transfer between nodes | The output of the previous step is used as the input of the next step |
Core Features
-
SSE streaming execution — push the execution status and results of each node in real time, and the front end can display the progress
-
Draft AutoSave — Automatically saves workflow drafts every 30 seconds to prevent lost edits
-
Version Management — Automatically generate a version number for each release, traceable and rollable
-
YAML template — Agent configuration can be exported to YAML for reuse across teams and environments
-
API Key Quota — Generate a dedicated API Key for each agent, supporting daily/monthly quota, expiration time, and IP whitelist
-
Asset prevention from accidental deletion — Checking mechanism prevents accidental deletion of running agents; employees can be handed over with one click when they leave.