A runtime engine technology that supports multiple intelligent agent construction forms

By using a layered unified intelligent agent operation engine system, the problem of fragmented intelligent agent operation methods in existing technologies has been solved. It achieves seamless collaboration of workflow, skill routing, and autonomous coding, reducing system complexity and resource consumption, and improving flexibility and controllability.

CN123114441APending Publication Date: 2026-11-17SHANGHAI FUDIAN INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611236933.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-14
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively integrate the three intelligent agent operation modes of workflow orchestration, skill routing, and autonomous coding, resulting in system fragmentation, data silos, and high maintenance costs, making it difficult to achieve efficient collaboration in complex business scenarios.

Method used

It adopts a layered intelligent agent unified operation engine system, which provides unified context management, tool registration and LLM gateway through the separation of definition and runtime and multi-interpreter collaboration. It supports three modes: workflow, skill routing and autonomous coding, and allows dynamic nested calls and resource sharing between interpreters.

Benefits of technology

It achieves a unified architecture, eliminates redundancy, improves the flexibility and controllability of the system, ensures seamless communication of context and resources when different modes work together, and reduces system complexity and resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114441A_ABST
    Figure CN123114441A_ABST
Patent Text Reader

Abstract

Intelligent agent technology and application construction have become the mainstream approach for empowering various industries with large-scale models. Since intelligent agent construction methods include workflow, skills, and autonomous code generation, achieving an efficient and unified runtime engine to support multiple intelligent agent construction forms has become a challenge for the effective implementation of intelligent agents. This invention solves the problem of the difficulty in achieving both flexibility and controllability in existing single-paradigm intelligent agent engines by building a workflow interpreter, skill routing interpreter, and autonomous code generation interpreter on a unified kernel through a layered architecture of "definition and runtime separation." The three interpreters share underlying context management, tool registration, and model gateway services, and achieve collaboration through a nested scheduling mechanism: workflow nodes can dynamically call skill routing for intent distribution, or delegate complex tasks to the autonomous code generation interpreter for solution in a sandbox, and continue process execution after the results are returned. This invention achieves unified operation and seamless integration of three modes: deterministic orchestration, modular skill reuse, and open code generation. It combines the reliability of enterprise-level processes, the flexibility of solving complex tasks, and the reusability of high-frequency capabilities, significantly reducing the integration complexity and operating cost of heterogeneous intelligent agent systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer artificial intelligence technology, specifically relating to an intelligent agent runtime system for large language models, and in particular to an engine architecture and its collaborative method that can uniformly support three heterogeneous intelligent agent operation modes: workflow orchestration, skill routing, and autonomous encoding.

[0002] Background Technology and Problems Solved Current frameworks for operating large language model agents typically employ a single execution paradigm: Workflow orchestration (such as Dify, Coze): defines agent behavior as a directed graph of static or conditional branches [1]. The advantages are that the process is controllable and highly interpretable, but it lacks flexibility when facing complex dynamic tasks that are not predefined and cannot spontaneously generate new execution branches.

[0003] Skill-based routing (such as OpenAI GPTs): Encapsulates the agent's capabilities into discrete skill modules [2], which are loaded on demand. The advantage is that the modules are highly reusable, but it is usually difficult for skills to perform complex, multi-round, long-term task collaboration.

[0004] Autonomous coding (e.g. Devin): The agent autonomously writes and executes code in the sandbox to solve problems [3]. The advantage is that it is extremely flexible and can solve open problems, but its execution process is highly uncertain, time-consuming and labor-intensive, and difficult to integrate with business systems that require strict approval and process control within the enterprise.

[0005] These three modes have a lot of redundancy in their core capabilities (context management[4], tool invocation, LLM interaction[5]), and existing technologies have failed to effectively integrate them. If they are to be used together in a complex business scenario, developers often need to deploy three independent systems and manually develop glue code for interaction, resulting in system fragmentation, data silos, and extremely high maintenance costs. Therefore, there is an urgent need for an engine architecture that can uniformly interpret and execute the above three heterogeneous intelligent agent definitions in a single runtime, and allow them to be nested and work together. Summary of the Invention

[0006] This invention proposes a hierarchical unified intelligent agent runtime engine system. Through an architecture of "definition and runtime separation" and "multi-interpreter collaboration," it achieves unified support and hybrid scheduling of three intelligent agent runtime modes by a single engine. The system's hierarchical definition includes: System Operation Service Layer: Provides common basic capabilities (see appendix) Figure 1 The runtime service layer includes a cross-mode context manager, a unified tool registry based on standard protocols (such as MCP), and a unified LLM gateway.

