An automated construction method and device of an artificial agent system, an electronic device, a storage medium and a computer program product

CN122985153APending Publication Date: 2026-10-27MOORE THREADS TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611459884.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-20
Publication Date
2026-10-27

AI Technical Summary

Benefits of technology

[0016]本公开实施例的人工智能体系统的自动化构建方法,首先确定包括多个声明式指令块的声明式智能体定义文件,每个声明式指令块中包括多个声明式语义指令;进而,通过解析多个声明式指令块,生成与执行框架无关的中间表示结构,以使得最终能够基于中间表示结构,自动化构建目标人工智能体系统。由于声明式语义指令的语法天然简洁,能够降低对开发者的编程能力要求,快速且灵活地确定满足构建需求的声明式智能体定义文件,进而高效实现人工智能体系统的自动化构建,整个构建过程能够达到code-less效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985153A_ABST
    Figure CN122985153A_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of computer, and particularly relates to an automatic construction method and device of an artificial intelligence agent system, an electronic device, a storage medium and a computer program product, the method comprising: determining a declarative agent definition file, wherein the declarative agent definition file comprises a plurality of declarative instruction blocks, and each declarative instruction block comprises a plurality of declarative semantic instructions; generating an intermediate representation structure by parsing the plurality of declarative instruction blocks, wherein the intermediate representation structure is a structured data object independent of an execution framework; and automatically constructing a target artificial intelligence agent system based on the intermediate representation structure. According to the embodiment of the present disclosure, the requirement for the programming ability of a developer can be reduced, the declarative agent definition file meeting the construction requirement can be quickly and flexibly determined, and then the automatic construction of the artificial intelligence agent system can be efficiently implemented, and the entire construction process can achieve a code-less effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to an automated construction method and apparatus for an artificial intelligence system, electronic devices, storage media, and computer program products. Background Technology

[0002] Currently, the construction of AI agents primarily relies on general-purpose programming languages, requiring manual definition of the agent's inputs, outputs, and execution logic. In recent years, with the emergence of execution frameworks such as LangChain and Agent Scope, modular assembly has become a trend, enabling developers to build AI agents more efficiently by combining various functional modules. However, this process still demands high-level programming skills from developers, resulting in AI agents with rigid execution flows and limited flexibility, making it difficult to meet the rapid iteration and dynamic expansion needs of diverse business scenarios. Summary of the Invention

[0003] In view of this, this disclosure proposes an automated construction method and apparatus for artificial intelligence systems, as well as electronic devices, storage media, and computer program products.

[0004] According to one aspect of this disclosure, an automated construction method for an artificial intelligence agent system is provided, comprising: determining a declarative agent definition file, wherein the declarative agent definition file includes multiple declarative instruction blocks, each declarative instruction block including multiple declarative semantic instructions; generating an intermediate representation structure by parsing the multiple declarative instruction blocks, wherein the intermediate representation structure is a structured data object independent of the execution framework; and automatically constructing a target artificial intelligence agent system based on the intermediate representation structure.

[0005] In one possible implementation, the plurality of declarative semantic instructions include at least one of the following: agent declaration instructions for declaring an AI agent; behavior guidance instructions for guiding the behavior of the AI ​​agent using natural language instructions; service declaration instructions for declaring a remote Model Context Protocol (MCP) service that the AI ​​agent needs to rely on when performing tasks; agent orchestration instructions for declaring a collaborative orchestration plan for the AI ​​agent; model declaration instructions for declaring a large language model that the AI ​​agent needs to rely on when performing tasks; key instructions for providing security credentials for the AI ​​agent; and environment variable instructions for defining at least one runtime environment parameter for the AI ​​agent.

[0006] In one possible implementation, the plurality of declarative instruction blocks include: at least one agent declarative instruction block; each agent declarative instruction block is used to define an artificial intelligence agent and its behavior description, and each agent declarative instruction block includes one or more of the following: agent declaration instruction, behavior guidance instruction, and service declaration instruction.

[0007] In one possible implementation, the plurality of declarative instruction blocks include: an MCP service declarative instruction block; the MCP service declarative instruction block is used to define the startup and communication specifications of an MCP service, wherein the MCP service declarative instruction block includes one or more of the following: service declaration instruction, startup instruction, parameter instruction, and transport protocol instruction.

