Artificial intelligence agent execution method and apparatus, electronic device, and storage medium
By using declarative descriptions and automatic execution sequences in ACTO scripts, the problems of long development cycles and high debugging thresholds for AI Agents are solved. This enables participation from non-technical personnel and simplifies the development of complex applications, thereby reducing system complexity and barriers to entry.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING LINGYAN ZHIYUAN TECHNOLOGY CO LTD
- Filing Date
- 2026-04-29
- Publication Date
- 2026-07-21
AI Technical Summary
In existing technologies, the development of AI agents suffers from long development cycles, high debugging thresholds, and heavy maintenance costs. In particular, for non-technical personnel and complex enterprise-level applications, the capabilities of low-code platforms are insufficient, leading to increased development complexity and making it difficult to achieve a closed loop from business requirements to application implementation.
It adopts domain-specific language scripts (ACTO scripts), which include a main program area, a variable area, a node area, and a pipeline area. It obtains user operations through a visual modeling interface, generates a data pipeline diagram, and automatically converts it into domain-specific language scripts. The system determines the execution order of nodes based on the data flow relationship, realizing declarative description and execution.
It lowers the barrier to entry for AI Agent development, enabling non-professional programmers to participate, avoiding the drawbacks of high-code development and the division of labor and integration issues of low-code platforms relying on high-code tools in complex applications, thus achieving a closed loop from business needs to application implementation.
Smart Images

