Context-aware agent interaction method and system in orchestration application
Patent Information
- Application Number
- CN202611203732.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-10
- Publication Date
- 2026-10-13
AI Technical Summary
[0008]本发明的一个目的在于,解决现有图形化编排与Agent对话两大系统相互孤立导致的跨系统上下文感知缺失、Agent缺乏反向驱动能力以及缺乏多步迭代闭环同步机制的问题
[0024]基于前文的描述,本领域技术人员能够理解的是,本发明通过获取编排图实时状态,并基于用户锚定与任务推导确定关注焦点并按三圈模型动态裁剪上下文,再使Agent基于裁剪后的上下文规划操作并选择工具,使Agent直接调用编排操控工具修改编排对象,最后实时更新编排图并重新计算关注焦点,重复裁剪、修改编排对象等作业形成“感知—决策—执行—反馈”的自动化闭环,实现Agent对编排图的原生感知与直接操控,形成自动化闭环执行,统一图形化编排的强可控性与Agent对话的高便捷性,同时通过三圈裁剪和焦点迁移保障上下文经济性,通过版本校验、软锁和检查点保障操作安全性,通过用户锚定优先级和半终止状态保障人机协同友好性。
Smart Images

Figure CN122903569A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of large language model technology, specifically relating to a context-aware agent interaction method and system in orchestration applications. Background Technology
[0002] Graphical workflow orchestration and agent dialogue are two mainstream interaction paradigms in the current field of AI generation. Graphical workflow orchestration constructs processing pipelines through visual nodes and connections. Users define data flow and parameter configurations by dragging and dropping, offering advantages such as intuitive operation, controllable processes, and reproducible results. It is widely used in AI painting, data processing, and automated testing. However, graphical orchestration has a high operational threshold; users need to understand the functional semantics of various nodes, the meaning of parameters, and topological constraints. When faced with complex tasks, users often need to frequently consult documentation or rely on accumulated experience. On the other hand, agent dialogue, based on a large language model, allows users to describe their needs using natural language. The agent autonomously plans execution steps and calls tools to complete the task, offering advantages such as convenient interaction, strong intent understanding, and high automation. However, agent dialogue has weaker controllability. Users find it difficult to precisely control intermediate states during execution, and the agent's ability to perceive the internal state of graphical orchestration applications is limited, restricting its application in orchestration scenarios.
[0003] In practical applications, there is a strong need for collaboration between graphical workflow orchestration and agent-based dialogue: users want to maintain the strong controllability of graphical orchestration while leveraging the natural language understanding and automated execution capabilities of agents to lower the operational threshold. However, currently, the two systems are isolated from each other, lacking a standardized interaction mechanism, and exhibiting the following technical shortcomings:
[0004] First, there is a lack of cross-system context awareness. The Agent cannot directly obtain the component topology, node parameter configuration, and dynamic runtime state in graphical orchestration applications. In collaborative adjustment scenarios, due to the lack of a context-sharing mechanism, users need to manually observe the canvas state and convert it into text prompts to input for the Agent. This process is not only inefficient but also prone to missing key information, resulting in an incomplete decision-making basis for the Agent.
[0005] Second, it lacks a reverse-driving and control mechanism. The agent can only output adjustment suggestions in text form and cannot directly modify nodes, parameters, or connections in the orchestration graph. Users still need to manually perform secondary configuration based on the agent's suggestions in the graphical interface. This process limits the agent's role to "advisor" rather than "executor," severely restricting the automated execution efficiency of the intelligent agent.
[0006] Third, there is a lack of a multi-step iterative closed-loop synchronization mechanism. Workflow adjustments are typically a multi-step convergence process of "adjustment-execution-feedback," where users need to repeatedly adjust parameters, trigger execution, observe output results, and then adjust parameters again based on the results. Due to the lack of a bidirectional synchronization protocol, each iteration requires manual data transfer by the user, making it impossible to form an automated "perception-decision-execution-feedback" control loop. This results in inefficient and error-prone multi-step collaboration.
[0007] In view of this, the present invention is hereby proposed. Summary of the Invention
[0008] One objective of this invention is to address the problems of lack of cross-system context awareness, lack of agent reverse-driving capability, and lack of multi-step iterative closed-loop synchronization mechanism caused by the isolation between existing graphical orchestration and agent dialogue systems.
[0009] To achieve the above objectives, this invention provides a context-aware agent interaction method for orchestrating applications, comprising:
[0010] Step S110: In response to the Agent interaction request, obtain the real-time orchestration status of the graphical orchestration application; the real-time orchestration status includes at least the structural context, parameter context, execution context, and selection context.
[0011] Step S120: Dynamically prune the real-time orchestration state based on the focus of attention to obtain the pruned orchestration context; wherein, the focus of attention is determined jointly based on user anchoring information and task inference information; the dynamic pruning is performed according to the three-circle model, dividing the orchestration object into the core circle, the related circle and the background circle;
[0012] Step S130: The Agent performs decision planning based on the trimmed orchestration context to determine at least one orchestration operation to be executed, as well as the corresponding orchestration manipulation tool and tool parameters.
[0013] Step S140: Agent invokes the orchestration control tool to perform the orchestration operation on the orchestration object in the graphical orchestration application. The orchestration control tool includes at least a parameter modification tool, an object addition tool, an object deletion tool, a connection operation tool, and an execution trigger tool.
[0014] In step S150, in response to the execution of the orchestration operation, the orchestration diagram of the graphical orchestration application is updated in real time, and the focus of attention is recalculated based on the updated orchestration diagram. Steps S120 to S150 are repeated until the termination condition is met.
[0015] Furthermore, the step of obtaining the real-time orchestration status of the graphical orchestration application in response to the Agent interaction request includes: initiating a status acquisition request according to a triggering mode; the triggering mode includes a user explicit triggering mode, an Agent implicit triggering mode, and an orchestration graph event triggering mode; collecting structure context, parameter context, execution context, and selection context data respectively; assembling the collected structure context, parameter context, execution context, and selection context data into a unified structured data object, wherein the structured data object contains at least four top-level fields: structure, parameters, execution, and selection, and a monotonically increasing version number is appended to the structured data object.
[0016] Further, the steps of collecting structural context, parameter context, execution context, and selection context data respectively include: collecting structural context: traversing all orchestration objects to obtain the unique identifier, type identifier, and display name of each object; traversing all data stream connections to obtain the source object identifier and output port, target object identifier and input port, and the type definition of the transmitted data for each connection; calculating the in-degree and out-degree of each orchestration object; collecting parameter context: traversing the parameter storage area of each orchestration object to read the current value and metadata of all configuration parameters, wherein the metadata includes at least the value range, default value, and whether it is required; collecting execution context: obtaining the running status, execution progress, reference handle of the output result, and error information of each orchestration object, wherein the reference handle is a pointer to a memory or storage location rather than the output data itself; collecting selection context: obtaining the list of orchestration objects selected by the user on the current canvas, canvas viewport information, and orchestration object data in the clipboard; wherein, when the number of orchestration objects exceeds a preset threshold, a lazy loading strategy is adopted, and only the parameter context of orchestration objects within the current visible area or related to the most recent user interaction is read.
[0017] Furthermore, the step of dynamically pruning the real-time orchestration state based on the focus of attention to obtain the pruned orchestration context includes: determining the focus of attention based on user anchoring information and task inference information; dividing all orchestration objects in the orchestration graph into concentric circles according to a three-circle model, with the focus of attention as the center; assigning different information granularities to orchestration objects in different circles; assembling the pruned information into an orchestration context according to a preset structured template, and performing a token budget check on the orchestration context. When the token limit is exceeded, the summary information of the associated circles is compressed first, followed by the parameter information of the core circle; and a version number is attached to the orchestration context, which is consistent with the version number of the real-time orchestration state in step S110; and the orchestration context is injected into the context window of the Agent.
[0018] Further, the step of dividing all orchestration objects in the orchestration diagram into concentric circles based on the focus of attention and according to the three-circle model includes: the core circle contains orchestration objects directly related to the current task, including the object selected by the user and the target object of the Agent's current operation step; the core circle has a first preset capacity limit, and when it exceeds the limit, it retains the closest objects according to their data dependency distance from the focus of attention; the associated circle is an orchestration object obtained by extending one level upstream and downstream from each object in the core circle along the data flow direction; and spatially adjacent objects located in the same grouping container or annotation box as the objects in the core circle; the associated circle has a second preset capacity limit, and when it exceeds the limit... Prioritize retaining data flow extension objects; the background circle includes orchestration objects other than the core circle and related circles; and / or, the step of assigning different information granularities to orchestration objects in different circles includes: injecting complete information into the core circle objects, the complete information including object metadata, all parameter key-value pairs, complete connection relationships, runtime status, and error details; injecting summary information into the related circle objects, the summary information including object identifier, key parameter values, connection relationships with the core circle, and status summary; injecting statistical information into the background circle, the statistical information including the total number of objects, statistical distribution by functional type, overall data flow description, and abnormal node index.
[0019] Further, the Agent performs decision planning based on the trimmed orchestration context, determining at least one orchestration operation to be executed, along with corresponding orchestration manipulation tools and tool parameters. This includes: the Agent parses the user's intent based on the trimmed orchestration context, the user's current dialogue input, and historical dialogue context to obtain a structured intent representation; the intent representation includes at least the operation target, operation type, operation parameters, and operation sequence; based on the intent representation, the Agent decomposes the user instruction into an ordered list of atomic operation steps; each atomic operation step includes at least a step number, operation type, target object, and expected result description; for each atomic operation step, the Agent selects a corresponding orchestration manipulation tool from a predefined set of orchestration manipulation tools; the orchestration manipulation tool set includes at least a parameter modification tool, an object addition tool, an object deletion tool, a connection operation tool, and an execution trigger tool; and for the selected orchestration operation... The orchestration tool is populated with tool parameters; these parameters originate from one or more of the following: values explicitly specified in user commands, values already existing in the orchestration context, values generated by Agent inference, and system default values. The tool call after parameter population is validated; this validation includes at least type compatibility verification, value range verification, and mandatory field checks. The list of atomic operation steps is assembled into a complete operation plan, and the plan is subjected to integrity checks and conflict detection. The operation plan includes at least a plan identifier, the version number of the orchestration context it is based on, an ordered list of operation steps, and a backup strategy. Conflict detection includes at least operation conflict detection, topology conflict detection, and execution conflict detection. When the operation plan contains preset high-risk operations, a summary of the operation plan is displayed to the user for confirmation before execution. These preset high-risk operations include at least deleting orchestration objects and triggering full-graph execution.
[0020] Further, the step of the Agent calling the orchestration control tool to perform the orchestration operation on the orchestration object in the graphical orchestration application includes: preprocessing the operation plan before performing the orchestration operation, the preprocessing including version verification, context locking, and checkpoint recording; wherein, the version verification step includes: before performing the orchestration operation, obtaining the context version number carried in the operation plan as the first version number, and obtaining the actual version number of the current orchestration graph as the second version number; comparing the first version number and the second version number; if the first version number is equal to the second version number, it is determined that the version matches, and other preprocessing steps are continued; if the first version number is less than the second version number, it is determined that the version is outdated, execution is stopped, and a version difference report is generated, the version difference report at least includes the change type, change object, change content, and change source that have occurred since the state corresponding to the first version number; sending the version difference report to the Agent, the Agent discards the current operation plan, jumps to step S110 to obtain the latest real-time orchestration state again, and re-executes steps S120 to S130 based on the latest orchestration state to generate a new operation plan, the new operation plan... The plan carries the second version number; if the first version number is greater than the second version number, it is determined to be a system anomaly, execution is stopped and a system anomaly log is recorded. The system anomaly log includes at least the first version number, the second version number, the operation plan identifier, and a timestamp. Each orchestration control tool is executed sequentially according to the steps in the operation plan. The execution of each tool includes parameter verification, validity verification, execution of the operation, triggering of change events, and return of execution results. The execution results of each orchestration control tool are standardized into a unified format and injected into the Agent's context window for use in the next decision. The unified format includes at least the tool name, step number, execution status, change description, and error information. When an orchestration control tool fails to execute, the corresponding anomaly handling strategy is executed according to the error type: for recoverable errors, automatic retry is performed, with an upper limit of the number of automatic retries set to a preset value, and an exponential backoff strategy used for the retry interval; for unrecoverable errors, a rollback operation is triggered. The rollback operation includes: locating the nearest execution checkpoint, reversing the successfully executed operation steps, restoring the orchestration graph to the checkpoint state, and notifying the Agent to re-perceive and plan.
[0021] Further, the step of recalculating the focus of attention based on the updated orchestration graph includes: recalculating the focus of attention based on the updated orchestration graph, wherein the recalculation includes dynamic migration of the focus of attention; the dynamic migration is triggered after the Agent completes each orchestration operation step, driven by one or more of the following: operation result-driven, new object-driven, and error-driven; wherein, the operation result-driven is: transferring the focus of attention from the object that has completed the operation to the target object of the next operation step along the data flow direction; after completing parameter modification, transferring it one level downstream to the direct successor object; after completing execution triggering, transferring it one level downstream to the output object; the new object-driven is: taking the newly added orchestration object as the center, including its potential upstream and downstream objects in the focus of attention; the error-driven is: transferring it upstream in reverse along the data flow direction, transferring objects in an error state. The direct upstream orchestration object of the orchestration object is included in the focus of attention; the calculation process of the dynamic migration includes: inheriting the focus of attention from the previous cycle, and modifying the focus of attention according to the result of the current orchestration operation; expanding the modified focus of attention according to the data flow propagation rules and error propagation rules; based on the expanded focus of attention, re-performing the three-layer division to obtain a new core circle, associated circle, and background circle; wherein, the movement of the core circle drives the linkage update of the associated circle and the background circle, the orchestration object that originally belonged to the core circle of the previous cycle is downgraded in the new circle, and the orchestration object that originally belonged to the background circle of the previous cycle is upgraded in the new circle; assigning an incrementing focus version number to the recalculated focus of attention and associating it with the global version number of the orchestration state model; wherein, the dynamic migration is constrained by the boundary conditions of the data flow boundary, task boundary, and user intervention boundary.
[0022] Furthermore, the termination conditions include normal termination conditions and abnormal termination conditions; the normal termination conditions include: all steps in the operation plan have been successfully executed, the user issues a termination command, and the Agent determines that the user's task objective has been achieved based on the orchestration context; the abnormal termination conditions include: the Agent's consecutive execution failures exceed a preset threshold, the loop count reaches a preset upper limit, the user manually interrupts, and the orchestration engine experiences an unrecoverable error; the steps for satisfying the termination conditions include: when the termination conditions are satisfied, performing termination processing, which includes: releasing lock resources, clearing temporary checkpoints, generating an operation summary and displaying it to the user, and saving the complete record of this interaction to the dialogue history; when the termination conditions are not satisfied but a pause is required, entering a semi-terminated state, saving the current operation progress, and waiting for the user to input a resume command before continuing execution from the pause point.
[0023] In other embodiments, a context-aware agent interaction system for orchestration applications is provided, capable of executing the context-aware agent interaction method for orchestration applications described above; the system includes: a state acquisition module, used to acquire the real-time orchestration state of a graphical orchestration application in response to an agent interaction request; the real-time orchestration state includes at least a structural context, a parameter context, an execution context, and a selection context; a context pruning module, used to dynamically prune the real-time orchestration state based on the focus of attention to obtain a pruned orchestration context; wherein the focus of attention is jointly determined by user anchoring information and task inference information; and a decision planning module, used to enable the agent to perform a decision planning based on the pruned context. The system performs decision planning based on the orchestration context, determining at least one orchestration operation to be executed, along with corresponding orchestration manipulation tools and tool parameters. A tool execution module enables the Agent to invoke the orchestration manipulation tools to execute the orchestration operation on orchestration objects in the graphical orchestration application. The orchestration manipulation tools include at least parameter modification tools, object addition tools, object deletion tools, connection operation tools, and execution triggering tools. A closed-loop synchronization module, in response to the execution of the orchestration operation, updates the orchestration graph of the graphical orchestration application in real time, recalculates the focus of attention based on the updated orchestration graph, and repeatedly triggers the context pruning module, the decision planning module, the tool execution module, and the closed-loop synchronization module until a termination condition is met.
[0024] Based on the foregoing description, those skilled in the art will understand that this invention acquires the real-time status of the orchestration diagram, determines the focus of attention based on user anchoring and task derivation, and dynamically trims the context according to the three-circle model. Then, the Agent plans operations and selects tools based on the trimmed context, allowing the Agent to directly call orchestration manipulation tools to modify orchestration objects. Finally, the orchestration diagram is updated in real-time and the focus of attention is recalculated. Repeated trimming and modification of orchestration objects form an automated closed loop of "perception—decision—execution—feedback," enabling the Agent to have native perception and direct control over the orchestration diagram, forming an automated closed-loop execution. This unifies the strong controllability of graphical orchestration with the high convenience of Agent dialogue. Simultaneously, it ensures context economy through three-circle trimming and focus migration, operational security through version verification, soft locking, and checkpoints, and human-machine collaboration friendliness through user anchoring priority and semi-terminated states. Attached Figure Description
[0025] The accompanying drawings, as part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention, but do not constitute an undue limitation of the invention. Obviously, the drawings described below are merely some embodiments, and those skilled in the art can obtain other drawings based on these drawings without creative effort. In the drawings:
[0026] Figure 1 This is a flowchart of a context-aware agent interaction method in an arrangement application in some embodiments of the present invention;
[0027] Figure 2 for Figure 1 Flowchart of the sub-steps in step S110;
[0028] Figure 3 for Figure 1 Flowchart of the sub-steps in step S120;
[0029] Figure 4 for Figure 1 Flowchart of the sub-steps in step S130;
[0030] Figure 5 for Figure 1 Flowchart of the sub-steps in step S140;
[0031] Figure 6 for Figure 1 Flowchart of the sub-steps in step S150;
[0032] Figure 7 This is a schematic diagram of a three-ring model in some other embodiments of the present invention;
[0033] Figure 8 This is a schematic diagram of the system architecture in other embodiments of the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0035] Those skilled in the art should understand that the embodiments described below are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. These partial embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present invention.
[0036] The following reference Figures 1 to 8 This document provides a detailed description of the context-aware agent interaction method and system in some embodiments of the present invention for orchestration applications. Figure 1 This is a flowchart of a context-aware agent interaction method in an arrangement application in some embodiments of the present invention; Figure 2 for Figure 1Flowchart of the sub-steps in step S110; Figure 3 for Figure 1 Flowchart of the sub-steps in step S120; Figure 4 for Figure 1 Flowchart of the sub-steps in step S130; Figure 5 for Figure 1 Flowchart of the sub-steps in step S140; Figure 6 for Figure 1 Flowchart of the sub-steps in step S150; Figure 7 This is a schematic diagram of a three-ring model in some other embodiments of the present invention; Figure 8 This is a schematic diagram of the system architecture in other embodiments of the present invention.
[0037] This invention provides a context-aware agent interaction method for orchestration applications. When a user or system initiates an interaction request with the agent, the system first obtains the current real-time state of the graphical orchestration application, including the structural relationships of orchestration objects, parameter configurations, running status, and user selections. Instead of directly processing the massive amount of information in the entire orchestration graph, the agent dynamically prunes the information based on the focus of attention—what the user has selected and what the agent is currently doing—according to three layers: core circle, related circle, and background circle, injecting only the most relevant information into the agent's context window. Based on the pruned context, the agent understands the user's intent, plans the necessary operation steps, and selects appropriate orchestration manipulation tools and parameters for each step. The agent directly manipulates the orchestration graph by calling predefined orchestration manipulation tools to modify parameters, add / delete objects, adjust connections, and trigger execution, rather than simply providing text suggestions. After each operation, the orchestration graph is updated in real time, and the agent recalculates the focus of attention based on the updated state, continuing the next loop until the task is completed or terminated.
[0038] This invention eliminates the need for users to manually convert the canvas state into text prompts; its agent can directly obtain the real-time status of the orchestration application. Furthermore, the agent can not only view but also directly manipulate the orchestration graph, eliminating the need for users to perform secondary configuration as intermediaries or handle data transfers throughout the process.
[0039] like Figure 1 As shown, in some embodiments of the present invention, the context-aware agent interaction method in the orchestration application includes:
[0040] Step S110: In response to the Agent interaction request, obtain the real-time orchestration status of the graphical orchestration application; the real-time orchestration status includes at least the structure context, parameter context, execution context, and selection context.
[0041] Specifically, such as Figure 2As shown, step S110 includes:
[0042] Step S111: Initiate a status acquisition request based on the triggering mode.
[0043] The triggering modes include explicit user triggering mode, implicit agent triggering mode, and orchestration graph event triggering mode. Explicit user triggering mode: responds to user interaction commands initiated in the graphical orchestration application interface, such as clicking the AI assistant button, entering a dialogue message, or pressing a preset shortcut key. Implicit agent triggering mode: responds to trigger signals automatically generated by the system after the agent completes the previous orchestration operation. Orchestration graph event triggering mode: responds to significant changes to the orchestration graph due to external factors, such as modifications by other collaborators or triggering by scheduled tasks.
[0044] Step S112: Collect structural context, parameter context, execution context, and selection context data respectively.
[0045] The steps for acquiring the structural context are as follows: traverse all orchestration objects to obtain the unique identifier, type identifier, and display name of each object; traverse all data stream connections to obtain the source object identifier and output port, target object identifier and input port, and the type definition of the transmitted data for each connection; and calculate the in-degree and out-degree of each orchestration object.
[0046] The steps for collecting parameter context are as follows: traverse the parameter storage area of each orchestration object, read the current value of all configuration parameters and their metadata, and the metadata includes at least the value range, default value and whether it is required.
[0047] The steps for collecting the execution context are as follows: obtain the running status, execution progress, reference handle of the output result, and error information of each orchestration object, where the reference handle is a pointer to a memory or storage location rather than the output data itself.
[0048] The steps for collecting the selection context are: obtaining the list of arrangement objects selected by the user on the current canvas, canvas viewport information, and arrangement object data in the clipboard.
[0049] It should be noted that when the number of orchestration objects exceeds a preset threshold, a lazy loading strategy is adopted, and only the parameter context of orchestration objects in the current visible area or those related to the most recent user interaction is read.
[0050] Step S113: Assemble the collected structure context, parameter context, execution context, and selection context data into a unified structured data object. The structured data object contains at least four top-level fields: structure, parameters, execution, and selection. A monotonically increasing version number is appended to the structured data object.
[0051] Step S120: Dynamically prune the real-time orchestration state based on the focus of attention to obtain the pruned orchestration context. The focus of attention is determined by both user anchoring information and task inference information. Dynamic pruning is performed according to a three-circle model, such as... Figure 7 As shown, the orchestration objects are divided into core circles, related circles, and background circles, and different information granularities are assigned to the context windows of the Agent for orchestration objects in different circles.
[0052] Specifically, such as Figure 3 As shown, step S120 includes:
[0053] Step S121: Determine the focus of attention based on both user anchoring information and task inference information. When user anchoring information conflicts with task inference information, user anchoring information takes priority, and its weight decays over time. The focus of attention is the union of the orchestration objects corresponding to user anchoring information and the orchestration objects corresponding to task inference information.
[0054] User anchoring information includes: the list of arrangement objects selected by the user on the current canvas, objects on which the user's cursor hovers for more than a preset threshold, and arrangement objects identified by keyword matching in the user's dialogue input.
[0055] The task derivation information includes: the target object of the Agent's current operation step, the upstream and downstream objects that have a direct data dependency relationship with the target object, and the orchestration object in an error state and its upstream and downstream first-level objects.
[0056] Step S122: Centered on the focus of attention, divide all the arrangement objects in the arrangement diagram into three circles according to the three-circle model, so as to divide the arrangement objects into the core circle, the related circle and the background circle.
[0057] The core circle contains orchestration objects directly related to the current task, including all orchestration objects corresponding to the focus of attention and container elements containing the focus objects, i.e., the user-selected objects and the target objects of the Agent's current operation steps. All parameters and runtime states of the orchestration objects within the core circle are fully injected into the Agent context. The core circle has a first preset capacity limit; when this limit is exceeded, objects are retained based on their data dependency distance from the focus of attention. This first preset capacity limit can be set according to actual needs and is not specifically limited here.
[0058] The associated circle contains orchestration objects indirectly related to the core circle, including the direct data source and destination objects of the core circle objects, as well as elements spatially adjacent to the core circle objects. Orchestration objects within the associated circle only have their object type, identifier, key parameter values, and a summary of their connection relationships with the core circle injected. The associated circle extends one level upstream and downstream from each object in the core circle along the data flow direction to obtain orchestration objects; it also includes spatially adjacent objects located in the same grouping container or comment box as the core circle objects. The associated circle has a second preset capacity limit; when this limit is exceeded, data flow extension objects are prioritized. This second preset capacity limit can be set according to actual needs and is not specifically limited here.
[0059] The background circle contains orchestration objects other than the core circle and related circles, and only injects topology summary information. The topology summary includes the total number of objects, the statistical distribution by functional type, and a description of the overall data flow.
[0060] Step S123 assigns different information granularities to the orchestration objects in different circles. Specifically, complete information is injected into the core circle objects, including object metadata, all parameter key-value pairs, complete connection relationships, runtime status, and error details. Summary information is injected into associated circle objects, including object identifiers, key parameter values, connection relationships with the core circle, and status summaries. Statistical information is injected into the background circle, including the total number of objects, statistical distribution by function type, overall data flow description, and abnormal node index.
[0061] Step S124: Assemble the trimmed information into an orchestration context according to a preset structured template, and perform a token budget check on the orchestration context. When the preset token limit is exceeded, compress the summary information of the related circles first, and then compress the parameter information of the core circles, maximizing the information carried by each token and minimizing useless information. A version number is then appended to the orchestration context, consistent with the version number of the real-time orchestration status in step S113; the orchestration context is then injected into the Agent's context window.
[0062] In step S130, the Agent performs decision planning based on the trimmed orchestration context, and determines at least one orchestration operation to be executed, as well as the corresponding orchestration manipulation tool and tool parameters.
[0063] Specifically, such as Figure 4 As shown, step S130 includes:
[0064] In step S131, the Agent parses the user's intent based on the trimmed orchestration context, the user's current dialogue input, and the historical dialogue context to obtain a structured intent representation; the intent representation includes at least the operation goal, operation type, operation parameters, and operation order.
[0065] Step S132: Based on the intent representation, decompose the user instruction into an ordered list of atomic operation steps; each atomic operation step includes a step number, operation type, target object, and expected result description.
[0066] Step S133: For each atomic operation step, select the corresponding orchestration control tool from the predefined orchestration control tool set.
[0067] The orchestration and manipulation toolset includes at least parameter modification tools, object addition tools, object deletion tools, connection operation tools, and execution triggering tools. The decision-making factors for tool selection include: the current running status of the target object, the availability of the tools, and the security level of the operation.
[0068] The orchestration and manipulation tools include at least parameter modification tools, object addition tools, object deletion tools, connection operation tools, and execution trigger tools.
[0069] The execution of the parameter modification tool includes: parsing the standardized variable path, locating the target orchestration object, verifying the existence and type compatibility of the parameters, verifying the execution status of the target object, and if the target object is being executed, placing the modification operation into the waiting queue, executing the parameter modification and triggering the change event.
[0070] It should be noted that the input parameters of the orchestration manipulation tool are located based on the standardized variable path mentioned above. The format of the standardized variable path can be set to {object_id}.{type_key}.{field_name}, where object_id is the unique identifier of the orchestration object, type_key is the type identifier of the orchestration object, and field_name is the parameter name.
[0071] The execution of the object addition tool includes: verifying that the object type is a valid type supported by the orchestration engine, verifying the validity of the placement location, generating a unique identifier for the new object, creating an object instance and applying initial parameters, adding the new object to the orchestration graph and triggering a change event;
[0072] The execution of the object deletion tool includes: verifying the existence and execution status of the target object, simulating the topological integrity after deletion, and recording a deletion snapshot, disconnecting all connections, deleting the object and triggering change events if it is not a critical node;
[0073] The execution of the connection operation tool includes: verifying the existence of the source and target objects and the port, verifying data type compatibility, verifying circular dependencies, verifying port capacity, establishing or disconnecting the connection and triggering change events;
[0074] The execution of the trigger tool includes: verifying the execution scope and preconditions, submitting the execution task to the orchestration engine's execution scheduler, returning the execution submitted status, and continuously updating the node status in the execution context through an asynchronous mechanism.
[0075] Step S134: Fill in the tool parameters for the selected orchestration manipulation tool. The tool parameters come from one or more of the following: values explicitly specified in the user instructions, values already existing in the orchestration context, values generated by Agent inference, and system default values.
[0076] The tool parameter filling operation includes: converting the parameter values described in natural language into a standardized variable path format, converting the parameter values into the data type required by the target parameter, and calculating the canvas placement coordinates for adding object operations.
[0077] Step S135: Perform parameter verification on the tool call after filling in the parameters. Parameter verification includes at least type compatibility verification, value range verification, and mandatory field check.
[0078] Step S136: Assemble the list of atomic operation steps into a complete operation plan, and perform integrity checks and conflict detection on the operation plan. The operation plan includes at least a plan identifier, the version number of the orchestration context on which it is based, an ordered list of operation steps, and alternative strategies; conflict detection includes at least operation conflict detection, topology conflict detection, and execution conflict detection.
[0079] Step S137: When the operation plan includes preset high-risk operations, a summary of the operation plan is displayed to the user for confirmation before execution; preset high-risk operations include at least the operation of deleting orchestration objects and the operation of triggering full-graph execution.
[0080] In step S140, the Agent invokes the orchestration manipulation tool to perform orchestration operations on the orchestration objects in the graphical orchestration application.
[0081] Specifically, such as Figure 5 As shown, step S140 includes:
[0082] Step S141: Before performing the orchestration operation, the operation plan is preprocessed, including version verification, context locking, and checkpoint recording.
[0083] In some specific embodiments, the version verification step S1411 includes:
[0084] Step S14111: Before performing the orchestration operation, obtain the context version number carried in the operation plan as the first version number, and obtain the actual version number of the current orchestration diagram as the second version number.
[0085] Step S14112: Compare the first version number with the second version number.
[0086] In step S14113, if the first version number is equal to the second version number, then the version is determined to match, and the subsequent preprocessing steps are executed.
[0087] In step S14114, if the first version number is less than the second version number, the version is determined to be outdated, execution is stopped, and a version difference report is generated. The version difference report includes at least the change type, change object, change content, and change source that have occurred since the state corresponding to the first version number. The version difference report is sent to the Agent. The Agent discards the current operation plan and jumps to step S110 to obtain the latest real-time orchestration state. Based on the latest orchestration state, steps S120 to S130 are re-executed to generate a new operation plan. The new operation plan carries the second version number.
[0088] Step S14115: If the first version number is greater than the second version number, it is determined that the system is abnormal, the execution is stopped and the system abnormality log is recorded. The system abnormality log shall at least include the first version number, the second version number, the operation plan identifier and the timestamp.
[0089] It should be noted that the transmission chain of the first version number is as follows: in step S110, a monotonically increasing version number is appended to the obtained real-time orchestration status; in step S120, the same version number is appended to the trimmed orchestration context; in step S130, when the Agent generates an operation plan based on the orchestration context, the version number is written into the metadata of the operation plan; in step S140, the version number is read from the metadata of the operation plan as the first version number.
[0090] During the Agent's execution of a multi-step orchestration operation plan, a version check is performed before each orchestration step. If the orchestration diagram changes during an intermediate step, causing a version mismatch, it is checked whether the results of the already executed steps are still valid. If valid, subsequent steps are replanned based on the latest orchestration state; if invalid, the invalidated steps are re-executed.
[0091] When the system is in forced mode, the version mismatch verification result is ignored and the orchestration and manipulation tools are executed directly. Forced mode is explicitly enabled by the user, and the user is prompted of the risk of version mismatch when it is enabled.
[0092] In some specific embodiments, the context locking step includes: applying a soft lock to the target orchestration object involved in the operation step to prevent accidental modification during tool execution. Specifically, after version verification is passed, a soft lock is applied to the target orchestration object involved in the operation plan; the soft lock is characterized by the following: the locked object can be read and displayed, but cannot be modified by any write operation other than the current operation plan holder; the holder identifier of the soft lock is the plan identifier of the current operation plan; after the operation plan is executed, all applied soft locks are released.
[0093] In some specific embodiments, the checkpoint recording step includes: recording a full state snapshot of the current orchestration diagram as a rollback baseline before executing the first orchestration manipulation tool. Specifically, after version verification passes and context locking is successful, a full state snapshot of the current orchestration diagram is recorded as a rollback baseline before executing the first orchestration manipulation tool; the full state snapshot at least includes parameter key-value pairs, input / output connection relationships, runtime state, and canvas position coordinates of the target orchestration objects involved in the operation plan; the full state snapshot is stored in association with the planning identifier of the current operation plan.
[0094] Step S142: Following the sequence of steps in the operation plan, each orchestration control tool is executed one by one. The execution of each tool includes parameter verification, validity verification, operation execution, triggering change events, and returning execution results. Specifically, step S142 includes:
[0095] Step S1421: Perform parameter validation on the parameters passed in by the tool call.
[0096] Specifically, the parameter validation steps include: checking whether all required parameters have been provided, and returning a parameter missing error if any are missing; checking whether the type of the parameter value matches the data type defined in the target parameter, and returning a type error if they do not match; checking whether the parameter value is within the allowed value range defined in the target parameter, and returning a value range error if it exceeds the range; checking whether the format of the parameter value meets the requirements, including the standardized variable path format and coordinate format; and checking whether the orchestration object or field referenced by the parameter value exists in the current orchestration diagram.
[0097] Step S1422: Perform a validity check on the tool call in the current arrangement diagram state.
[0098] Specifically, the validity check executes different validation logic based on different tool types: For parameter modification tools, it checks whether the target orchestration object exists, whether the target parameter field exists, and whether the current running state of the target object is in a state that allows modification; for object addition tools, it checks whether the type of the object to be added is a valid type supported by the orchestration engine, and whether the placement position is within the effective range of the canvas and does not seriously overlap with existing objects; for object deletion tools, it checks whether the target orchestration object exists, whether the target object is currently being executed, and whether deletion will cause downstream nodes to lose necessary input and form a broken chain; for connection operation tools, it checks whether the source object and target object exist, whether the source output port and target input port exist, whether the data types of the two ends are compatible, whether establishing a connection will cause a circular dependency, and whether the target input port has been occupied; for execution trigger tools, it checks whether the execution range is valid, whether all necessary input data is ready, and whether an orchestration object is currently being executed.
[0099] It should be noted that parameter validation and the aforementioned validity validation are performed in the following order: parameter validation is performed first to verify whether the parameters passed to the tool call are valid; after parameter validation passes, validity validation is performed to verify whether the operation is valid in the current orchestration diagram state; if parameter validation fails, validity validation is not performed and parameter error information is returned directly; if validity validation fails, the operation is not performed and validity error information is returned directly.
[0100] Step S1423: After both parameter verification and validity verification pass, perform the orchestration operation to modify the state of the orchestration diagram.
[0101] Specifically, the execution operation performs different modification logic depending on the tool type: For parameter modification tools, the standardized variable path is parsed to locate the target orchestration object and target parameter field, and the new value is written to the target parameter field; if the target object is being executed, the modification operation is placed in a waiting queue and automatically applied after execution is complete; For object addition tools, a unique identifier for the new orchestration object is generated, an object instance is created and default parameters are loaded, the initial parameters passed in are applied to override the default values, the new object is placed at the specified coordinates, and the new object is registered to the orchestration engine's object manager; For object deletion tools, the complete information of the deleted orchestration object is recorded, all input and output connections related to the object are disconnected, and the object is removed from the orchestration graph's object manager; For connection operation tools, new connections are registered or existing connections are removed in the orchestration graph's connection manager; For execution triggering tools, the execution task is submitted to the orchestration engine's execution scheduler, the execution is returned as submitted, and the node status in the execution context is continuously updated through an asynchronous mechanism.
[0102] Step S1424: After the operation is completed, a change event is triggered to notify the orchestration engine and related module orchestration diagrams that a change has occurred.
[0103] Specifically, triggering change events includes: generating corresponding change events based on the type of tool being executed; change event types include parameter change events, object addition events, object deletion events, connection change events, and execution status change events; change events at least include event type, operation source identifier, operation planning identifier, execution timestamp, and change details; and distributing change events to the following listeners: the orchestration engine for updating the internal state model and incrementing the global version number, the graphical interface for refreshing the canvas display, the context management module for marking relevant caches as invalid, and the Agent context window for injecting change information for further decision-making.
[0104] Step S1425: Return the final result of the tool execution in a standardized format and inject it into the Agent's context window for the Agent to use in the next decision.
[0105] Specifically, returning the execution result includes: standardizing the execution result into a unified format, which at least includes the tool name, step number, execution status, result description, change details, and error information; when the execution is successful, returning a success status and change details, which at least includes a comparison of values before and after the modification, and specific information about the newly added object or connection; when the execution fails, returning a failure status and error information, which at least includes an error code, error description, and error details; and injecting the standardized execution result into the Agent's context window for use by the Agent in the next decision.
[0106] In some embodiments, when the orchestration control tool fails, a corresponding exception handling strategy is executed based on the error type: for recoverable errors, automatic retries are performed, with a maximum number of retries set to a preset value and an exponential backoff strategy used for the retry interval; for unrecoverable errors, a rollback operation is triggered. The rollback operation includes: locating the nearest execution checkpoint, reversing the successfully executed steps, restoring the orchestration graph to the checkpoint state, and notifying the Agent to re-perceive and re-plan.
[0107] In step S150, in response to the execution of the orchestration operation, the orchestration diagram of the graphical orchestration application is updated in real time, and the focus of attention is recalculated based on the updated orchestration diagram. Steps S120 to S150 are repeated until the termination condition is met.
[0108] The step S150, "in response to the execution of the orchestration operation, update the orchestration diagram of the graphical orchestration application in real time," includes: in response to the execution of the orchestration operation, identifying the change type of the orchestration diagram, where the change type includes at least parameter changes, object additions, object deletions, connection changes, state changes, and result changes; and updating the interface display of the graphical orchestration application and the internal orchestration state model in real time according to the change type, and incrementing the global version number of the orchestration state model.
[0109] Specifically, such as Figure 6 As shown, step S150, "recalculate the focus of attention based on the updated orchestration diagram, and repeat steps S120 to S150 until the termination condition is met," includes:
[0110] Step S151: Based on the updated orchestration diagram, recalculate the focus of attention and recalculate the dynamic migration of the focus of attention.
[0111] Dynamic migration is triggered after the Agent completes each orchestration operation step, driven by one or more of the following: operation result, new object, and error.
[0112] The operation result-driven approach involves shifting the focus from the object that has completed the operation to the target object of the next operation step along the data flow direction; after completing parameter modification, the focus is shifted one level downstream to the direct successor object; after execution triggering, the focus is shifted one level downstream to the output object, forming a positive migration path of "modification-execution-verification".
[0113] The new object-driven approach involves focusing on the newly added orchestration object, including its potential upstream and downstream objects, and gradually expanding upon them in subsequent connection establishment operations.
[0114] Error-driven mechanisms involve a reverse migration upstream along the data flow direction, bringing the direct upstream orchestration objects of the orchestration objects in an error state into the focus of attention, forming a reverse migration path of "discovering anomalies - tracing the root cause".
[0115] Step S152, the specific calculation process of dynamic migration includes:
[0116] Step S1521: Inherit the focus of attention from the previous cycle and modify the focus of attention based on the results of this orchestration operation. The modification includes transferring the operation target from the object that has completed the operation to the target object of the next operation step, adding new objects to the focus of attention, removing deleted objects from the focus of attention, and adding objects that have failed to execute to the focus of attention.
[0117] Step S1522: Expand the revised focus of attention according to the data flow propagation rules and error propagation rules;
[0118] Step S1523: Based on the expanded focus of attention, re-execute the three-concentric division to obtain a new core circle, related circle, and background circle.
[0119] The movement of the core circle triggers the coordinated updates of the related and background circles. Objects that originally belonged to the core circle in the previous round are downgraded in the new circle, while objects that originally belonged to the background circle in the previous round are upgraded in the new circle.
[0120] Step S1524: Assign an incrementing focus version number to the recalculated focus of attention and associate it with the global version number of the orchestration state model.
[0121] Step S153: Dynamic migration is constrained by boundary conditions of data flow boundary, task boundary, and user intervention boundary. Specifically, the data flow boundary is set so that the migration range does not exceed the topological range of the orchestration diagram; the task boundary is that the migration direction does not deviate from the current task objective; and the user intervention boundary is that when the user manually selects a new orchestration object during the migration process, the user's selection area overrides the automatic migration result.
[0122] It should be noted that the decision to trigger the next cycle is based on cycle triggering conditions, which include unexecuted steps in the operation plan, the agent actively requesting continuation, and user instructions containing tasks requiring multiple steps. The cycle triggering mode is selected based on the risk level of the operation, including automatic continuous mode, step-by-step confirmation mode, and hybrid mode. When the next cycle is triggered, the updated orchestration context is injected into the agent, and the cycle counter is incremented. The focus of attention in each cycle differs from the previous cycle, forming a focus evolution sequence that progresses step-by-step along the task execution path.
[0123] Step S154: Termination conditions include normal termination conditions and abnormal termination conditions. Normal termination conditions include all steps in the operation plan have been successfully executed, the user issues a termination command, and the Agent determines that the user's task objective has been achieved based on the orchestration context. Abnormal termination conditions include the Agent failing to execute consecutively more than a preset threshold, the loop count reaching a preset upper limit, the user manually interrupting the process, and the orchestration engine encountering an unrecoverable error. The steps that satisfy the termination conditions include: when the termination conditions are met, executing termination processing, which includes: releasing lock resources, clearing temporary checkpoints, generating an operation summary and displaying it to the user, and saving the complete record of this interaction to the dialogue history; when the termination conditions are not met but a pause is required, entering a semi-terminated state, saving the current operation progress, and waiting for the user to input a resume command before continuing execution from the pause point.
[0124] like Figure 8As shown, in other embodiments of the present invention, a context-aware agent interaction system for orchestration applications is provided, characterized in that it is capable of executing any of the context-aware agent interaction methods for orchestration applications described above.
[0125] The system includes: a state acquisition module, used to acquire the real-time orchestration state of the graphical orchestration application in response to Agent interaction requests; the real-time orchestration state includes at least structural context, parameter context, execution context, and selection context; a context trimming module, used to dynamically trim the real-time orchestration state based on the focus of attention to obtain the trimmed orchestration context; wherein the focus of attention is jointly determined by user anchoring information and task inference information; a decision planning module, used to enable the Agent to make decision planning based on the trimmed orchestration context, determining at least one orchestration operation to be executed and the corresponding orchestration manipulation tool and tool parameters; a tool execution module, used to enable the Agent to call the orchestration manipulation tool to perform orchestration operations on the orchestration objects in the graphical orchestration application, the orchestration manipulation tool including at least parameter modification tool, object addition tool, object deletion tool, connection operation tool, and execution trigger tool; and a closed-loop synchronization module, used to update the orchestration graph of the graphical orchestration application in real time in response to the execution of the orchestration operation, and recalculate the focus of attention based on the updated orchestration graph, repeatedly triggering the context trimming module, decision planning module, tool execution module, and closed-loop synchronization module until the termination condition is met.
[0126] In other embodiments of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a context-aware agent interaction method in the orchestration application described above.
[0127] In other embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, it can implement the context-aware agent interaction method in the orchestration application described above.
[0128] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, prediction models, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0129] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0130] Those skilled in the art will understand that this invention acquires the real-time status of the orchestration graph, determines the focus of attention based on user anchoring and task derivation, and dynamically trims the context according to the three-circle model. Then, the agent plans operations and selects tools based on the trimmed context, allowing the agent to directly call orchestration manipulation tools to modify orchestration objects. Finally, the orchestration graph is updated in real time and the focus of attention is recalculated. Repeated trimming and modification of orchestration objects forms an automated closed loop of "perception-decision-execution-feedback." This invention effectively solves the problems of lack of cross-system context awareness, lack of agent reverse-driving capability, and lack of multi-step iterative closed-loop synchronization mechanism caused by the isolation between existing graphical orchestration and agent dialogue systems. It enables the agent to natively perceive and directly manipulate the orchestration graph, forming an automated closed-loop execution, unifying the strong controllability of graphical orchestration with the high convenience of agent dialogue. Simultaneously, it ensures context economy through three-circle trimming and focus migration, ensures operational security through version verification, soft locking, and checkpoints, and ensures human-machine collaboration friendliness through user anchoring priority and semi-termination states.
[0131] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0132] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.
[0133] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-described technical content to create equivalent embodiments without departing from the scope of the present invention. The implementation schemes in the above embodiments can be further combined or replaced. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A context-aware agent interaction method for orchestration applications, characterized in that, include: Step S110: In response to the Agent interaction request, obtain the real-time orchestration status of the graphical orchestration application; The real-time orchestration state includes at least the structure context, parameter context, execution context, and selection context; Step S120: Dynamically prune the real-time orchestration state based on the focus of attention to obtain the pruned orchestration context; wherein, the focus of attention is determined jointly based on user anchoring information and task inference information; the dynamic pruning is performed according to the three-circle model, dividing the orchestration object into the core circle, the related circle and the background circle; Step S130: The Agent performs decision planning based on the trimmed orchestration context to determine at least one orchestration operation to be executed, as well as the corresponding orchestration manipulation tool and tool parameters. Step S140: Agent invokes the orchestration control tool to perform the orchestration operation on the orchestration object in the graphical orchestration application. The orchestration control tool includes at least a parameter modification tool, an object addition tool, an object deletion tool, a connection operation tool, and an execution trigger tool. In step S150, in response to the execution of the orchestration operation, the orchestration diagram of the graphical orchestration application is updated in real time, and the focus of attention is recalculated based on the updated orchestration diagram. Steps S120 to S150 are repeated until the termination condition is met.
2. The method according to claim 1, characterized in that, The step of obtaining the real-time orchestration status of the graphical orchestration application in response to the Agent interaction request includes: A status acquisition request is initiated based on a triggering mode; the triggering modes include user explicit triggering mode, Agent implicit triggering mode, and orchestration graph event triggering mode; Collect structure context, parameter context, execution context, and selection context data respectively; The collected structural context, parameter context, execution context, and selection context data are assembled into a unified structured data object. The structured data object contains at least four top-level fields: structure, parameters, execution, and selection. A monotonically increasing version number is appended to the structured data object.
3. The method according to claim 2, characterized in that, The steps of collecting structural context, parameter context, execution context, and selection context data respectively include: Acquire structural context: Traverse all orchestration objects to obtain the unique identifier, type identifier, and display name of each object; traverse all data stream connections to obtain the source object identifier and output port, target object identifier and input port, and data transmission type definition for each connection; calculate the in-degree and out-degree of each orchestration object; Collect parameter context: Traverse the parameter storage area of each orchestration object, read the current value of all configuration parameters and their metadata, the metadata including at least the value range, default value and whether it is required; Acquire execution context: Obtain the running status, execution progress, reference handles to output results, and error information for each orchestration object, where the reference handles are pointers to memory or storage locations rather than the output data itself; Acquire selection context: Obtain the list of arrangement objects selected by the user on the current canvas, canvas viewport information, and arrangement object data in the clipboard; When the number of orchestration objects exceeds a preset threshold, a lazy loading strategy is adopted, which only reads the parameter context of orchestration objects within the current visible area or those related to the most recent user interaction.
4. The method according to claim 1, characterized in that, The step of dynamically pruning the real-time orchestration state based on the focus of attention to obtain the pruned orchestration context includes: The focus of attention is determined by combining user anchoring information and task inference information; Centered on the aforementioned focus, all arrangement objects in the arrangement diagram are divided into concentric circles according to the three-circle model; Different information granularities are assigned to different layers of the arrangement objects; The clipped information is assembled into an orchestration context according to a preset structured template, and a token budget check is performed on the orchestration context. When the preset token limit is exceeded, the summary information of the association circle is compressed first, and then the parameter information of the core circle is compressed. A version number is added to the orchestration context, and the version number is consistent with the version number of the real-time orchestration state in step S110. Inject the orchestration context into the Agent's context window.
5. The method according to claim 4, characterized in that, The step of dividing all orchestration objects in the orchestration diagram into concentric circles according to the three-circle model, centered on the focus of attention, includes: the core circle contains orchestration objects directly related to the current task, including the user-selected object and the target object of the Agent's current operation step; the core circle has a first preset capacity limit, and when it exceeds the limit, objects closest to the focus of attention are retained based on their data dependency distance; the related circle extends one level upstream and downstream from each object in the core circle along the data flow direction to obtain orchestration objects; and spatially adjacent objects located in the same grouping container or annotation box as the core circle objects; the related circle has a second preset capacity limit, and when it exceeds the limit, data flow extended objects are retained first; the background circle contains orchestration objects outside the core circle and the related circle; and / or... The step of assigning different information granularities to orchestration objects in different circles includes: injecting complete information into the core circle object, the complete information including object metadata, all parameter key-value pairs, complete connection relationships, runtime status, and error details; injecting summary information into the associated circle object, the summary information including object identifier, key parameter values, connection relationships with the core circle, and status summary; and injecting statistical information into the background circle, the statistical information including the total number of objects, statistical distribution by functional type, overall data flow description, and abnormal node index.
6. The method according to claim 1, characterized in that, The Agent performs decision planning based on the trimmed orchestration context, determining at least one orchestration operation to be executed, along with the corresponding orchestration manipulation tool and tool parameters. This includes the following steps: Based on the trimmed orchestration context, the user's current dialogue input, and the historical dialogue context, the Agent parses the user's intent to obtain a structured intent representation; the intent representation includes at least the operation goal, operation type, operation parameters, and operation order; Based on the stated intent, the user instruction is decomposed into an ordered list of atomic operation steps; each atomic operation step includes at least a step number, operation type, target object, and expected result description. For each atomic operation step, a corresponding orchestration control tool is selected from a predefined orchestration control toolset; the orchestration control toolset includes at least parameter modification tools, object addition tools, object deletion tools, connection operation tools, and execution triggering tools; Fill in the tool parameters for the selected orchestration manipulation tool; the tool parameters are derived from one or more of the following: values explicitly specified in the user instructions, values already existing in the orchestration context, values generated by Agent inference, and system default values; Perform parameter validation on tool calls after filling in the parameters; the parameter validation includes at least type compatibility validation, value range validation, and mandatory field check. The list of atomic operation steps is assembled into a complete operation plan, and the operation plan is subjected to integrity checks and conflict detection. The operation plan includes at least a plan identifier, the version number of the orchestration context on which it is based, an ordered list of operation steps, and a backup strategy. The conflict detection includes at least operation conflict detection, topology conflict detection, and execution conflict detection. When the operation plan includes preset high-risk operations, a summary of the operation plan is displayed to the user for confirmation before execution; the preset high-risk operations include at least the operation of deleting orchestration objects and the operation of triggering full-graph execution.
7. The method according to claim 1, characterized in that, The steps of the Agent invoking the orchestration manipulation tool to perform the orchestration operation on the orchestration object in the graphical orchestration application include: Before performing orchestration operations, the operation plan is preprocessed, including version verification, context locking, and checkpoint recording. The version verification step includes: before performing the orchestration operation, obtaining the context version number carried in the operation plan as a first version number, and obtaining the actual version number of the current orchestration diagram as a second version number; comparing the first version number and the second version number; if the first version number is equal to the second version number, a version match is determined, and other preprocessing steps continue; if the first version number is less than the second version number, a version lag is determined, execution is stopped, and a version difference report is generated, the version difference report containing at least... The system includes the type, object, content, and source of changes since the state corresponding to the first version number. The version difference report is sent to the Agent, which discards the current operation plan and proceeds to step S110 to re-obtain the latest real-time orchestration state. Based on the latest orchestration state, steps S120 to S130 are re-executed to generate a new operation plan, which carries the second version number. If the first version number is greater than the second version number, a system anomaly is identified, execution is stopped, and a system anomaly log is recorded. The system anomaly log includes at least the first version number, the second version number, the operation plan identifier, and a timestamp. Following the steps in the operation plan, each orchestration and control tool is executed one by one. The execution of each tool includes parameter verification, legality verification, execution of operation, triggering of change events, and return of execution results. The execution results of each orchestration and manipulation tool are standardized into a unified format, and the execution results are injected into the context window of the Agent for use in the next decision. The unified format includes at least the tool name, step number, execution status, change description, and error message. When the orchestration control tool fails, the corresponding exception handling strategy is executed according to the error type: for recoverable errors, automatic retry is performed, with the maximum number of automatic retries being a preset value and the retry interval adopting an exponential backoff strategy; for unrecoverable errors, a rollback operation is triggered; wherein, the rollback operation includes: locating the nearest execution checkpoint, reversing the successfully executed operation steps, restoring the orchestration graph to the checkpoint state, and notifying the Agent to re-perceive and plan.
8. The method according to claim 1, characterized in that, The step of recalculating the focus of attention based on the updated orchestration diagram includes: Based on the updated orchestration diagram, the focus of attention is recalculated, and the recalculation includes the dynamic migration of the focus of attention; The dynamic migration is triggered after the Agent completes each orchestration operation step, driven by one or more of the following: operation result-driven, new object-driven, and error-driven. Specifically, the operation result-driven migration involves shifting the focus of attention from the object that has completed the operation to the target object of the next operation step along the data flow direction; after parameter modification, shifting downstream one level to the direct successor object; and after execution triggering, shifting downstream one level to the output object. The new object-driven migration involves focusing on the newly added orchestration object and including its potential upstream and downstream objects in the focus of attention. The error-driven migration involves shifting upstream in the reverse direction along the data flow direction, including the direct upstream orchestration objects of the orchestration object in an error state in the focus of attention. The dynamic migration calculation process includes: inheriting the focus of attention from the previous cycle and correcting the focus of attention based on the results of the current orchestration operation; expanding the corrected focus of attention according to data flow propagation rules and error propagation rules; re-executing the three-layer division based on the expanded focus of attention to obtain a new core circle, associated circle, and background circle; wherein, the movement of the core circle drives the linked update of the associated circle and the background circle, the orchestration objects that originally belonged to the core circle of the previous cycle are downgraded in the new circle, and the orchestration objects that originally belonged to the background circle of the previous cycle are upgraded in the new circle; assigning an incrementing focus version number to the recalculated focus of attention and associating it with the global version number of the orchestration state model; The dynamic migration is constrained by boundary conditions of data flow boundaries, task boundaries, and user intervention boundaries.
9. The method according to claim 1, characterized in that, The termination conditions include normal termination conditions and abnormal termination conditions; The normal termination conditions include: all steps in the operation plan have been successfully executed, the user issues a termination command, and the Agent determines that the user's task objective has been achieved based on the orchestration context; the abnormal termination conditions include: the Agent fails to execute continuously for more than a preset threshold, the number of loops reaches a preset upper limit, the user manually interrupts the process, and the orchestration engine encounters an unrecoverable error. The steps for satisfying the termination condition include: When the termination conditions are met, termination processing is performed, which includes: releasing lock resources, clearing temporary checkpoints, generating an operation summary and displaying it to the user, and saving the complete record of this interaction to the dialogue history. When the termination conditions are not met but a pause is required, the system enters a semi-terminated state, saves the current operation progress, and waits for the user to input a resume command before continuing execution from the pause point.
10. A context-aware agent interaction system for orchestration applications, characterized in that, The system is capable of executing the context-aware agent interaction method in the orchestration application according to any one of claims 1 to 9; the system comprises: The status acquisition module is used to obtain the real-time orchestration status of the graphical orchestration application in response to Agent interaction requests; the real-time orchestration status includes at least the structure context, parameter context, execution context, and selection context; The context pruning module is used to dynamically prune the real-time orchestration state based on the focus of attention to obtain the pruned orchestration context; wherein, the focus of attention is jointly determined by user anchoring information and task inference information; The decision planning module enables the Agent to make decisions and plans based on the trimmed orchestration context, and to determine at least one orchestration operation to be executed, as well as the corresponding orchestration manipulation tool and tool parameters. The tool execution module is used to enable the Agent to call the orchestration control tool to perform the orchestration operation on the orchestration object in the graphical orchestration application. The orchestration control tool includes at least a parameter modification tool, an object addition tool, an object deletion tool, a connection operation tool, and an execution trigger tool. The closed-loop synchronization module is used to respond to the execution of the orchestration operation, update the orchestration diagram of the graphical orchestration application in real time, recalculate the focus of attention based on the updated orchestration diagram, and repeatedly trigger the context pruning module, the decision planning module, the tool execution module and the closed-loop synchronization module until the termination condition is met.