[0008] In one possible implementation, the plurality of declarative instruction blocks include: an agent orchestration declarative instruction block; the agent orchestration declarative instruction block is used to declare a task flow of an AI agent collaborative orchestration plan, and the agent orchestration declarative instruction block includes one or more of: agent orchestration instructions, agent declaration instructions, execution plan type instructions, and execution plan iteration instructions.

[0009] In one possible implementation, generating an intermediate representation structure by parsing the multiple declarative instruction blocks includes: verifying and establishing reference relationships between different declarative instruction blocks through context binding, and generating the intermediate representation structure.

[0010] In one possible implementation, generating an intermediate representation structure by parsing the plurality of declarative instruction blocks includes: inputting the declarative agent definition file into a preset parsing and verification engine; and using the parsing and verification engine to parse the plurality of declarative instruction blocks and generate the intermediate representation structure.

[0011] In one possible implementation, the automated construction of the target AI agent system based on the intermediate representation structure includes: generating a Docker file, an MCP service configuration file, and an agent orchestration file based on the intermediate representation structure; calling a container building tool to generate a target container image based on the Docker file; starting the target container image and loading the MCP service configuration file and the agent orchestration file to obtain the target AI agent system.

[0012] According to another aspect of this disclosure, an automated construction apparatus for an artificial intelligence agent system is provided, comprising: a file determination module, configured to determine a declarative agent definition file, wherein the declarative agent definition file includes a plurality of declarative instruction blocks, each declarative instruction block including a plurality of declarative semantic instructions; a parsing module, configured to generate an intermediate representation structure by parsing the plurality of declarative instruction blocks, wherein the intermediate representation structure is a structured data object independent of the execution framework; and a construction module, configured to automatically construct a target artificial intelligence agent system based on the intermediate representation structure.

[0013] According to another aspect of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method.

[0014] According to another aspect of this disclosure, a non-volatile computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method.

[0015] According to another aspect of this disclosure, a computer program product is provided, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described method.

[0016] The automated construction method for an AI agent system according to embodiments of this disclosure first determines a declarative agent definition file including multiple declarative instruction blocks, each of which includes multiple declarative semantic instructions. Then, by parsing the multiple declarative instruction blocks, an intermediate representation structure independent of the execution framework is generated, enabling the automated construction of the target AI agent system based on this intermediate representation structure. Because the syntax of declarative semantic instructions is naturally concise, it reduces the programming skill requirements for developers, allowing for quick and flexible determination of declarative agent definition files that meet construction needs, thereby efficiently achieving automated construction of the AI ​​agent system. The entire construction process achieves a code-less effect.

[0017] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0018] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.

[0019] Figure 1 A flowchart illustrating an automated construction method for an artificial intelligence agent system according to an embodiment of the present disclosure is shown.

[0020] Figure 2 A block diagram of an automated construction apparatus for an artificial intelligence agent system according to an embodiment of the present disclosure is shown.

[0021] Figure 3 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0022] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0023] As used herein, the terms “comprising,” “including,” “having,” or variations thereof are open-ended and include one or more of the stated features, integrals, elements, steps, components, or functions, but do not exclude the presence or addition of one or more other features, integrals, elements, steps, components, functions, or groups thereof.

[0024] When an element is referred to as “connected,” “coupled,” “responding,” or a variation thereof relative to another element, it may be directly connected, coupled, or responding to another element, or there may be an intermediate element present.

[0025] Although the terms first, second, third, etc., may be used herein to describe various elements / operations, these elements / operations should not be limited by these terms. These terms are only used to distinguish one element / operation from another. Therefore, without departing from the teachings of the inventive concept, a first element / operation in some embodiments may be referred to as a second element / operation in other embodiments.

[0026] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0027] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0028] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant regions.

[0029] Currently, the construction of AI agents primarily relies on general-purpose programming languages, requiring manual definition of the agent's input, output, and execution logic. In recent years, with the emergence of execution frameworks such as LangChain and Agent Scope, modular assembly has become a trend, allowing developers to build AI agents more efficiently by combining various functional modules. However, current AI agents still suffer from the following problems: 1. Poor portability and reusability: Procedural AI agents heavily rely on platform code structures, making it difficult to abstract into general templates. 2. Disorganized configuration and lack of standardization: AI agents involve model calls, environment configurations, remote commands, file systems, etc., lacking a unified structural description. 3. Difficulty in coordinating multiple AI agent services: The orchestration and reuse mechanisms between multiple AI agents are weak, hindering engineering-level construction. 4. Complex integration of middleware such as Model Context Protocol (MCP): Existing AI agent construction methods have non-standardized access methods for MCP-like protocols, making standardized invocation difficult.