[0007] Execution layer: Runs above the service layer (see appendix) Figure 1 The execution layer contains three parallel and independent interpreter modules: Workflow interpreter: Used to parse and execute agent workflow definitions based on directed graphs (DAGs).

[0008] Skill routing interpreter: used to dynamically load and execute predefined skill packs based on semantic vector matching of user intent.

[0009] Autonomous code interpreter: Based on a natural language task description, it autonomously generates and executes code in an isolated sandbox through a "think-act-observe" cycle to complete the task.

[0010] This engine system supports each interpreter in executing its own process by dynamically creating and delegating a node or step as a subtask to another interpreter for execution, and obtaining the returned result.

[0011] This section provides formal definitions for the elements of the runtime engine, runtime service layer, and execution layer. First, the unified runtime engine system for intelligent agents is defined as a six-tuple: E = (K,O,S,T,δ) init ,δ term ) K: Unified runtime kernel, providing access to state, tools, and models.

[0012] O = {O wf O skill O code}: A set of interpreters, corresponding to three modes: workflow, skill routing, and auto-coding.

[0013] S: Engine global state space, which consists of the session states of all agents.

[0014] T: Task space, containing tasks to be processed.

[0015] δ init The initial scheduling function selects a suitable interpreter for the task.

[0016] δ term : Termination decision function, determining whether the task is completed.

[0017] The unified runtime service is defined as follows: K =( M , R , G ,Φ ctx ,Φ sec ) M: Hierarchical memory model. Where M_{short} is the sliding window short-term memory, and M_{long} is the vector database long-term memory.

[0018] R: Unified Tool Registry. Any tool t ∈ R follows a standard interface defined as (name, description, parameters, execute).

[0019] G: LLM gateway, which unifies the calling of the model, i.e. (prompt, config) → response.

[0020] Φ ctx Context manager, responsible for handling context switching across modes.

[0021] Φ sec Security and Access Controller.

[0022] The three types of interpreters for the execution layer are defined as follows: Workflow Interpreter O wf :

[0023] Responsible for interpreting and executing workflow O wf =(G dag ,Ψ node ,σ wf ,Γ var ) G dag = (N, E): DAG graph, where N is the set of nodes and E is the set of edges.

[0024] Ψ node : Node execution operator, which performs different atomic operations depending on the node type.

[0025] σ wf : Execution status, records the current node position.

[0026] Γ var The global variable space is the core of data transfer between nodes.