Figure CN122431660A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to an artificial intelligence agent execution method, apparatus, electronic device and storage medium. Background Technology
[0002] In recent years, with the rapid development of large language model technology, artificial intelligence agents (AI agents), as intelligent agents capable of autonomous perception, decision-making, and action, have become an important research direction in the field of artificial intelligence. A typical AI agent is driven by a large language model (LLM) at its core, combined with planning, memory, and tool usage modules. It can understand user goals, break down tasks, invoke external tools, and autonomously complete complex operations, and is widely used in numerous scenarios such as intelligent customer service, automated office work, code generation, and data analysis.
[0003] Currently, there are two main methods for developing AI agents: I. AI SDK Development Method Based on High-Code Development Tools Developers use high-code development tools combined with AI development tools / frameworks (such as LangChain and SpringAI) to develop AI Agent applications during application system implementation. While this approach offers technical personnel greater flexibility and control, its drawbacks are also significant, especially for non-technical users or those seeking to quickly validate AI Agent ideas. The technical barrier is extremely high—users need to be proficient in programming languages, understand AI frameworks, and master software engineering theory. Implementing an AI Agent application from scratch is a time-consuming and tedious process with low development efficiency. Overall, high-code development suffers from long development cycles, high debugging barriers, and heavy maintenance costs.
[0004] II. Low-code Integrated Development Platform Approach This approach provides an integrated development platform that encapsulates the underlying AI framework and tools into visual components. Developers can combine and configure these components graphically to create AI Agent applications. It encapsulates complex programming logic into pre-defined, functionally clear "nodes" or "components," allowing users to quickly build AI Agent applications without writing extensive code. They can do so simply by connecting these nodes, defining data flow, and execution order.
[0005] However, this approach still has the following technical problems: First, low-code platforms are essentially still "encapsulated" code writing methods, only replacing coding operations with configuration operations. There are still many technical elements involved when using them. They are more user-friendly for technical personnel, but still difficult for non-technical personnel to get started. Their target users are essentially developers. Second, for complex enterprise-level applications, the capabilities of low-code platforms are often insufficient, and high-code development tools are still needed for extension. This brings about the division of labor and integration between low-code and high-code applications, further increasing the complexity of system development and maintenance costs.
[0006] Therefore, existing technologies urgently need an AI Agent development scheme that can balance the flexibility of coding methods with the reduction of the usage threshold, so that non-professional programmers can also directly participate in the AI Agent development process, and realize a closed loop from business needs to application implementation. Summary of the Invention
[0007] This application discloses an artificial intelligence agent execution method, device, electronic device, and storage medium, providing an AI agent programming scheme that balances the flexibility of coding methods with a lower barrier to entry.
[0008] Firstly, this application provides an artificial intelligence agent execution method, including: Obtain a domain-specific language script that describes the execution process of an artificial intelligence agent, the domain-specific language script comprising a main program area, a variable area, a node area, and a pipeline area; The input parameter definitions are extracted from the main program area, the internal variable definitions are extracted from the variable area, the input variable definitions, output variable definitions, calculation methods and calculation configurations of at least one node are extracted from the node area, and the data flow relationships between the nodes are extracted from the pipeline area. Based on the data flow relationship, determine the execution order of each node; Each node is executed in the execution order. When executing any node, at least one of the following is taken as input data: the input parameter value corresponding to the input parameter definition, the internal variable value corresponding to the internal variable definition, and the output variable value of the upstream node, according to the input variable definition of the node. The input data is calculated according to the calculation method and calculation configuration of the node to obtain the calculation result, and the calculation result is taken as the output variable value corresponding to the output variable definition of the node. The execution results are generated based on the output variable values of each node.
[0009] In one possible implementation, obtaining the domain-specific language script used to describe the execution process of the artificial intelligence agent includes: The user's compilation operations are obtained through a visual modeling interface. The compilation operations include at least one of variable definition operations, node generation operations, node connection operations, and node configuration operations. Based on the compilation operation, nodes and edges are generated in the compilation area of the visual modeling interface to form a data pipeline graph; In response to a user's save operation, the data pipeline diagram is converted into a domain-specific language script.
[0010] In one possible implementation, the step of converting the data pipeline diagram into a domain-specific language script in response to a user's save operation includes: The data pipeline graph is submitted to the conversion unit so that the logical relationships between the nodes and edges in the data pipeline graph can be verified by the conversion unit. After the verification is passed, the conversion unit generates the domain-specific language script based on the data pipeline diagram; Store the domain-specific language script to the storage unit.
[0011] In one possible implementation, the method further includes: In response to a user's viewing action, the domain-specific language script is read from the storage unit; The domain-specific language script is submitted to the loading unit so that the loading unit can convert the domain-specific language script into a visual graphic. The visualization is displayed through a visual modeling interface.
[0012] In one possible implementation, the method further includes: In response to a user's test operation on any node, the node is executed, and the execution status and test results of the node are obtained. The execution status and node test results are displayed in the compilation area.
[0013] In one possible implementation, extracting the data flow relationships between the nodes from the pipeline region includes: Extract the directed edge definitions between the nodes from the pipeline region; A directed acyclic graph is constructed based on the definition of all directed edges to obtain the data flow relationship.
[0014] In one possible implementation, generating the execution result based on the output variable values of each node includes: Extract the output parameter definitions from the main program area; The output variable values of each node are organized according to the output parameters to obtain the execution result.
[0015] Secondly, this application provides an artificial intelligence agent execution device, comprising: The acquisition module is used to acquire a domain-specific language script that describes the execution process of the artificial intelligence agent. The domain-specific language script includes a main program area, a variable area, a node area, and a pipeline area. The extraction module is used to extract input parameter definitions from the main program area, extract internal variable definitions from the variable area, extract input variable definitions, output variable definitions, calculation methods and calculation configurations of at least one node from the node area, and extract data flow relationships between the nodes from the pipeline area. The determination module is used to determine the execution order of each node based on the data flow relationship; An execution module is used to execute each of the nodes according to the execution order. When executing any node, according to the node's input variable definition, at least one of the input parameter value corresponding to the input parameter definition, the internal variable value corresponding to the internal variable definition, and the output variable value of the upstream node is used as input data. The input data is calculated according to the node's calculation method and calculation configuration to obtain a calculation result, and the calculation result is used as the output variable value corresponding to the node's output variable definition. The generation module is used to generate execution results based on the output variable values of each node.
[0016] In one possible implementation, the acquisition module is specifically used for: The user's compilation operations are obtained through a visual modeling interface. The compilation operations include at least one of variable definition operations, node generation operations, node connection operations, and node configuration operations. Based on the compilation operation, nodes and edges are generated in the compilation area of the visual modeling interface to form a data pipeline graph; In response to a user's save operation, the data pipeline diagram is converted into a domain-specific language script.
[0017] In one possible implementation, the acquisition module is further configured to: The data pipeline graph is submitted to the conversion unit so that the logical relationships between the nodes and edges in the data pipeline graph can be verified by the conversion unit. After the verification is passed, the conversion unit generates the domain-specific language script based on the data pipeline diagram; Store the domain-specific language script to the storage unit.
[0018] In one possible implementation, the device further includes a loading module for: In response to a user's viewing action, the domain-specific language script is read from the storage unit; The domain-specific language script is submitted to the loading unit so that the loading unit can convert the domain-specific language script into a visual graphic. The visualization is displayed through a visual modeling interface.
[0019] In one possible implementation, the device further includes a testing module for: In response to a user's test operation on any node, the node is executed, and the execution status and test results of the node are obtained. The execution status and node test results are displayed in the compilation area.
[0020] In one possible implementation, the extraction module is specifically used for: Extract the directed edge definitions between the nodes from the pipeline region; A directed acyclic graph is constructed based on the definition of all directed edges to obtain the data flow relationship.
[0021] In one possible implementation, the generation module is specifically used for: Extract the output parameter definitions from the main program area; The output variable values of each node are organized according to the output parameters to obtain the execution result.
[0022] Thirdly, this application provides an electronic device, including: a processor and a memory, wherein the processor is configured to execute an artificial intelligence agent execution program stored in the memory to implement the artificial intelligence agent execution method described in any one of the first aspects.
[0023] Fourthly, this application provides a storage medium storing one or more programs that can be executed by one or more processors to implement the artificial intelligence agent execution method described in any of the first aspects.
[0024] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application, by obtaining a domain-specific language script containing a main program area, a variable area, a node area, and a pipeline area, realizes a declarative description of the execution process of an artificial intelligence agent. This script declares input parameters, internal variables, the definitions of input variables and output variables for each node, the calculation method and calculation configuration, and the data flow relationship between nodes, without requiring the writing of underlying code. Based on this, the system automatically determines the execution order of each node according to the data flow relationship extracted from the pipeline area, and executes each node sequentially according to this execution order. When executing any node, based on the node's input variable definition, it automatically obtains input data from at least one of the input parameter values, internal variable values, or output variable values of the upstream node, calculates the input data according to the node's calculation method and calculation configuration, obtains the calculation result, and uses the calculation result as the output variable value corresponding to the node's output variable definition. Finally, the system generates the execution result based on the output variable values of each node.
[0025] Therefore, the method in this application separates AI Agent development from application development, embedding it as a component into application development tools (whether high-code or low-code). This provides an AI Agent development method that balances flexibility in coding methods while lowering the barrier to entry, allowing non-technical programmers to directly participate in the AI Agent development process, leveraging their business expertise to achieve a closed loop from business requirements to application implementation. This overcomes the limitations of high-code... AI SDK The development methods of traditional methods, which suffer from long development cycles, high debugging barriers, and heavy maintenance costs, enable non-technical personnel without programming skills to directly participate in the development of AI agents, eliminating the losses and communication barriers in translating business requirements into development needs. This also avoids the problem of division of labor and integration between the two development tools, which arises from the insufficient capabilities of low-code platforms in complex enterprise applications, necessitating the use of high-code tools. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0027] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0029] Figure 1 A flowchart illustrating an embodiment of an artificial intelligence agent execution method provided in this application; Figure 2 This is a schematic diagram of the composition structure of an artificial intelligence agent provided in an embodiment of this application; Figure 3 A schematic diagram of a four-section structure of an ACTO script provided in this application embodiment; Figure 4 A flowchart illustrating an embodiment of another artificial intelligence agent execution method provided in this application; Figure 5 An architecture diagram of a visualization modeling tool provided in this application embodiment; Figure 6 A schematic diagram of a visual modeling interface provided for an embodiment of this application; Figure 7 A flowchart illustrating another embodiment of an artificial intelligence agent execution method provided in this application; Figure 8 A flowchart illustrating another embodiment of the artificial intelligence agent execution method provided in this application; Figure 9 A schematic diagram illustrating the creation of an intelligent agent for generating an annual audit plan, as provided in this application embodiment; Figure 10 A block diagram illustrating an embodiment of an artificial intelligence agent execution device provided in this application; Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] The following disclosure provides numerous different embodiments or examples for implementing various structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. These are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples. Such repetition is for simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or arrangements discussed.
[0032] To provide an AI agent development scheme that balances flexibility in coding methods with a lower barrier to entry, this application offers an AI agent execution method. This method overcomes the drawbacks of high-code development, such as long development cycles, high debugging barriers, and heavy maintenance costs. It enables non-technical personnel without programming skills to directly participate in the development of AI agents. At the same time, through a standardized script structure and parsing execution mechanism, it avoids the division of labor and integration problems caused by the reliance on high-code tools for extension in complex enterprise applications, thus reducing the barrier to entry and system complexity.
[0033] Figure 1 This is a flowchart illustrating an embodiment of an artificial intelligence agent execution method provided in this application. Figure 1 As shown, the method includes the following steps: Step 101: Obtain a domain-specific language script that describes the execution process of the artificial intelligence agent. The domain-specific language script includes a main program area, a variable area, a node area, and a pipeline area.
[0034] Domain-specific language scripts: These are specialized programming language scripts designed for the specific domain of an AI agent. Their syntax and semantics are specifically designed to describe the execution process of the AI agent, and are called ACTO languages or ACTO scripts.
[0035] like Figure 2As shown, AI agents are typically driven by an LLM (Large Language Model), combined with a planning module, a memory module, and a tool use module. This enables them to understand user goals, break down tasks, invoke external tools, and autonomously complete complex operations. The large language model acts as the agent's "brain," responsible for logical reasoning and task planning. The planning module includes task decomposition and self-reflection functions, used to break down complex tasks into multiple sub-tasks and adjust for execution failures. The memory module includes short-term and long-term memory; short-term memory maintains the coherence of the dialogue context, while long-term memory stores massive amounts of knowledge through a vector database. The tool use module translates decisions into concrete actions by calling API interfaces or plugins. The domain-specific language script (ACTO script) described in this application is a declarative language used to describe the execution process of the aforementioned AI agent. Through an organizational structure of a main program area, variable area, node area, and pipeline area, it formally describes the AI agent's perception, planning, memory, and action capabilities in a data pipeline manner.
[0036] Main program area: This refers to a section in the domain-specific language script used to define the basic information of the AI Agent, including name, input parameter definition, output parameter definition, number, and description information.
[0037] Variable area: This refers to a section in the domain-specific language script used to define the internal variables of the AI Agent, as well as the variables corresponding to the main program's input and output parameter definitions. Variable types are divided into basic variables and object variables. Basic variables include characters (String), integers (Int), decimals (Float), booleans (Boolean), and dates (Date). Object variables include tables (Table), models (Model), JSON, intermediate variables (RObject), etc.
[0038] Node area: refers to a section in the domain-specific language script used to define the computational logic of each node or step within the AI Agent. Each node can be called by the main process, and multiple nodes can be compiled according to computational needs.
[0039] Pipeline area: refers to a section in the domain-specific language script used to define the execution process of the AI Agent. This section connects the nodes in a data pipeline manner to form a DAG (Directed Acyclic Graph). The pipeline is composed of edges, which represent the data flow relationship between the nodes.
[0040] In this embodiment of the application, step 101 obtains a domain-specific language script (i.e., an ACTO script) used to describe the execution process of the artificial intelligence agent, such as... Figure 3 As shown, the script comprises four parts: the main program area, the variable area, the node area, and the pipeline area. For example, after a user completes the creation of the AI Agent using a visual modeling tool and clicks "save," the system converts the user-created data pipeline diagram into an ACTO script, thus obtaining the script; alternatively, if the user directly writes the ACTO script using a text editor, the system obtains the script by reading a file. After obtaining the script, the system loads it into memory for subsequent steps to parse.
[0041] Step 102: Extract input parameter definitions from the main program area, extract internal variable definitions from the variable area, extract input variable definitions, output variable definitions, calculation methods and calculation configurations of at least one node from the node area, and extract data flow relationships between the nodes from the pipeline area.
[0042] Input parameter definition: This refers to the definition information of the external input parameters that the AI Agent declared in the main program area needs to receive at runtime, including the parameter name, data type, whether it is required, and default value.
[0043] Internal variable definition: refers to the definition information of variables declared in the variable area for use internally by the AI Agent, including the variable name, data type and initial value.
[0044] Input variable definition: refers to the definition information of the input data required by each node in the node area, including the name and data type of the input variable, indicating what kind of data the node needs to receive in order to perform calculations.
[0045] Output variable definition: refers to the definition information of the output data of the calculation result declared by each node in the node area, including the name and data type of the output variable, indicating what kind of data the node will produce after calculation.
[0046] Calculation method: refers to the core algorithm or operation type that each node in the node area is specified to execute, called operator, such as data extraction, data association, large model calling, vector retrieval, etc. This calculation method can be extended to meet the needs of AI Agent development in various complex scenarios.
[0047] Calculation configuration: refers to the set of key-value pairs configured for each node in the node area to specify the behavior parameters of the calculation method. For example, for a large model calling node, the configuration content may include model name, temperature parameters, number of returns, etc.
[0048] Data flow relationship: refers to the data flow direction and dependency relationship between nodes in the pipeline area defined by directed edges. Each edge represents the data flow path from the output of one node to the input of another node.
[0049] In this embodiment, step 102 extracts the aforementioned definition information from the domain-specific language script obtained in step 101. Specifically, the system parses the syntax structure of the ACTO script, reads the input parameter definitions and output parameter definitions from the main program area, reads the internal variable definitions from the variable area, traverses each node in the node area and reads its input variable definitions, output variable definitions, calculation methods, and calculation configurations, and reads the data flow relationships between nodes formed by directed edges from the pipeline area. Through this extraction process, the system transforms the declarative script content into structured data objects in memory, providing necessary information support for subsequently determining the execution order and execution nodes.
[0050] Step 103: Determine the execution order of each node based on the data flow relationship.
[0051] Execution order: This refers to the order in which nodes are executed according to their data dependencies, i.e., the order in which the nodes in the node area are arranged during execution. This execution order is not manually specified by the user, but is automatically driven by the data flow relationships between nodes.
[0052] In this embodiment, step 103 determines the execution order of each node based on the data flow relationship extracted from the pipeline area in step 102. Specifically, since the nodes defined in the pipeline area are connected by directed edges to form a DAG (Directed Acyclic Graph), this step adopts a data-driven approach, determining the execution order of nodes by analyzing the topology of the DAG: whether a node can be executed depends entirely on whether its required input data is ready—nodes without upstream dependencies (i.e., nodes without incoming edges) do not depend on the output of other nodes and only need to wait for external input parameters or internal variables to be ready before execution; when all upstream nodes of a node have completed execution and produced the output variable values required by the node, the input data of the node is ready, and the node is triggered to execute. In other words, the execution order of nodes is automatically driven by the flow state of data in the pipeline, rather than a pre-fixed order.
[0053] For example, in a pipeline containing "data extraction node → data preprocessing node → large model generation node", the data extraction node has no upstream node and does not depend on the output of other nodes. It only needs to wait for external input parameters or internal variables to be ready before it can execute. In this example, its input data (the raw data passed in from the outside) is ready, so it executes. After the data extraction node completes its execution, it generates the output variable values required by the preprocessing node, and the input data for the data preprocessing node becomes ready, thus automatically triggering the execution of the data preprocessing node. Similarly, after the data preprocessing node completes its execution, the input data for the large model generation node becomes ready, automatically triggering the execution of the large model generation node. This step determines the execution order through a data-driven approach, ensuring that nodes are automatically triggered to execute according to the data flow order, without requiring users to manually arrange the execution order, and also avoiding the situation where upstream data is not yet ready when downstream nodes are executing.
[0054] Step 104: Execute each node according to the execution order. When executing any node, according to the node's input variable definition, at least one of the input parameter value corresponding to the input parameter definition, the internal variable value corresponding to the internal variable definition, and the output variable value of the upstream node is used as input data. The input data is calculated according to the node's calculation method and calculation configuration to obtain a calculation result, and the calculation result is used as the output variable value corresponding to the node's output variable definition.
[0055] Input parameter value: refers to the actual value corresponding to the input parameter defined in the main program area, which is passed in from the outside by the user when calling AIAgent.
[0056] Internal variable values: These refer to the actual values corresponding to the internal variables defined in the variable area, which are read and used by nodes during the execution of the AI Agent.
[0057] The output variable value of the upstream node refers to the actual value of the output variable generated after the execution of the predecessor node that the current node depends on.
[0058] Input data: refers to the source of data consumed by the node during execution, which can be one or more of the following: input parameter values, internal variable values, or output variable values from upstream nodes.
[0059] Calculation result: refers to the calculation result obtained by the node after processing the input data according to its calculation method and calculation configuration.
[0060] Output variable value: refers to the actual value corresponding to the definition of the node's output variable, that is, the value after the calculation result is assigned to the output variable.
[0061] In this embodiment, step 104 executes each node sequentially according to the execution order determined in step 103. When executing any node, firstly, based on the input variable definition of that node, it is determined which input data that node needs and the data source declaration corresponding to each input data. The data source declaration specifies whether the input data is obtained from externally passed input parameter values, from internal variable values defined in the variable area, or from the output variable values of an upstream node. Then, based on the data source declaration, the actual values are obtained from the corresponding sources to obtain the input data. After obtaining the input data, the input data is processed according to the calculation method and calculation configuration specified by that node to obtain the calculation result. The calculation result is then stored as the output variable value corresponding to the output variable definition of that node for reference by downstream nodes.
[0062] For example, for a "large model generation node", if the input variable definition declares that the data source of the input data "query text" is the output variable value of the "generation result" of an upstream node, then the system obtains the query text content from the output variable value of that upstream node; if the calculation method is "llm_generate", and the calculation configuration is model name "GPT-4" and temperature parameter "0.7", then the system calls the large model interface, takes the query text as input, generates the response content as the calculation result, and assigns the calculation result to the output variable "generation result".
[0063] Step 105: Generate the execution result based on the output variable values of each node.
[0064] Execution result: refers to the final output data generated by the AI Agent after all nodes have been executed, based on the output variable values of each node.
[0065] In this embodiment, step 105 generates the execution result of the entire AI Agent based on the output variable values generated after the execution of each node in step 104. Specifically, the system extracts the output parameter definition from the main program area. This output parameter definition specifies which data the AI Agent ultimately needs to output and in what format it should be organized. Then, based on the output parameter definition, the system filters and organizes the required data from the output variable values of each node to form an execution result that conforms to the format defined by the output parameter definition, and returns the execution result to the caller. For example, if the output parameter in the main program area is defined as "final answer," the system searches for the node output variable value that generates the final answer in the node area and returns it as the execution result. At this point, the entire execution process of the AI Agent is complete.
[0066] The technical solution provided in this application, by acquiring a domain-specific language script containing a main program area, a variable area, a node area, and a pipeline area, achieves a declarative description of the execution process of an artificial intelligence agent. This script declares input parameters, internal variables, the definitions of input variables and output variables for each node, the calculation methods and configurations, and the data flow relationships between nodes, without requiring the writing of underlying code. Based on this, the system automatically determines the execution order of each node according to the data flow relationships extracted from the pipeline area, and executes each node sequentially according to this order. When executing any node, based on the node's input variable definition, it automatically obtains input data from at least one of the input parameter values, internal variable values, or output variable values from upstream nodes. It then calculates the input data according to the node's calculation method and configuration to obtain a calculation result, which is used as the output variable value corresponding to the node's output variable definition. Finally, the system generates the execution result based on the output variable values of each node. Therefore, this application overcomes the shortcomings of high-code development methods, such as long development cycles, high debugging thresholds, and heavy maintenance costs, enabling non-technical personnel without programming skills to directly participate in the development of artificial intelligence agents. At the same time, through standardized script structures and parsing and execution mechanisms, it avoids the division of labor and integration problems caused by the need for low-code platforms to rely on high-code tools for extension in complex enterprise applications, thereby reducing the usage threshold and system complexity.
[0067] Figure 4 A flowchart illustrating another embodiment of an artificial intelligence agent execution method provided in this application. Figure 4 The process shown is in Figure 1 Based on the illustrated process, the following steps are included: Step 401: Obtain the user's compilation operations through the visual modeling interface. The compilation operations include at least one of variable definition operations, node generation operations, node connection operations, and node configuration operations.
[0068] Visual modeling interface: This refers to a modeling interface that interacts with the user in a graphical way. Users can create AI agents through drag-and-drop, clicking, and other operations without writing code. Figure 6 As shown, the interface includes nodes and a variable area (corresponding to...). Figure 5 The variable setting area, node selection area, compilation area, and node configuration area are all included.
[0069] Compilation operations: refer to a series of interactive actions performed by users on the visual modeling interface to build an AI Agent, including at least one of variable definition operations, node generation operations, node connection operations, and node configuration operations.
[0070] Variable definition operations: These refer to the operations performed by users to maintain the Agent's input variables in the node and variable areas, such as... Figure 6 The left-hand nodes and variable definitions in the variable area, such as "Input" and "Knowledge Base," are used to define the variable content in the variable area of the ACTO script.
[0071] Node generation operation: refers to the user retrieving the types of operations supported by the platform (such as...) from the node and variable area. Figure 6 The operation of dragging the node operators (such as "Search", "Reordering", "Post-processing" etc.) displayed in the middle to the compilation area to generate a new node.
[0072] Node connection operation: This refers to the operation where users connect existing nodes in the compilation area to define the data flow relationship between nodes, such as... Figure 6 The connecting lines between nodes in the compilation area are shown.
[0073] Node configuration operations: These refer to the user's operations in the node configuration area to set configuration items for each node, such as... Figure 6 The configuration content displayed in the node configuration area on the right, such as "Model Number", "Parameter Name", and "Reference Field", allows users to set the input variable reference relationship of the node (e.g., "answer_T1" references "T1.answer"). This is used to define the input variable definition, output variable definition, calculation method, and calculation configuration of the node in the ACTO script.
[0074] In this embodiment of the application, step 401 is performed as follows: Figure 6 The visual modeling interface shown captures the user's editing operations. Specifically, as... Figure 5 and Figure 6 As shown, the visualization modeling tool includes a presentation unit (R1), which provides an interactive modeling interface. This interface includes a variable setting area, a node selection area, a compilation area, and a node configuration area. Users perform variable definition operations in the variable setting area, defining the Agent's input variables (such as...). Figure 6 The left-hand node and variable area includes "Input," "Knowledge Base," etc.; users perform node generation operations from the node selection area, dragging the required operation type (such as "Retrieve," "Reorder," "Post-processing," etc.) to the compilation area to generate node instances; users perform node connection operations in the compilation area, defining the dependencies and data flow between nodes through connections (e.g., ... Figure 6 (The connecting lines between nodes in the configuration area are shown). Users perform node configuration operations in the node configuration area, setting the configuration items for each node, such as... Figure 6 In the node configuration area on the right, users can set the input variable reference relationships of nodes (such as "answer_T1" referencing "T1.answer") and output templates. The system listens for the user's above-mentioned compilation operation events to obtain and record the user's compilation intent and configuration information.
[0075] Step 402: Generate nodes and edges in the compilation area of the visualization modeling interface according to the compilation operation to form a data pipeline diagram.
[0076] Compilation area: refers to, for example Figure 6 The area shown in the visual modeling interface is used to compile the dependencies between nodes and construct the AIAgent processing logic. In this area, users can form data pipelines by dragging and dropping nodes and drawing lines.
[0077] Node: A node is a visual graphical element in the compilation area that represents a computational unit. It corresponds to a node definition in the node area of the ACTO script. Each node has input and output ports for connecting to other nodes, such as... Figure 6 The nodes "Search", "Rearrange", and "Post-processing" are displayed graphically in the compilation area.
[0078] Edge: Refers to the graphical element connecting two nodes in the compilation area, representing the data flow relationship between the nodes. It corresponds to a directed edge definition in the pipeline area of the ACTO script, such as... Figure 6 The lines connecting the nodes in the compilation area are shown.
[0079] Data pipeline diagram: A visual graph composed of nodes and edges in the compilation area, representing the processing logic and data flow of the AI Agent. This graph is a directed acyclic graph.
[0080] In this embodiment of the application, step 402, based on the compilation operation obtained in step 401, in such a way... Figure 6 The visualization modeling interface shown generates nodes and edges in the compilation area, forming a data pipeline graph. Specifically, when a user drags an operator (such as "retrieve") from the node selection area to the compilation area, the system creates a visual node element at the corresponding position in the compilation area, such as... Figure 6 The graphical representations of nodes such as "Search," "Reorder," and "Post-processing" displayed in the compilation area each contain input and output ports and carry the node's initial configuration information. When a user drags a connection from the output port of one node to the input port of another node, the system generates a directed edge connecting the two nodes in the compilation area, such as... Figure 6 The lines connecting the nodes in the compilation area illustrate this, with the direction of each edge indicating the data flow from the source node to the target node. As users continuously add nodes and draw connections, a complete data pipeline graph consisting of nodes and directed edges gradually forms in the compilation area, as shown below. Figure 6 As shown, the nodes in the compilation area include "tool call" and "output template", which are connected by directed edges to form a complete data processing flow. This graph is a directed acyclic graph structure, which intuitively shows the processing logic and data flow of the AI Agent.
[0081] Step 403: In response to the user's save operation, convert the data pipeline diagram into the domain-specific language script.
[0082] Save operation: refers to the persistent storage command triggered by the user clicking the save button on the interface or by other means after completing the data pipeline diagram.
[0083] Conversion unit: refers to, for example Figure 5 The conversion module in the service unit (R2) shown is responsible for converting the front-end data pipeline diagram into a standard ACTO script and performing validation during the conversion process.
[0084] In this embodiment, step 403, in response to the user's save operation, converts the data pipeline diagram formed in step 402 into a domain-specific language script. Specifically, when the user clicks the "Save" button on the interface, the front end submits the data pipeline diagram in the current compilation area to the service unit, which then converts the visualized data pipeline diagram into a standard domain-specific language script and persistently stores it in the storage unit (R3), such as... Figure 5 The flow of the "ACTO script" to the "storage unit" is shown in the diagram.
[0085] The above Figure 4 The process shown is as follows, through... Figure 5 and Figure 6 The visual modeling interface shown acquires the user's compilation operations, generates nodes and edges in the compilation area to form a data pipeline diagram based on the compilation operations, and automatically converts the data pipeline diagram into an ACTO script through the conversion module when saving. This allows users to complete the compilation of AI Agents without writing any code, simply by using graphical operations such as "drag, drop, and drag". The system background automatically converts the visual data pipeline diagram into a structured ACTO script for storage, thereby greatly reducing the threshold for AI Agent compilation and making it easy for non-technical personnel to get started, while ensuring the standardization and portability of the script.
[0086] Specifically, step 403 may include the following steps: submitting the data pipeline graph to the conversion unit to verify the logical relationships between nodes and edges in the data pipeline graph; after the verification is passed, generating the domain-specific language script based on the data pipeline graph through the conversion unit; and storing the domain-specific language script in the storage unit.
[0087] Verification: This refers to the process by which the transformation unit checks the logical relationships between nodes and edges in the data pipeline graph. This includes checking whether there are cycles in the directed acyclic graph, whether the configuration items of the nodes are complete, and whether the variable types match.
[0088] Logical relationships: refer to the dependencies and data flow relationships formed between nodes in a data pipeline graph through directed edges, which are represented by the topological structure of a DAG.
[0089] Storage unit: refers to, for example Figure 5 The R3 storage unit shown is used to persistently store the ACTO script of the Agent.
[0090] In this embodiment, step 403 specifically includes the following sub-steps: First, the data pipeline graph formed in step 402 is submitted to the conversion unit. The conversion unit verifies the logical relationships between nodes and edges in the data pipeline graph. Specifically, this includes checking whether there are loops (i.e., circular dependencies) in the directed acyclic graph, whether the configuration items of each node are complete (e.g., whether the calculation method is specified and whether the necessary calculation configuration is filled in), and whether the variable types connecting the nodes match (e.g., whether the output variable type of the upstream node is compatible with the input variable type of the downstream node). After the verification is passed, the conversion unit generates a domain-specific language script based on the data pipeline graph. Specifically, the conversion unit traverses each node and each edge in the data pipeline graph, and according to the preset mapping rules, converts each node into a node definition in the node area of the ACTO script (including input variable definition, output variable definition, calculation method, and calculation configuration), converts each edge into a directed edge definition in the pipeline area, generates variable definitions in the variable area according to the content of the variable setting area, and generates the definition of the main program area according to the basic information of the Agent. Finally, a complete domain-specific language script conforming to the ACTO syntax specification is generated. Finally, the generated domain-specific language script is stored in the storage unit to complete the persistent storage of the AI Agent.
[0091] This solution ensures the logical correctness and executability of user-developed AI Agents by logically validating the data pipeline diagram, avoiding execution errors caused by loops, missing configurations, or type mismatches. The transformation unit automatically converts the visual data pipeline diagram into a structured ACTO script, achieving seamless integration between visual creation and script storage, guaranteeing the portability and reusability of the AI Agent. Finally, persistent storage through the storage unit allows the AI Agent to be loaded, edited, and executed at any time.
[0092] In one embodiment, the method may further include the following steps: in response to a user's viewing operation, reading the domain-specific language script from the storage unit; submitting the domain-specific language script to the loading unit to convert the domain-specific language script into a visual graphic through the loading unit; and displaying the visual graphic through a visual modeling interface.
[0093] View operation: refers to the user triggering the command to edit or view the saved Agent on the visual modeling interface, or selecting a saved Agent from the Agent list to open the Agent.
[0094] Loading unit: refers to, for example Figure 5 The loading module in the service unit (R2) shown is responsible for reading the ACTO script from the storage unit and converting the ACTO script into a visual graphic format that the front end can display.
[0095] Visual graphics: refers to the graphical representation generated after conversion by the loading unit and displayed in the compilation area of the visual modeling interface, including node graphics, edges (connection lines) between nodes, node configuration information, etc., which have the same graphical representation as the data pipeline diagram formed in step 402.
[0096] In this embodiment of the application, in response to a user's viewing operation, the saved domain-specific language script is read from the storage unit and restored as a visual graphic for display. Specifically, combined with Figure 5 As shown, when a user needs to edit or view a saved Agent (e.g., by clicking...), Figure 5 The front-end sends a viewing request to the service unit (represented by the "Read" button in section 3). The loading module in the service unit responds to this request by reading the ACTO script of the specified Agent from the storage unit (R3). The loading module parses the ACTO script, converting the definitions of the main program area, variable area, node area, and pipeline area into graphical elements that the front-end can display: each node definition in the node area is converted into a node graphic in the compilation area (including the node's name, input port, and output port); each directed edge definition in the pipeline area is converted into a connecting line between node graphics; the variable definitions in the variable area are converted into nodes and a list of variables in the variable area; and the basic Agent information in the main program area is converted into attribute information on the interface. The loading module pushes the converted and generated visual graphical data to the front-end display unit. The front-end display unit displays this visual graphic in the compilation area of the visual modeling interface, allowing the user to see the previously compiled data pipeline diagram and continue editing or executing the Agent, such as... Figure 5 The flow from the "loading module" to the "presentation unit" and Figure 6 The visual modeling interface shown.
[0097] This solution, in response to user viewing operations, reads the ACTO script from the storage unit and converts it into a visual graphic for display by the loading unit. This enables the graphical restoration and visual editing of saved AI Agents, allowing users to view, modify, and reuse previously compiled AI Agents at any time. This avoids repetitive compilation work, improves the efficiency of AI Agent compilation and user experience, and also demonstrates the advantage of ACTO scripts as a portable description language—the same script can be loaded and restored into the same visual graphic at different times and on different devices.
[0098] In another embodiment, the method may further include the following steps: in response to a user's test operation on any node, executing the node to obtain the execution status and node test results corresponding to the node; and displaying the execution status and node test results through the compilation area.
[0099] Test operation: refers to the individual execution command triggered by the user on any node in the compilation area of the visual modeling interface, such as clicking the "Execute" button on the node graphic or the "Test" option in the right-click menu, used to verify the calculation logic and output results of the node separately without executing the entire AIAgent.
[0100] Execution status: refers to the status information of a node during execution, including but not limited to status indicators such as "Executing", "Execution successful", "Execution failed", and "Waiting for input", which are used to provide feedback to the user on the node's running status.
[0101] Node test results: refers to the output data generated after the node finishes execution, including the calculation results (i.e., output variable values) obtained by the node after calculating the input data according to its calculation method and calculation configuration, as well as possible intermediate data, log information or error information, etc.
[0102] In this embodiment of the application, in response to a user's test operation on any node, the node is executed, the corresponding execution status and node test results are obtained, and displayed through the compilation area. Specifically, in conjunction with Figure 5 and Figure 6 As shown, the user selects a node (e.g., ...) in the compilation area. Figure 6When a test operation is performed on a node (e.g., clicking the "Execute" button on the node), the front-end submits the node's identification information and its input data to the execution module of the service unit (R2). The execution module, based on the node's input variable definition, obtains input data from externally passed input parameter values, internal variable values defined in the variable area, or output variable values from upstream nodes. It then processes the input data according to the calculation method and configuration specified by the node to obtain the calculation result. During node execution, the execution module records the node's execution status in real time (e.g., "Executing"). After execution, it updates the execution status to "Execution Successful" or "Execution Failed" and returns the calculation result as the node's test result to the front-end. The front-end display unit shows the node's execution status and test result in the compilation area, for example, displaying status icons on the node graph (e.g., a green checkmark for success and a red cross for failure), and displays detailed node test results (including output variable values, log information, etc.) through pop-ups, sidebars, or the result observation panel in the node configuration area. Users can use this testing function to quickly verify the correctness of each node without running the entire AI Agent, facilitating debugging and optimization.
[0103] This solution enables independent debugging and verification of each node in the AI Agent by responding to user test operations on any node, executing that node individually, and obtaining its execution status and test results. Users can quickly locate problematic nodes and check the correctness of node inputs and outputs and the consistency of computational logic without running the entire AI Agent. This significantly lowers the debugging threshold for AI Agents, improves development efficiency and user experience. Especially for non-technical users, the intuitive status display and result observation allow for easy debugging and optimization of the AI Agent.
[0104] Figure 7 A flowchart illustrating another embodiment of an artificial intelligence agent execution method provided in this application. Figure 7 The process shown is in Figure 1 Based on the illustrated process, the following steps are included: Step 701: Extract the directed edge definitions between the nodes from the pipeline region; Step 702: Construct a directed acyclic graph based on the definition of all directed edges to obtain the data flow relationship.
[0105] For ease of understanding, steps 601-602 are explained uniformly below: Directed edge definition: refers to structured data in the pipeline area that defines the data flow relationship between nodes. Each directed edge contains a source node identifier (from) and a target node identifier (to), indicating that data flows from the output variable of the source node to the input variable of the target node. The direction of the directed edge reflects the dependency relationship between nodes, that is, the target node depends on the output data of the source node.
[0106] Directed Acyclic Graph (DAG): A graph structure consisting of several nodes and directed edges, where the edges are directional (from the source node to the target node), and there are no cycles in the graph (i.e., it is impossible to start from a node and return to the node itself along the direction of the edge). This graph structure guarantees that there is a feasible topological execution order between the nodes.
[0107] In this embodiment, step 601 extracts the directed edge definitions between nodes from the pipeline region. Specifically, the pipeline region is composed of edges, which represent the data flow relationship between nodes. The system parses the pipeline region of the ACTO script, traverses the definition of each edge, and extracts the source node identifier and target node identifier of each edge. For example, an edge defined as {"from": "data_extract_node", "to": "data_preprocess_node"} indicates that data flows from the "data extraction node" to the "data preprocessing node". Step 602 constructs a directed acyclic graph based on all the directed edge definitions extracted in step 601 to obtain the data flow relationship. Specifically, the system uses each node in the node region as the vertices of the graph and each extracted directed edge as the edge of the graph. It connects the corresponding nodes according to the direction of the directed edges to construct a complete directed graph structure. Then, the system checks whether there are cycles in the directed graph. If a cycle exists, an error is reported; otherwise, it is confirmed as a directed acyclic graph (DAG). This DAG fully describes the data flow relationships between the nodes: each node is a vertex in the graph, each directed edge represents data flowing from one node to another, and the direction of the edge reflects the dependency relationship between nodes—the endpoint of the edge depends on the output data of the starting node. For example, for the pipeline "data extraction node → data preprocessing node → large model generation node," the DAG constructed by the system contains three nodes and two directed edges, where the data preprocessing node depends on the data extraction node, and the large model generation node depends on the data preprocessing node.
[0108] Figure 7The process illustrated involves extracting directed edge definitions from the pipeline region and constructing a directed acyclic graph (DAG). This transforms the declarative edge definitions in the ACTO script into a structured graph model, clearly and accurately describing the data flow and dependencies between nodes. This DAG provides a reliable data foundation for determining the execution order of nodes, ensuring that nodes execute correctly according to data dependencies and avoiding runtime anomalies caused by circular dependencies or incorrect execution order.
[0109] Figure 8 A flowchart illustrating another embodiment of the artificial intelligence agent execution method provided in this application. Figure 8 The process shown is in Figure 1 Based on the illustrated process, the following steps are included: Step 801: Extract the output parameter definitions from the main program area; Step 802: Define the output variable values of each node according to the output parameters to obtain the execution result.
[0110] For ease of understanding, steps 801-802 are explained uniformly below: Output parameter definition: This refers to the definition information of the final output data that the AI Agent declared in the main program area needs to output after execution. It includes the name, data type and data structure of the output parameters, which are used to specify the organization format and content composition of the execution results.
[0111] Organization: refers to the process of filtering, extracting and assembling the required data from the output variable values of each node according to the structure and format defined by the output parameters. This includes matching and combining the output variable values scattered in different nodes according to the field names, data types and hierarchical structure defined by the output parameters.
[0112] In this embodiment, step 701 extracts the output parameter definitions from the main program area. Specifically, the main program area defines the basic information of the AI Agent, including its name, input parameter definitions, output parameter definitions, numbers, and descriptions. The system parses the main program area of the ACTO script and reads the declared output parameter definitions, such as {"name":"final_answer", "type": "String"} or more complex structured definitions like {"name": "result", "type": "Object", "fields": [{"name": "answer", "type": "String"}, {"name": "confidence", "type": "Float"}]}. This definition specifies which fields the execution result should contain and the data type of each field. Step 702 organizes the output variable values of each node according to the extracted output parameter definitions to obtain the execution result. Specifically, after all nodes in step 104 have completed execution, the system collects the output variable values generated by each node. Then, according to the structure and format defined in the output parameter definition, it filters out data that matches the output parameter definition from these output variable values: For each field in the output parameter definition, the system finds the corresponding node output variable value (for example, the "final_answer" field in the output parameter definition may correspond to the "generated result" output variable value of the large model generation node), and fills it into the position specified in the output parameter definition; if the output parameter definition has a nested structure, the system recursively organizes the data according to the hierarchical relationship; finally, it assembles the data into an execution result that conforms to the format of the output parameter definition. For example, if the output parameter in the main program area is defined as "final answer", the system finds the node output variable value that generates the final answer (such as the output variable "generated result" of the large model generation node) in the node area and returns it as the execution result; or if the output parameter is defined as a structured object containing two fields, "answer" and "confidence", the system obtains the value of the "answer" field from the large model generation node and the value of the "confidence" field from the scoring node, and combines them into a JSON object as the execution result to be returned to the caller.
[0113] Figure 8The illustrated process extracts output parameter definitions from the main program area and organizes the output variable values of each node according to these definitions to generate execution results, thus achieving standardization and configurability of the AI Agent's output. Users only need to declare the desired output structure in the main program area, and the system can automatically extract the corresponding data from the output of each node and assemble it according to the format, without the need to write additional output processing code. At the same time, the declarative design of the output parameter definitions makes the AI Agent's interface clear and unambiguous, facilitating integration and invocation with other systems, and improving the AI Agent's reusability and interoperability.
[0114] To more clearly illustrate the application of the technical solution in actual business scenarios, the following example illustrates the process of compiling and executing the "Annual Audit Plan Generator".
[0115] I. Business Scenarios Business personnel in an auditing system wanted to create an intelligent agent to generate annual audit plans, thus eliminating the tedious and repetitive task of manually creating audit plans each year. When a user inputs "Generate my 2026 audit plan," the agent automatically generates the plan for that year. The entire process can be completed independently by the business personnel without writing any code.
[0116] II. Visualization Process like Figure 5 , Figure 6 and Figure 9 As shown, business personnel open the visual modeling interface, which includes a variable setting area, a node selection area, a compilation area, and a node configuration area.
[0117] First, define the input parameter "query" (user question) in the variable setting area.
[0118] Next, drag four nodes from the node selection area to the compilation area and name them as: Annual Identification Node, Tool Node, Plan Generation Node, and Output Node.
[0119] Then, configure each node in the node configuration area: Annual identification node: The input variable is "query", the output variable is "year", the calculation method is large model call, and the prompt word is: extract the annual parameter from the input variable.
[0120] Tool node: The input variable is "year", the output variable is "list" (plan list), and the calculation method is tool invocation. Select the planning tool.
[0121] The plan generation node has the following input variables: "list" and "result" (plan list). The calculation method is a large model call. The prompt is: "Generate an audit plan that meets the user's requirements based on the user's questions and the provided plan list."
[0122] Output node: The input variable is "result", and the output of the agent is set to "result".
[0123] Next, edges are generated between nodes in the compilation area through connection operations: the output of the annual identification node is connected to the tool node, the tool node is connected to the plan generation node, and the plan generation node is connected to the output node.
[0124] Finally, in response to the user's save operation, the system converts the data pipeline diagram in the compilation area into a domain-specific language script.
[0125] Script example: text agent plan_agent($query:String)->(result:String){ node getyear($query:String)->(year:String){ operator: LLM, config:{ prompt: "Extract year parameter from input variable `$[query]`" } } node calltool($year:String)->(list:Array){ operator: TOOL, config:{ tool: "getPlan($[year])" } } node genPlan($list:Array)->(result:Array){ operator: LLM, config:{ prompt: "Generate an audit plan that meets the user's requirements based on the user's query and the provided list of plans." } } graph { edges:{ (getyear->calltool), (calltool->genPlan) } } } III. Script Execution Process When a user enters "Help me generate an audit plan for 2026", the system performs the following steps: The first step is to load the agent's language script from the storage unit.
[0126] The second step is to parse the script, extract the input parameter "user question" from the main program area, extract the calculation logic of each node from the node area, and extract the data flow relationship between nodes from the pipeline area.
[0127] The third step is to determine the execution order based on the data flow relationship: first execute the annual identification node, then execute the tool node and the plan generation node. Execute the annual identification node: Based on its input variable definition, the input parameter value "Help me generate the 2026 audit plan" is used as input data. The calculation is performed according to the calculation method and configuration of the large model to obtain the calculation result "2026", which is used as the value of the output variable "year".
[0128] Execution Tool Node: Based on its input variable definition, the output variable value "2026" of the upstream annual identification node is used as input data, and the tool is called according to the configuration to obtain the calculation result "Plan List".
[0129] Execution plan generation node: Based on its input variable definition, the input parameter value "plan list" is used as input data, and calculation is performed according to the calculation method and configuration of the large model to obtain the calculation result "plan list", which is used as the value of the output variable "result" (that is, the output variable value of the agent).
[0130] Fourth, the system returns the result variable value of the agent to the user.
[0131] IV. Technical Effects In this application, business personnel can create an intelligent agent for generating annual audit plans simply by dragging, configuring, and connecting, without writing any code. This agent can automatically parse the plan year, invoke tools, and generate a plan list based on user questions, achieving a closed loop from business needs to application implementation and significantly lowering the development threshold for AI agents.
[0132] Figure 10 This is a block diagram illustrating an embodiment of an artificial intelligence agent execution device provided in this application. Figure 10As shown, the device includes: The acquisition module 1001 is used to acquire a domain-specific language script that describes the execution process of the artificial intelligence agent. The domain-specific language script includes a main program area, a variable area, a node area, and a pipeline area. The extraction module 1002 is used to extract input parameter definitions from the main program area, extract internal variable definitions from the variable area, extract input variable definitions, output variable definitions, calculation methods and calculation configurations of at least one node from the node area, and extract data flow relationships between the nodes from the pipeline area. The determining module 1003 is used to determine the execution order of each node based on the data flow relationship; The execution module 1004 is used to execute each of the nodes according to the execution order. When executing any node, according to the node's input variable definition, at least one of the input parameter value corresponding to the input parameter definition, the internal variable value corresponding to the internal variable definition, and the output variable value of the upstream node is used as input data. The input data is calculated according to the node's calculation method and calculation configuration to obtain a calculation result, and the calculation result is used as the output variable value corresponding to the node's output variable definition. The generation module 1005 is used to generate execution results based on the output variable values of each node.
[0133] In one possible implementation, the acquisition module is specifically used for: The user's compilation operations are obtained through a visual modeling interface. The compilation operations include at least one of variable definition operations, node generation operations, node connection operations, and node configuration operations. Based on the compilation operation, nodes and edges are generated in the compilation area of the visual modeling interface to form a data pipeline graph; In response to a user's save operation, the data pipeline diagram is converted into a domain-specific language script.
[0134] In one possible implementation, the acquisition module is further configured to: The data pipeline graph is submitted to the conversion unit so that the logical relationships between the nodes and edges in the data pipeline graph can be verified by the conversion unit. After the verification is passed, the conversion unit generates the domain-specific language script based on the data pipeline diagram; Store the domain-specific language script to the storage unit.
[0135] In one possible implementation, the device further includes a loading module for: In response to a user's viewing action, the domain-specific language script is read from the storage unit; The domain-specific language script is submitted to the loading unit so that the loading unit can convert the domain-specific language script into a visual graphic. The visualization is displayed through a visual modeling interface.
[0136] In one possible implementation, the device further includes a testing module for: In response to a user's test operation on any node, the node is executed, and the execution status and test results of the node are obtained. The execution status and node test results are displayed in the compilation area.
[0137] In one possible implementation, the extraction module is specifically used for: Extract the directed edge definitions between the nodes from the pipeline region; A directed acyclic graph is constructed based on the definition of all directed edges to obtain the data flow relationship.
[0138] In one possible implementation, the generation module is specifically used for: Extract the output parameter definitions from the main program area; The output variable values of each node are organized according to the output parameters to obtain the execution result.
[0139] like Figure 11 As shown in the figure, this application provides a device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114. Memory 113 is used to store computer programs; In one embodiment of this application, when the processor 111 executes a program stored in the memory 113, it implements the artificial intelligence agent execution method provided in any of the foregoing method embodiments, including: Obtain a domain-specific language script that describes the execution process of an artificial intelligence agent, the domain-specific language script comprising a main program area, a variable area, a node area, and a pipeline area; The input parameter definitions are extracted from the main program area, the internal variable definitions are extracted from the variable area, the input variable definitions, output variable definitions, calculation methods and calculation configurations of at least one node are extracted from the node area, and the data flow relationships between the nodes are extracted from the pipeline area. Based on the data flow relationship, determine the execution order of each node; Each node is executed in the execution order. When executing any node, at least one of the following is taken as input data: the input parameter value corresponding to the input parameter definition, the internal variable value corresponding to the internal variable definition, and the output variable value of the upstream node, according to the input variable definition of the node. The input data is calculated according to the calculation method and calculation configuration of the node to obtain the calculation result, and the calculation result is taken as the output variable value corresponding to the output variable definition of the node. The execution results are generated based on the output variable values of each node.
[0140] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the artificial intelligence agent execution method provided in any of the foregoing method embodiments.
[0141] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0143] It should be understood that the terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms “a,” “an,” and “described” as used herein may also include the plural forms. The terms “comprising,” “including,” “containing,” and “having” are inclusive and therefore indicate the presence of the stated features, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, elements, components, and / or combinations thereof. The method steps, processes, and operations described herein are not construed as requiring them to be performed in a particular order described or illustrated unless the order of performance is explicitly indicated. It should also be understood that additional or alternative steps may be used.
[0144] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for executing artificial intelligence agents, characterized in that, The method includes: Obtain a domain-specific language script that describes the execution process of an artificial intelligence agent, the domain-specific language script comprising a main program area, a variable area, a node area, and a pipeline area; The input parameter definitions are extracted from the main program area, the internal variable definitions are extracted from the variable area, the input variable definitions, output variable definitions, calculation methods and calculation configurations of at least one node are extracted from the node area, and the data flow relationships between the nodes are extracted from the pipeline area. Based on the data flow relationship, determine the execution order of each node; Each node is executed in the execution order. When executing any node, at least one of the following is taken as input data: the input parameter value corresponding to the input parameter definition, the internal variable value corresponding to the internal variable definition, and the output variable value of the upstream node, according to the input variable definition of the node. The input data is calculated according to the calculation method and calculation configuration of the node to obtain the calculation result, and the calculation result is taken as the output variable value corresponding to the output variable definition of the node. The execution results are generated based on the output variable values of each node.
2. The method according to claim 1, characterized in that, The acquisition of the domain-specific language script used to describe the execution process of the artificial intelligence agent includes: The user's compilation operations are obtained through a visual modeling interface. The compilation operations include at least one of variable definition operations, node generation operations, node connection operations, and node configuration operations. Based on the compilation operation, nodes and edges are generated in the compilation area of the visual modeling interface to form a data pipeline graph; In response to a user's save operation, the data pipeline diagram is converted into a domain-specific language script.
3. The method according to claim 2, characterized in that, The step of converting the data pipeline diagram into a domain-specific language script in response to a user's save operation includes: The data pipeline graph is submitted to the conversion unit so that the logical relationships between the nodes and edges in the data pipeline graph can be verified by the conversion unit. After the verification is passed, the conversion unit generates the domain-specific language script based on the data pipeline diagram; Store the domain-specific language script to the storage unit.
4. The method according to claim 3, characterized in that, The method further includes: In response to a user's viewing action, the domain-specific language script is read from the storage unit; The domain-specific language script is submitted to the loading unit so that the loading unit can convert the domain-specific language script into a visual graphic. The visualization is displayed through a visual modeling interface.
5. The method according to claim 2, characterized in that, The method further includes: In response to a user's test operation on any node, the node is executed, and the execution status and test results of the node are obtained. The execution status and node test results are displayed in the compilation area.
6. The method according to claim 1, characterized in that, The step of extracting the data flow relationship between the nodes from the pipeline area includes: Extract the directed edge definitions between the nodes from the pipeline region; A directed acyclic graph is constructed based on the definition of all directed edges to obtain the data flow relationship.
7. The method according to claim 1, characterized in that, The process of generating execution results based on the output variable values of each node includes: Extract the output parameter definitions from the main program area; The output variable values of each node are organized according to the output parameters to obtain the execution result.
8. An artificial intelligence agent execution device, characterized in that, The device includes: The acquisition module is used to acquire a domain-specific language script that describes the execution process of the artificial intelligence agent. The domain-specific language script includes a main program area, a variable area, a node area, and a pipeline area. The extraction module is used to extract input parameter definitions from the main program area, extract internal variable definitions from the variable area, extract input variable definitions, output variable definitions, calculation methods and calculation configurations of at least one node from the node area, and extract data flow relationships between the nodes from the pipeline area. The determination module is used to determine the execution order of each node based on the data flow relationship; An execution module is used to execute each of the nodes according to the execution order. When executing any node, according to the node's input variable definition, at least one of the input parameter value corresponding to the input parameter definition, the internal variable value corresponding to the internal variable definition, and the output variable value of the upstream node is used as input data. The input data is calculated according to the node's calculation method and calculation configuration to obtain a calculation result, and the calculation result is used as the output variable value corresponding to the node's output variable definition. The generation module is used to generate execution results based on the output variable values of each node.
9. An electronic device, characterized in that, include: A processor and a memory, the processor being configured to execute an artificial intelligence agent execution program stored in the memory to implement the artificial intelligence agent execution method according to any one of claims 1-7.
10. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the artificial intelligence agent execution method according to any one of claims 1-7.