[0030] To address the problems of high construction costs, weak collaboration capabilities, poor maintainability, and inflexible capability mounting in existing artificial intelligence agent systems, this disclosure provides an automated construction method for artificial intelligence agent systems. The automated construction method for artificial intelligence agent systems provided in this disclosure is described in detail below.

[0031] Figure 1 A flowchart illustrating an automated construction method for an artificial intelligence agent system according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method includes:

[0032] In step S11, a declarative agent definition file is determined, wherein the declarative agent definition file includes multiple declarative instruction blocks, and each declarative instruction block includes multiple declarative semantic instructions.

[0033] By using a unified declarative description syntax, developers can easily develop a variety of new declarative semantic instructions and use these new declarative semantic instructions to quickly and flexibly build multiple logically independent declarative instruction blocks to meet the various functional requirements of building artificial intelligence systems.

[0034] This modular, declarative instruction block design can structure scattered configuration items, achieving high-level abstraction of core concepts such as AI agents, services, and orchestration plans, significantly improving the definition clarity and maintainability of AI agent systems. Developers do not need to write cumbersome control flow code; they can describe the AI ​​agent system simply by declaring intents, achieving separation of business logic and code, and lowering the development threshold from the source.

[0035] In one example, this unified declarative description syntax can adopt a Docker file-like declarative syntax. Docker file-like declarative syntax is naturally concise and can reuse DevOps cognitive paths, enabling developers to quickly master various declarative definition methods in AI agent systems.

[0036] In addition to using a declarative syntax similar to Docker files, other declarative syntaxes that are naturally concise and require less programming skills can also be used depending on the actual situation. This disclosure does not impose any specific restrictions on this.

[0037] In step S12, an intermediate representation structure is generated by parsing multiple declarative instruction blocks. The intermediate representation structure is a structured data object that is independent of the execution framework.

[0038] By performing syntactic analysis on the declarative agent definition file, each declarative instruction block and each declarative semantic instruction it contains are identified.

[0039] Furthermore, by parsing each declarative instruction block and each declarative semantic instruction it contains, a structured data object independent of the execution framework is generated: an intermediate representation structure. This effectively decouples the construction of the AI ​​agent system from the downstream execution framework, making the constructed AI agent system portable and scalable.

[0040] In step S13, the target artificial intelligence system is automatically constructed based on the intermediate representation structure.

[0041] Based on the intermediate representation structure, the automated construction of the target artificial intelligence system can be achieved efficiently.

[0042] The automated construction method for an AI agent system according to embodiments of this disclosure first determines a declarative agent definition file including multiple declarative instruction blocks, each of which includes multiple declarative semantic instructions. Then, by parsing the multiple declarative instruction blocks, an intermediate representation structure independent of the execution framework is generated, enabling the automated construction of the target AI agent system based on this intermediate representation structure. Because the syntax of declarative semantic instructions is naturally concise, it reduces the programming skill requirements for developers, allowing for quick and flexible determination of declarative agent definition files that meet construction needs, thereby efficiently achieving automated construction of the AI ​​agent system. The entire construction process achieves a code-less effect.

[0043] In one possible implementation, the multiple declarative semantic instructions include at least one of the following: agent declaration instructions for declaring an AI agent; behavior guidance instructions for guiding the behavior of the AI ​​agent using natural language instructions; service declaration instructions for declaring the MCP services that the AI ​​agent needs to rely on when performing tasks; agent orchestration instructions for declaring a collaborative orchestration plan for an AI agent; model declaration instructions for declaring a large language model that the AI ​​agent needs to rely on when performing tasks; key instructions for providing security credentials for the AI ​​agent; and environment variable instructions for defining at least one runtime environment parameter for the AI ​​agent.

[0044] Declarative semantic instructions can include: agent declaration instructions, behavior guidance instructions, service declaration instructions, agent orchestration instructions, model declaration instructions, key instructions, environment variable instructions, etc.