[0027] Operating mode For any node n ∈ N, its type (type(n)) determines how the operator Ψ is invoked. node : LLM node: Ψ node (n, ctx) = G(prompt(n, Γ var (), model_config) → response. The prompt is generated by combining the node template and the current variable.

[0028] Tool node: Ψ node (n, Γ var) = R.execute(tool_name, params(Γ var →result. This directly calls the tools in the registry center R.

[0029] Code node: Ψ node (n, Γ var ) = Sandbox(pl_interpreter, code(n, Γ var )) →(stdout, vars). Run a program script in an isolated sandbox.

[0030] Subtask switching (critical) If type(n) = "subtask", n will specify the target interpreter o target : State serialization: S snapshot =Φ ctx .serialize(Γ var M short ).

[0031] Subtask generation: Create t child = (o target , objective(n)).

[0032] Entrusted execution: Φ ctx .delegate(t child , S snapshot ), and send the task and context snapshot to the target interpreter.

[0033] Result continuation: After the subtask is completed, the result will be returned. child Injected into variable space: Γ var' = Γ var ∪ result child Then continue from the next node.

[0034] Skill Router skill

[0035] Responsible for dynamically matching and loading skill packs: O skill =(P,Θ match ,Φ load ,σ skill ) P = {p1, p2, ...}: A set of skill packages. Each p is a complete agent definition, containing (prompt, tools_subset, memory_hook).

[0036] Θ match Semantic matching operator. Given user intent and all skill descriptions, calculate cosine similarity in vector space and select the best skill.

[0037] Φ load : Context loading operator, used to perform context switching.

[0038] σ skill : The currently active skill status.

[0039] Operating mode Intent routing: p best = Θ match (query, P) selects the skill pack.

[0040] Context assembly: Calling Φ load (p best M short This step will transfer short-term memory M. short Replace with skill pack p best It uses dedicated system commands and retains only relevant historical information, while loading its own subset of tools.

[0041] Execution: After the context is assembled, the LLM gateway G is invoked to perform inference.

[0042] Context unloading: After the skill execution is complete, Φ is invoked. ctx .unload() releases the skill resources and restores the system to its previous state before routing.

[0043] Autonomous Coding Agent Orchestrator code

[0044] The autonomous encoding interpreter is based on the classic ReAct (Reasoning and Acting) loop: O code =(E sandbox ,π react ,σ code ) E sandbox : Enhance the sandbox environment, which includes an independent file system, process space, and a program interpreter (such as Python).

[0045] π reactThe strategy cycle follows the pattern of "thinking → acting → observing".

[0046] σ code The complete state of the sandbox, including all files and variables, is the agent's "world model".

[0047] Operating mode π react It is a loop that iterates continuously until the task terminates, and its core execution function step is defined as: (observation,E sandbox′ =step(action,E) sandbox ) Generation of action: action = G(thought_prompt + history + task, model_config).

[0048] thought: Text generated by LLM for analysis and planning.

[0049] action: must contain a code block, which is extracted by CodeParser.

[0050] Observations: Standard output, standard error, and optional variable snapshots returned after the sandbox execution.

[0051] Termination condition: LLM generation contains specific tags (such as...)<TASK_COMPLETE> (The text is missing from the original text.)

[0052] Subtask return When O code Once completed, it will return the observation and key file paths as a structured result: Φ ctx .return_result({status:"success",artifacts:[...]})

[0053] Entry and Initialization: When the system receives a task, it first selects an initial interpreter based on the task source or configuration (for example, an external API interface is bound to a workflow).

[0054] Interpreter execution and nested calls: In workflow mode, the workflow interpreter executes the nodes in the DAG sequentially. When it reaches a node such as "Complex Code Generation," that node is marked as "AI-Coding." At this point, the workflow interpreter saves its current state through the kernel's context manager and generates a subtask request, which is then sent to the autonomous coding interpreter.

[0055] Interpreter switching: The autonomous code interpreter takes over, obtains the necessary context and tool permissions from the kernel, starts the ReAct loop in the sandbox, and autonomously writes, executes, and debugs code.

[0056] Result Feedback and Recovery: After completing its task, the autonomous encoder interpreter sends the generated results (such as file paths and data digests) back to the suspended workflow interpreter as a return value. The workflow interpreter then resumes execution, injects the return value into the next node, and continues execution.

[0057] Unified tool invocation: Regardless of the interpreter, when it is necessary to invoke external capabilities (such as search engines, databases, and APIs), it must be done through the unified tool registry, and the kernel will perform permission verification and invocation record.

[0058] Human-machine collaboration: All three interpreters can trigger a unified "human-machine collaboration interruption" during runtime. For example, approval nodes in the workflow and key steps in the self-coding process are confirmed through the same set of approval interruption interfaces.

[0059] Here is given task t example Using a “data analysis report” as an example, we can illustrate the formal definition of interpreter collaboration. A complete cross-modal collaboration can be viewed as a state transition sequence Γ on engine E, driven by kernel K: Initial state: Γ0 = {task: t example Kernel K triggers δ init Scheduled to workflow interpreter O wf .

[0060] Workflow execution: O wf The state progresses to Γ1 according to the DAG graph, at which point it enters the "Data Exploration" node. It initiates a subtask call, and the state transitions to Γ1 → O. skill :analyze(data_path).

[0061] Skill execution: O skill Execute Φ load Load the relevant skills, and the status changes to Γ2. After execution, use Φ ctx .return_result returns insightful JSON, and the state transitions back to O. wfΓ3 = Γ1 + insights.

[0062] Delegation again: The workflow continues, encountering the "Report Generation" node, initiating a subtask: Γ3 → O code :generate_report(insights).

[0063] Autonomous coding execution: O code The ReAct loop is started in the sandbox, and the state goes through multiple rounds Γ4, Γ5,... within the sandbox until report.html is generated, and the path is returned to O. wf Final state Γ final = Γ3 + {report_path}.

[0064] The technical effects and advantages provided by this invention include: Unified architecture, eliminating redundancy: By sinking capabilities such as LLM interaction, tool management and context memory to a unified kernel, the three intelligent agent paradigms share a set of basic services, which greatly reduces system complexity and resource consumption.

[0065] Complementary capabilities, combining flexibility and controllability: this is the most significant advancement. This invention eliminates the mutual exclusion between "determinism in workflow" and "flexibility in autonomous coding." In a process, highly deterministic steps are guaranteed by workflow, complex and dynamic steps are handled by autonomous coding, and high-frequency, standard subtasks are encapsulated as skills for reuse. It combines the controllability of workflow, the reuse of skills, and the open problem-solving capabilities of autonomous coding.

[0066] Seamless contextual coherence: Through a unified nested scheduling mechanism between the kernel and interpreter, the dialogue history, variable state, and file state are fully interconnected when different modes work together. The entire task process is presented as a continuous and unified session, which is imperceptible to the end user. Attached Figure Description

[0067] Figure 1 Schematic diagram of the engine architecture.

[0068] Figure 2 A flowchart illustrating the nested call process of the three interpreters working together.

[0069] References [1] LangGraph: Building Language Agents as Graphs. By Chase, H. etal. 2024 [2] Toolformer: Language Models Can Teach Themselves to Use Tools. BySchick, T. et al. 2023 [3] SWE-Agent: Agent-Computer Interfaces Enable Automated SoftwareEngineering. By Yang, J. et al. 2024 [4] MemGPT: Towards LLMs as Operating Systems. By Packer, C. et al. 2024 [5] A Survey on Large Language Model based Autonomous Agents. ByWang, L. et al. 2024. Detailed Implementation

[0070] This section will describe in detail the software architecture, core components, data flow, and an end-to-end runtime example of this invention. This invention employs a modular design, with components interacting through explicit application programming interfaces to ensure system scalability and maintainability. 1. System Overall Architecture and Deployment Form

[0071] As attached Figure 1 As shown in the architecture diagram, this engine system adopts a microservice architecture of "one kernel and three interpreters" in physical deployment. Each core component can be deployed in the same process or decoupled into independent services. The user-facing front-end definition layer is completely separated from the back-end runtime.

[0072] Front-end definition layer: Provides three editors. A visual editor that generates a JSON representation of the DAG workflow by dragging and dropping nodes; a skill pack configurator that defines the name, description, instructions, and toolset of a skill pack in form form; and a task input box that receives a task described in natural language to trigger the autonomous coding agent.

[0073] The backend runtime layer is the core of this invention, comprising a unified runtime kernel and an orchestration interpreter layer. All components communicate through a high-performance RPC framework and transmit asynchronous tasks and events via a distributed message queue.

[0074] 2. Implementation of the runtime service layer The unified runtime kernel is the foundation of the entire engine, providing seamless basic services to all upper-layer interpreters. Its specific implementation is as follows:

[0075] All tools implement the BaseTool abstract class and are standardized and encapsulated using the MCP protocol. The registration and invocation process for a tool is as follows: Tool Registration: Developers register a Python function (or other programming language function) or external API endpoint with the kernel via a configuration file or API. A parameter model conforming to JSON Schema must be provided during registration. The kernel generates a unique tool_id for the tool and stores its metadata in the registry.

[0076] Tool Invocation: When the interpreter initiates a tool invocation request, it must include (tool_id, parameters, caller_id). Kernel security controller Φ sec First, it checks whether the caller_id has permission to invoke this tool_id within the current session context. If the verification passes, the kernel executor routes the request to the actual tool server via the standard MCP client protocol and returns a ToolResult in a standardized format.

[0077] Implementation of LLM Gateway LLM Gateway M G It is a unified proxy for all model calls. It maintains a configurable model routing table, supporting dynamic routing based on model name and load. Core functionalities include: Unified streaming processing: All calls support server-sent event streaming responses. The gateway converts the proprietary streaming formats of various model vendors into the standard OpenAI streaming block format and sends them back to the caller's interpreter.

[0078] Global rate limiting and retry: Implement global rate limiting based on the token bucket algorithm. For requests that trigger rate limiting or encounter brief network errors, execute an exponential backoff retry strategy.

[0079] 3. Execution layer implementation

[0080] The workflow interpreter has a built-in DAG execution engine, the core of which is a state machine based on an event loop.

[0081] Graph Analysis: Upon startup, it loads a DAG defined in JSON format, with the structure shown below. The parser then deserializes it into an in-memory Graph object.

[0082] Node execution: The state machine starts from the start node and traverses the edges in a depth-first manner according to their definitions. For each node visited, the NodeExecutor dispatches execution based on its type. For example, for a node with type "subtask", it creates a SubtaskRequest object containing the target interpreter identifier and input payload, then sends it to the kernel's nested scheduler via RPC, suspending the current coroutine and waiting for a Future to complete.

[0083] Implementation of the Skill Routing Interpreter During initialization, the skill routing interpreter loads all skill package definitions and pre-computes an embedding vector for the description text of each skill package, storing it in a local vector index.

[0084] Matching process: Upon receiving a user query, it first calls the embedding model to calculate the query vector, and then performs an approximate nearest neighbor search in the local index. The skill set with the highest score is the best match.

[0085] Context loading: Subsequently, it will call the kernel's Φ_ctx.load(p_best) interface. This interface efficiently completes the context switch by shallow copying the current context, replacing the system prompt word and tool whitelist, avoiding the memory overhead of deep copying the entire session history.

[0086] Implementation of a self-encoding interpreter At the heart of the autonomous code interpreter is an asynchronous ReAct loop that interacts with a separate Docker sandbox environment.

[0087] Sandbox environment: Each coding task is executed in a brand new Docker container instance. The container template comes pre-installed with commonly used runtimes and libraries such as Python and Node.js. The interpreter communicates with the container through the Docker SDK, executes code, and writes files to the mounted volume inside the container.

[0088] ReAct loop body Task completion determination: The `task_completed` function uses regular expressions to match whether the LLM response contains special markers (such as...).<FINAL_ANSWER> The interpreter uses a list of files generated in the sandbox to determine the match. Once a match is found, the loop terminates, and the interpreter returns the list of files generated in the sandbox as the final deliverable.

Claims

1. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, The system adopts a two-layer "kernel-interpreter" separation architecture: a unified runtime service layer located at the bottom layer of the system provides common basic capabilities to all interpreters in the upper layer in the form of a shared service layer. These basic capabilities include cross-mode context management, unified tool registration and invocation based on standardized protocols, and unified gateway access to the underlying large language model. An execution layer, located above the unified operation service layer, consists of multiple parallel and independent interpreter modules, each of which encapsulates a specific agent execution paradigm. In the two-layer separation architecture, the unified runtime service layer exposes a set of standardized kernel APIs. Each interpreter module in the orchestration interpreter layer only needs to call the kernel APIs to obtain all underlying capabilities. When adding or replacing an interpreter module, there is no need to modify the code of the unified runtime service layer and the existing interpreter modules, thus achieving decoupling between the interpreter and the runtime service kernel.

2. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, The unified runtime service layer further adopts a modular design, including: a context manager responsible for maintaining a hierarchical memory model, which includes short-term memory based on sliding windows and token capacity limits, and long-term memory based on a vector database; a tool registry center, which uses the Model Context Protocol (MCP) as a standardized tool interface protocol, and all tool calls must pass through this layer for unified permission verification and auditing; and an LLM gateway, which acts as a unified proxy for all underlying large language model calls, shielding the interface differences between different model vendors and providing a unified streaming response format conversion, global rate limiting, and retry mechanism. The context manager, tool registry center, and LLM gateway operate independently and collaborate through internal interfaces to provide transparent basic services to the upper-layer interpreter.

3. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, Each interpreter module in the execution layer is implemented in a pluggable manner, following a unified kernel adapter interface.

4. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, The system also provides nested scheduling capabilities, executing the following steps to achieve dynamic interaction between interpreters: delegation initiation step, routing and passing step, independent execution step, and result return and recovery step.

5. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, The nested scheduling capability supports multiple cross-interpreter delegate calls during a single task execution and supports recursive nesting.

6. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, The nested scheduling capability supports the following three predefined cross-modal interaction paths: workflow-to-skill interaction, workflow-to-autologous coding interaction, and skill-to-autologous coding interaction.

7. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, The three interpreter modules in the execution layer correspond to three different agent construction modalities: workflow interpreter, corresponding to the "directed graph orchestration modality"; skill routing interpreter, corresponding to the "skill encapsulation and dynamic routing modality"; Autonomous code interpreter, corresponding to "autonomous code generation and execution mode".

8. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, The three intelligent agent construction modalities share the same set of basic services provided by the unified runtime kernel.

9. A runtime engine technology supporting multiple intelligent agent construction forms, characterized in that, The three agent construction modalities can be dynamically combined and used during the execution of a single task.