[0045] In addition to the above-mentioned instructions, multiple declarative semantic instructions may also be defined according to actual application scenarios and construction requirements. This disclosure does not make specific limitations on this.

[0046] In one possible implementation, the multiple declarative instruction blocks include: at least one agent declarative instruction block; each agent declarative instruction block is used to define an artificial intelligence agent and its behavior description, and each agent declarative instruction block includes one or more of the following: agent declaration instruction, behavior guidance instruction, and service declaration instruction.

[0047] Based on declarative instruction blocks for intelligent agents, it is possible to quickly define an artificial intelligence agent and its behavioral description.

[0048] Each agent declarative instruction block includes: agent declaration instruction, behavior guidance instruction, and service declaration instruction.

[0049] The agent declaration instruction block includes agent declaration instructions (AGENT instructions), which can declare an artificial intelligence agent. For example, agent declaration instruction (AGENT instruction): AGENT A declares an artificial intelligence agent named A; agent declaration instruction (AGENT instruction): AGENT B declares an artificial intelligence agent named B.

[0050] The declarative instruction block for an intelligent agent includes behavioral guidance instructions (INSTRUCTION instructions), which can use natural language instructions to guide the behavior of the artificial intelligence agent defined in the declarative instruction block. The specific content of the behavioral guidance instructions (INSTRUCTION instructions) is flexibly defined according to the actual construction needs of the artificial intelligence agent, and this disclosure does not impose specific limitations on it.

[0051] The service declaration instructions (SERVER instructions) included in the agent declarative instruction block can declare the MCP services that the AI ​​agent defined in the agent declarative instruction block needs to perform tasks. For example, the service declaration instruction (SERVER instruction): SERVERS ab declares that the AI ​​agent needs to rely on the two MCP services a and b when performing tasks; the service declaration instruction (SERVER instruction): SERVERS cde declares that the AI ​​agent needs to rely on the three MCP services c, d, and e when performing tasks.

[0052] In addition to agent declaration instructions, behavior guidance instructions, and service declaration instructions, the agent declarative instruction block can also be flexibly configured with other declarative semantic instructions according to the actual construction needs of the AI ​​agent. This disclosure does not make specific limitations on this.

[0053] In one possible implementation, the multiple declarative instruction blocks include: an MCP service declarative instruction block; the MCP service declarative instruction block is used to define the startup and communication specifications of an MCP service, wherein the MCP service declarative instruction block includes one or more of the following: service declaration instruction, startup instruction, parameter instruction, and transport protocol instruction.

[0054] Based on the MCP service declarative instruction block (MCP Server instruction block), it is possible to quickly define the startup and communication specifications of an MCP service, realize the unified encapsulation of MCP remote services, so that the artificial intelligence agent does not need to know the specific service address and calling logic to declare and bind remote MCP services and use a powerful toolchain.

[0055] The MCP service declarative instruction block (MCP Server instruction block) includes: service declaration instruction (SERVER instruction), startup instruction (COMMAND instruction), parameter instruction (ARGS instruction), and transport protocol instruction (TRANSPORT instruction).

[0056] The MCP service declaration directive block (MCP Server directive block) includes service declaration directives (SERVER directives), which can declare an MCP service. For example, the service declaration directive (SERVER directive): SERVER a declares an MCP service named a; the service declaration directive (SERVER directive): SERVER d declares an MCP service named d.

[0057] The startup directives (COMMAND directives) included in the MCP service declarative directive block (MCP Server directive block) can declare executable commands to start the MCP service defined in the MCP service declarative directive block (MCP Server directive block). For example, the startup directive (COMMAND directive): COMMAND uvx, declares that the MCP service is started using the uvx executable command; the startup directive (COMMAND directive): COMMAND npx, declares that the MCP service is started using the npx executable command.

[0058] The parameter directives (ARGS directives) included in the MCP service declarative directive block (MCP Server directive block) can declare the parameters that need to be passed to the startup directive (COMMAND directive). For example, the parameter directive (ARGS directive): ARGS mcp-server-a, declares that the parameter to be passed to the startup directive (COMMAND directive) is mcp-server-a, so that the startup directive (COMMAND directive) can obtain and execute the MCP service package named mcp-server-a based on the parameter mcp-server-a.

[0059] The TRANSPORT directives included in the MCP service declarative directive block (MCP Server directive block) can declare the communication protocol and transmission method between the AI ​​agent and the MCP service. For example, the TRANSPORT directive: TRANSPORT stdio, declares the communication protocol and transmission method between the AI ​​agent and the MCP service, using the lightweight, cross-platform inter-process communication (IPC) method of standard input / output stdio.

[0060] In addition to service declaration instructions (SERVER instructions), startup instructions (COMMAND instructions), parameter instructions (ARGS instructions), and transport protocol instructions (TRANSPORT instructions), the MCP service declarative instruction block (MCP Server instruction block) can also be flexibly configured with other declarative semantic instructions according to the actual construction needs of the artificial intelligence agent. This disclosure does not make specific limitations on this.

[0061] In one possible implementation, the multiple declarative instruction blocks include: an agent orchestration declarative instruction block; the agent orchestration declarative instruction block is used to declare a task flow of a collaborative orchestration plan for an artificial intelligence agent, and the agent orchestration declarative instruction block includes one or more of the following: agent orchestration instruction, agent declaration instruction, execution plan type instruction, and execution plan iteration instruction.

[0062] Based on the agent orchestration declarative instruction block (ORCHESTRATOR instruction block), it is possible to declare the task flow of an AI agent collaborative orchestration plan, and flexibly implement complex task flow orchestration such as chained tasks and cyclic execution of multiple AI agents included in an AI agent collaborative orchestration plan.

[0063] The agent orchestration declarative instruction block includes: agent orchestration instruction, agent declaration instruction, execution plan type instruction, and execution plan iteration instruction.

[0064] The agent orchestration declarative instruction block (ORCHESTRATOR instruction block) includes agent orchestration instructions (ORCHESTRATOR instructions), which can declare a cooperative orchestration plan for an artificial intelligence agent. For example, the agent orchestration instruction (ORCHESTRATOR instruction): ORCHESTRATOR C, declares a cooperative orchestration plan for an artificial intelligence agent named C.

[0065] The agent declaration instructions included in the agent orchestration declarative instruction block (ORCHESTRATOR block) can declare at least two AI agents that need to participate in the AI ​​agent collaborative orchestration plan. For example, the agent declaration instruction (AGENT instruction): AGENTS AB, declares that two AI agents, A and B, need to participate in the AI ​​agent collaborative orchestration plan.

[0066] The execution plan type instruction (PLAN_TYPE instruction) included in the agent orchestration declarative instruction block (ORCHESTRATOR instruction block) can declare the execution mode of the AI ​​agent collaborative orchestration plan. For example, the execution plan type instruction (PLAN_TYPE instruction): PLAN_TYPE full, declares that the AI ​​agent collaborative orchestration plan adopts the "full" or "comprehensive" execution mode.

[0067] The execution plan iteration instructions (PLAN_ITERATIONS instructions) included in the agent orchestration declarative instruction block (ORCHESTRATOR instruction block) can declare the number of times the AI ​​agent collaborative orchestration plan will be executed repeatedly. For example, the execution plan iteration instruction (PLAN_ITERATIONS instruction): PLAN_ITERATIONS 30, declares that the AI ​​agent collaborative orchestration plan will be automatically and continuously repeated 30 times.

[0068] In addition to agent orchestration instructions, agent declaration instructions, execution plan type instructions, and execution plan iteration instructions, the agent orchestration declarative instruction block (ORCHESTRATOR instruction block) can also be flexibly configured with other declarative semantic instructions according to the actual construction needs of the artificial intelligence agent. This disclosure does not make specific limitations on this.

[0069] Based on the model declaration instruction (MODEL instruction), key instruction (SECRET instruction), and environment variable instruction (ENV instruction), descriptive injection of configurations such as models, keys, and environment variables can be performed, enhancing the runtime customization capability of the AI ​​agent system and improving its scene adaptability.

[0070] The `MODEL` directive declares the large language model that the AI ​​agent needs to rely on when performing tasks. The `SECRET` directive provides security credentials for the AI ​​agent. For example, the `MODEL` directive `MODEL f` declares that the AI ​​agent needs to rely on a large language model named `f` when performing tasks; the `SECRET` directive `SECRET xx` declares that the AI ​​agent needs the security credential `xx` to access the large language model `f`.

[0071] Environment variable directives (ENV directives) define at least one runtime environment parameter for an AI agent. For example, the environment variable directive (ENV directive): ENV g=yyy, defines the runtime environment parameter g of the AI ​​agent as having the value yyy.

[0072] Furthermore, through declarative semantic instructions such as MODEL instructions and SERVER instructions, different capabilities such as models and remote MCP services can be declaratively abstracted and freely referenced and combined in agent declarative instruction blocks and / or agent orchestration declarative instruction blocks, thus possessing good pluggability and reusability.

[0073] In one possible implementation, an intermediate representation structure is generated by parsing multiple declarative instruction blocks, including: verifying and establishing reference relationships between different declarative instruction blocks through context binding, and generating an intermediate representation structure.

[0074] Once the declarative agent definition file is finalized, automated CI / CD tools can be used to automate the construction, deployment, and operation of the target AI agent system.

[0075] In one possible implementation, an intermediate representation structure is generated by parsing multiple declarative instruction blocks, including: inputting a declarative agent definition file into a preset parsing and verification engine; and using the parsing and verification engine to parse multiple declarative instruction blocks and generate an intermediate representation structure.

[0076] The parsing and verification engine is a unified preset that can parse different declarative agent definition files.

[0077] After the CI / CD tool detects the declarative agent definition file, it calls the parsing and verification engine and inputs the declarative agent definition file into the parsing and verification engine so that the parsing and verification engine can parse the multiple declarative instruction blocks in the declarative agent definition file and generate an intermediate representation structure.

[0078] First, the parsing and verification engine scans the declarative agent definition file, performs lexical analysis based on the predefined declarative description syntax (e.g., the declarative syntax of a Docker file), and identifies each declarative instruction block and each declarative semantic instruction it contains.

[0079] Secondly, assuming the syntax is correct, the parsing and validation engine performs context binding operations to verify the reference relationships between different declarative directive blocks. For example, when parsing a service declaration directive (SERVER directive): SERVERS b in an agent declarative directive block, it identifies b as the name of an MCP service. Then, it performs a context search in the declarative agent definition file to determine if an MCP service named b, defined by the MCP service declarative directive block (MCP Server directive block), exists. If found, the verification is successful, and a logical link is established from the agent declarative directive block that issued the reference to the referenced MCP service declarative directive block (MCP Server directive block).

[0080] Finally, after verifying and binding all declarative instruction blocks, the verified, discrete declarative instruction blocks are transformed and integrated into a unified, execution-frame-agnostic intermediate representation structure.

[0081] By losslessly and accurately converting declarative agent definition files, which are intended to be readable and based on intent descriptions, into machine-processable, semantically rich structured data models—intermediate representation structures—a solid foundation is laid for subsequent automated construction.

[0082] Furthermore, since the intermediate representation structure is independent of the execution framework, the construction of the AI ​​agent system is completely decoupled from the underlying execution framework, giving the AI ​​agent system portability and compatibility.

[0083] In one possible implementation, the target AI agent system is automatically constructed based on an intermediate representation structure, including: generating a Docker file, an MCP service configuration file, and an agent orchestration file based on the intermediate representation structure; calling a container building tool to generate a target container image based on the Docker file; starting the target container image and loading the MCP service configuration file and the agent orchestration file to obtain the target AI agent system.

[0084] CI / CD tools automatically generate Docker files, MCP service configuration files, and agent orchestration files based on the intermediate representation structure generated by the parsing and verification engine. They then call container build tools to generate the target container image based on the Docker files.

[0085] When the target container image is started, the MCP service configuration file and intelligent agent orchestration file are loaded to automatically build the target artificial intelligence agent system, thereby achieving a code-less effect in the automated construction of the artificial intelligence agent system.

[0086] The automated construction method for an AI agent system according to embodiments of this disclosure first determines a declarative agent definition file including multiple declarative instruction blocks, each of which includes multiple declarative semantic instructions. Then, by parsing the multiple declarative instruction blocks, an intermediate representation structure independent of the execution framework is generated, enabling the automated construction of the target AI agent system based on this intermediate representation structure. Because the syntax of declarative semantic instructions is naturally concise, it reduces the programming skill requirements for developers, allowing for quick and flexible determination of declarative agent definition files that meet construction needs, thereby efficiently achieving automated construction of the AI ​​agent system. The entire construction process achieves a code-less effect.

[0087] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0088] In addition, this disclosure also provides an automated construction device, electronic device, computer-readable storage medium, and program for an artificial intelligence agent system. All of the above can be used to implement any of the automated construction methods for an artificial intelligence agent system provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding descriptions in the method section and will not be repeated here.

[0089] Figure 2 A block diagram of an automated construction apparatus for an artificial intelligence agent system according to an embodiment of the present disclosure is shown. Figure 2 As shown, device 20 includes:

[0090] The file determination module 21 is used to determine the declarative intelligent agent definition file, wherein the declarative intelligent agent definition file includes multiple declarative instruction blocks, and each declarative instruction block includes multiple declarative semantic instructions;

[0091] Parsing module 22 is used to generate an intermediate representation structure by parsing multiple declarative instruction blocks, wherein the intermediate representation structure is a structured data object that is independent of the execution framework;

[0092] Module 23 is used to automatically build the target artificial intelligence system based on the intermediate representation structure.

[0093] In one possible implementation, the multiple declarative semantic instructions include at least one of the following:

[0094] The agent declaration instruction is used to declare an artificial intelligence agent;

[0095] Behavior guidance instructions are used to guide the behavior of artificial intelligence agents using natural language commands.

[0096] The service declaration directive is used to declare the MCP services that the AI ​​agent needs to perform tasks;

[0097] Intelligent agent orchestration instructions are used to declare a collaborative orchestration plan for an artificial intelligence agent;

[0098] Model declaration directives are used to declare the large language models that the AI ​​agent needs to rely on when performing tasks;

[0099] Key instructions are used to provide secure credentials for artificial intelligence agents;

[0100] Environment variable directives are used to define at least one runtime environment parameter for an artificial intelligence agent.

[0101] In one possible implementation, the multiple declarative instruction blocks include: at least one agent declarative instruction block;

[0102] Each agent declarative instruction block is used to define an artificial intelligence agent and its behavior description. Each agent declarative instruction block includes one or more of the following: agent declaration instruction, behavior guidance instruction, and service declaration instruction.

[0103] In one possible implementation, multiple declarative directive blocks include: an MCP service declarative directive block;

[0104] The MCP service declarative instruction block is used to define the startup and communication specifications of an MCP service. The MCP service declarative instruction block includes one or more of the following: service declaration instruction, startup instruction, parameter instruction, and transport protocol instruction.

[0105] In one possible implementation, multiple declarative instruction blocks include: agent orchestration declarative instruction blocks;

[0106] The agent orchestration declarative instruction block is used to declare the task flow of a collaborative orchestration plan for an artificial intelligence agent. The agent orchestration declarative instruction block includes one or more of the following: agent orchestration instruction, agent declaration instruction, execution plan type instruction, and execution plan iteration instruction.

[0107] In one possible implementation, parsing module 22 is specifically used for:

[0108] By using context binding, the reference relationships between different declarative directive blocks are verified and established, generating an intermediate representation structure.

[0109] In one possible implementation, parsing module 22 is specifically used for:

[0110] Input the declarative agent definition file into the preset parsing and verification engine;

[0111] The parsing and verification engine is used to parse multiple declarative instruction blocks and generate an intermediate representation structure.

[0112] In one possible implementation, module 23 is specifically used for:

[0113] Based on the intermediate representation structure, generate Docker files, MCP service configuration files, and agent orchestration files;

[0114] The container build tool is invoked to generate the target container image based on the Docker file.

[0115] Start the target container image and load the MCP service configuration file and agent orchestration file to obtain the target AI agent system.

[0116] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0117] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above method.

[0118] This disclosure also provides a non-volatile computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.

[0119] This disclosure also provides a computer program product, including a computer program or a non-volatile computer-readable storage medium carrying the computer program, wherein the computer program, when executed by a processor, implements the steps of the above method.

[0120] Figure 3 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. (Refer to...) Figure 3 The electronic device 1900 can be provided as a server or a terminal device. (See reference...) Figure 3The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.

[0121] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). Electronic device 1900 can operate on an operating system, such as Windows Server, stored in memory 1932. TM Mac OS X TM Unix TM Linux TM FreeBSD TM Or similar.

[0122] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.

[0123] Computer-readable storage media can be tangible devices capable of holding and storing programs / instructions used by instruction execution devices. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0124] The computer program (or computer-readable program instructions) described herein can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage medium in the respective computing / processing device.

[0125] The computer program (or computer program instructions) used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions to implement various aspects of this disclosure.

[0126] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0127] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0128] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0129] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0130] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. An automated construction method for an artificial intelligence agent system, characterized in that, include: A declarative agent definition file is determined, wherein the declarative agent definition file includes multiple declarative instruction blocks, and each declarative instruction block includes multiple declarative semantic instructions; An intermediate representation structure is generated by parsing the multiple declarative instruction blocks, wherein the intermediate representation structure is a structured data object that is independent of the execution framework; Based on the intermediate representation structure, the target artificial intelligence agent system is automatically constructed.

2. The method according to claim 1, characterized in that, The plurality of declarative semantic instructions includes at least one of the following: The agent declaration instruction is used to declare an artificial intelligence agent; Behavior guidance instructions are used to guide the behavior of artificial intelligence agents using natural language commands. The service declaration directive is used to declare the remote Model Context Protocol (MCP) service that the AI ​​agent needs to rely on when performing tasks; Intelligent agent orchestration instructions are used to declare a collaborative orchestration plan for an artificial intelligence agent; Model declaration directives are used to declare the large language models that the AI ​​agent needs to rely on when performing tasks; Key instructions are used to provide secure credentials for artificial intelligence agents; Environment variable directives are used to define at least one runtime environment parameter for an artificial intelligence agent.

3. The method according to claim 1 or 2, characterized in that, The plurality of declarative instruction blocks include: at least one agent declarative instruction block; Each agent declarative instruction block is used to define an artificial intelligence agent and its behavior description. Each agent declarative instruction block includes one or more of the following: agent declaration instruction, behavior guidance instruction, and service declaration instruction.

4. The method according to claim 1 or 2, characterized in that, The plurality of declarative instruction blocks include: MCP service declarative instruction block; The MCP service declarative instruction block is used to define the startup and communication specifications of an MCP service. The MCP service declarative instruction block includes one or more of the following: service declaration instruction, startup instruction, parameter instruction, and transmission protocol instruction.

5. The method according to claim 1 or 2, characterized in that, The plurality of declarative instruction blocks include: agent orchestration declarative instruction blocks; The agent orchestration declarative instruction block is used to declare a task flow of an AI agent collaborative orchestration plan. The agent orchestration declarative instruction block includes one or more of the following: agent orchestration instruction, agent declaration instruction, execution plan type instruction, and execution plan iteration instruction.

6. The method according to claim 1, characterized in that, The process of generating an intermediate representation structure by parsing the multiple declarative instruction blocks includes: By using context binding, the reference relationships between different declarative instruction blocks are verified and established, and the intermediate representation structure is generated.

7. The method according to claim 1, characterized in that, The process of generating an intermediate representation structure by parsing the multiple declarative instruction blocks includes: Input the declarative agent definition file into the preset parsing and verification engine; The parsing and verification engine is used to parse the multiple declarative instruction blocks and generate the intermediate representation structure.

8. The method according to claim 1, characterized in that, The automated construction of the target artificial intelligence agent system based on the intermediate representation structure includes: Based on the intermediate representation structure, generate Docker file, MCP service configuration file, and agent orchestration file; The container build tool is invoked to generate the target container image based on the Docker file. Start the target container image and load the MCP service configuration file and the intelligent agent orchestration file to obtain the target artificial intelligence agent system.

9. An automated construction device for an artificial intelligence agent system, characterized in that, include: The file determination module is used to determine the declarative agent definition file, wherein the declarative agent definition file includes multiple declarative instruction blocks, and each declarative instruction block includes multiple declarative semantic instructions; The parsing module is used to generate an intermediate representation structure by parsing the multiple declarative instruction blocks, wherein the intermediate representation structure is a structured data object that is independent of the execution framework; A building module is used to automatically build the target artificial intelligence agent system based on the intermediate representation structure.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.

11. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.

12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.