A tool invocation intelligent agent navigation and evolution method based on a global state graph
Patent Information
- Application Number
- CN202611151599.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-06
AI Technical Summary
Existing tools for calling intelligent agents suffer from low execution reliability, coarse granularity of experience reuse, lack of dynamic closed-loop verification, and weak generalization ability in long-term tasks, resulting in fragility and uncontrollability when facing open and dynamically changing environments.
A navigation and evolution method based on global state graphs is adopted. By constructing an offline graph stage and an online dynamic execution stage, and using static skeleton parsing, dynamic state mining and global graph weaving modules, unstructured data is transformed into a structured directed graph, realizing the explicit causal logic, and the environment feedback is perceived in real time during the execution process to establish a closed-loop control mechanism.
It effectively avoids negative migration, enables high-precision experience reuse, has strong constraints on closed-loop control, suppresses illusions and instruction deviations, provides controlled self-evolution, gives the agent a global sense of position, enables dynamic replanning, and improves the reliability and robustness of long-term task execution.
Smart Images

Figure CN123050476A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer science, and more specifically, to a tool-invoking agent navigation and evolution method based on a global state graph. Background Technology
[0002] Existing tools that invoke structured memory generation strategies for intelligent agents include the following: 1) Hierarchical and tree-like structure Recursively decomposing long-range, complex task instructions is a common method to improve the planning capabilities of intelligent agents. Under this strategy, the original execution trajectory is divided into multiple consistent sub-task units. The entire task execution process is organized into a hierarchical tree topology: a) Root node: Represents the overall goal of the task; b) Intermediate nodes: represent the sub-goals or phased intentions after decomposition; c) Leaf nodes: Correspond to specific atomic actions or executable skills; This structure can significantly reduce the complexity of task representation, enabling agents to select the most appropriate level of abstraction from the hierarchical memory for knowledge retrieval and transfer based on the granularity of the current goal.
[0003] 2) State Machines and Topologies To address the uncertainties of long-running tasks executing in open environments, some solutions incorporate automata theory, modeling the task execution logic as an explicit finite state machine (FSM) or a directed graph structure. This strategy decouples the optimization space into macroscopic and microscopic dimensions. a) Macro-flow topology: The logical jump rules between action nodes are defined by the transfer function, forming the overall skeleton of task execution.
[0004] b) Micro-node capabilities: Define specific execution instructions or tool invocation criteria within each state node.
[0005] This topological storage method establishes clear behavioral boundaries for agents. Through atomic operations on the graph structure (such as adding states, deleting redundant nodes, or modifying transition conditions), the system can dynamically adjust the execution flow for specific queries, thereby improving the logical stability in complex research tasks.
[0006] 3) Chained and key-value pair structures For experiential information with strong temporal correlation or specific attribute association, intelligent agents often use more sophisticated infrastructure for storage: a) Chain structure: Primarily used to record operation sequences with a strict logical order. It abstracts the execution trajectory into continuous step nodes, ensuring the continuity of action execution when reusing experience.
[0007] b) Key-value pair structure: This focuses on storing attribute mappings or constraint relationships between entities. Typical applications include recording the association between specific objects and common storage locations, or configuration information between API parameters and calling scenarios.
[0008] However, existing structured memory generation strategies have the following drawbacks: Existing tools for invoking agent-based structured memory generation strategies are generally limited by a "passive accumulation" paradigm, treating memory as a static, single-level storage archive. This mechanism directly leads to the abstract reuse dilemma in causal logic: while fine-grained execution details can provide guidance, they are prone to overfitting to specific environments, while highly abstract knowledge, although generalizable, lacks concrete operability and is difficult to guide the completion of long-term tasks.
[0009] Because such strategies mostly rely on predefined hierarchical decomposition or fixed finite state machine topologies, the system exhibits significant vulnerability when faced with open and dynamically changing query paths. This rigidity causes memory entries to often become disconnected "execution islands," capable of retrieval only through semantic similarity and unable to adjust the execution flow according to dynamic changes in task progress. In long-duration tasks, this deficiency further evolves into a lack of awareness of the environmental state, causing the agent to easily "blindly replicate" past successes without being able to verify intermediate results or check for potential conflicting constraints during execution.
[0010] Ultimately, this lack of closed-loop control and utility filtering mechanisms not only makes the memory bank prone to being filled with invalid "toxic noise," but also causes the agent to fall into an irreversible error loop when encountering execution deviations or environmental shifts due to a lack of quantitative judgment on the degree of similarity between the current state and the target state, making it difficult to summarize a truly universal methodology from cross-task experience.
[0011] Existing intelligent agent self-evolution technologies include the following: 1) Non-binding prompts and code rewriting This strategy grants the meta-agent a high degree of freedom, allowing it to directly rewrite the system prompts or underlying tool code of the executing agent based on feedback from the execution results. A typical approach is feedback-driven modification, where the system uses the trajectory of task failures as context to guide the model to identify logical flaws and autonomously correct related instructions. Another approach is a recursive modification mechanism, where the agent continuously synthesizes new tools or updates its scaffolding during deployment to cope with more complex task scenarios.
[0012] 2) Structured self-evolution mechanism To enhance the controllability of the evolution process, some technical solutions explicitly decouple the evolution space, focusing on optimizing the logical topology and specific execution behavior of the task. This is achieved by dynamically adjusting the execution path through predefined atomic operations such as "adding nodes," "deleting nodes," or "modifying transition conditions" performed on finite state machines or directed graph structures.
[0013] 3) Experience-driven evolution and refinement This strategy focuses on driving the agent's capability evolution through closed-loop updates of the memory system. By learning metacognitive skills, "how to abstract memory" is treated as a learnable metacognitive skill. A specialized memory management model is trained using reinforcement learning algorithms to generate abstract strategies that maximize the success rate of downstream tasks. The system continuously tracks the frequency of memory item retrieval and its actual contribution to success, autonomously adding effective success patterns and repairing inefficient or outdated experiences, thereby maintaining a high-quality, self-evolving experience pool. After task failure, a self-reflection mechanism is triggered to explore alternatives; only after a successful retry is the relevant lesson learned permanently stored.
[0014] However, the drawbacks of existing agent self-evolution technology are: First, the excessive freedom of unconstrained prompts and code rewriting techniques directly leads to the uncontrollability and instability of execution logic in the causal chain. Due to the lack of clear action boundaries and behavioral constraints, this "black box" global rewriting is prone to causing core instruction deviations and functional module damage, causing the agent to experience severe illusions or logical collapses during the evolution process, often resulting in the system's performance increasing rather than decreasing during self-correction.
[0015] Secondly, while the structured self-evolutionary mechanism improves stability by introducing finite state machines and atomic operations, its evolutionary efficiency is highly dependent on the accuracy of the critique mechanism. In the absence of external objective standards, if the critique module itself exhibits judgment bias or illusion, the evolutionary process will lose its correct feedback anchor, causing the agent to fall into an incorrect evolutionary path or converge to a local optimum. Furthermore, the predefined set of atomic operations may exhibit logical rigidity when facing extremely complex variant tasks, making it difficult to cover all potential execution bottlenecks through limited topology adjustments.
[0016] Finally, while pursuing memory quality, experience-driven evolution and refinement techniques incur significant computational overhead and evaluation lag. To construct preference supervision signals and perform metacognitive training, the system needs to generate and evaluate a large number of candidate abstractions offline, significantly increasing training costs. Simultaneously, this mechanism heavily relies on "Large Model-as-a-Judge" (LLM-as-a-Judge) for memory verification, which may make it difficult for the system to detect subtle quality deviations or logical flaws. More fundamentally, these techniques still require manually designed strategies to select appropriate memory abstraction levels, limiting the system's fully automated end-to-end adaptive capabilities in complex scenarios.
[0017] Existing knowledge and skills reuse technologies include: After an agent has accumulated and structured its experience, effectively extracting and reusing this knowledge is key to improving its long-term task processing capabilities. Current reuse technologies primarily focus on shifting from mechanical retrieval of static content to more flexible capability transfer.
[0018] 1) Content-level reuse based on semantic matching The system uses the vector representation of task instructions to search the experience pool for the most semantically similar historical trajectory, subtask or execution step. By matching the overlap between the current query and the stored scenario, it retrieves relevant successful experiences and injects the retrieved original trajectory or structured knowledge as a Few-shot example into the prompt words to guide the execution agent to imitate the past successful path.
[0019] 2) Adaptive reuse based on hierarchical abstraction To address the issue of "overfitting" between experience and new environments, existing technologies are beginning to employ abstract reuse strategies with varying granularities. The system organizes memory at multiple levels, from concrete "episodic memory" to abstract "semantic memory." Based on the similarity between the new task and historical tasks, the reuse granularity is dynamically selected: tasks with high similarity reuse fine-grained step details, while tasks with low similarity reuse higher-level strategy guidance. Retrieved experience is not directly reused but processed through reordering and adaptive rewriting modules, preserving core logic while adapting to the specific constraints and tool parameters of the current task.
[0020] 3) Metacognitive-based transfer and ability reuse When faced with entirely new tasks for which there are no matching records in the experience pool, the focus of reuse shifts from "knowledge content" to "management capabilities." Some solutions decouple "task execution" from "memory management," training specialized memory tools so that, in cases of extreme distribution shifts, the agent does not reuse specific trajectories but instead transfers metacognitive abilities such as "how to abstract, reflect on, and organize tasks."
[0021] However, the drawbacks of existing agent self-evolution technology are: First, the excessive freedom of unconstrained prompts and code rewriting techniques directly leads to the uncontrollability and instability of execution logic in the causal chain. Due to the lack of clear action boundaries and behavioral constraints, this "black box" global rewriting is prone to causing core instruction deviations and functional module damage, causing the agent to experience severe illusions or logical collapses during the evolution process, often resulting in the system's performance increasing rather than decreasing during self-correction.
[0022] Secondly, while the structured self-evolutionary mechanism improves stability by introducing finite state machines and atomic operations, its evolutionary efficiency is highly dependent on the accuracy of the critique mechanism. In the absence of external objective standards, if the critique module itself exhibits judgment bias or illusion, the evolutionary process will lose its correct feedback anchor, causing the agent to fall into an incorrect evolutionary path or converge to a local optimum. Furthermore, the predefined set of atomic operations may exhibit logical rigidity when facing extremely complex variant tasks, making it difficult to cover all potential execution bottlenecks through limited topology adjustments.
[0023] Finally, while pursuing memory quality, experience-driven evolution and refinement techniques incur significant computational overhead and evaluation lag. To construct preference supervision signals and perform metacognitive training, the system needs to generate and evaluate a large number of candidate abstractions offline, significantly increasing training costs. Simultaneously, this mechanism heavily relies on "Large Model-as-a-Judge" (LLM-as-a-Judge) for memory verification, which may make it difficult for the system to detect subtle quality deviations or logical flaws. More fundamentally, these techniques still require manually designed strategies to select appropriate memory abstraction levels, limiting the system's fully automated end-to-end adaptive capabilities in complex scenarios.
[0024] Existing application models and user-interacting agents suffer from technical problems when performing long-range tasks involving tool calls, including low execution reliability, coarse-grained experience reuse, lack of dynamic closed-loop verification, and weak generalization ability. Specifically, these include: 1. Lack of fault tolerance and recovery mechanisms in decision-making: Existing intelligent agents rely excessively on single-inference judgments from large language models when predicting API calls and execution order. Once the model deviates in complex logical chains, the lack of effective error correction and recovery mechanisms leads to extremely high uncontrollability in task execution.
[0025] 2. The granularity of experience reuse is too large and lacks flexibility: Existing technologies mainly retrieve and reuse execution trajectories through the semantic similarity of task instructions. This reuse mode remains at the "task-level." This makes it difficult for agents to transfer knowledge to similar sub-goals or atomic steps in different tasks, reducing the efficiency of experience utilization.
[0026] 3. Lack of intermediate state verification and constraint verification: When reusing historical successful trajectories, the agent tends to "blindly replicate" and lacks a real-time verification mechanism for intermediate execution results. It is also unable to check potential conflict constraints during execution, thereby increasing the risk of task failure due to environmental changes or path dependence.
[0027] 4. Lack of awareness of task progress and closed-loop control: When encountering execution errors, the agent is prone to getting stuck in an ineffective "error loop." The core reason is that the system lacks a quantitative assessment of how close the current state is to the target state, and cannot adjust its execution strategy according to the dynamic changes in task progress.
[0028] 5. Staticization and Cross-Task Generalization Bottlenecks in the Experience Base: Existing execution trajectory experience pools are typically static and isolated, lacking connections between entries. Due to over-reliance on the context of specific tasks, the system cannot extract and summarize general operational methodologies from cross-task execution trajectories, resulting in knowledge failing to be distilled into general capabilities. Summary of the Invention
[0029] The purpose of this disclosure is to provide a tool-invoking intelligent agent navigation and evolution method based on a global state graph. This method aims to address the logical fragility and parameter illusion problems of large language models in long-term tasks by making causal logic explicit. Specifically, it includes: achieving a paradigm shift from passive accumulation to active state navigation, resolving the "abstract reuse dilemma"; establishing a real-time intermediate result verification and closed-loop constraint verification mechanism to eliminate the risks associated with "blindly replicating" successful trajectories; providing a controlled self-evolution framework with objective feedback anchor points, utilizing the global state graph as an objective reference coordinate for intelligent agent evolution; achieving high-precision experience reuse from "semantic-driven" to "logic-driven" approaches, perceiving the underlying physical logic differences of the task; and constructing a dynamic replanning and recovery mechanism with "positional awareness" to address the lack of positional awareness in long-term tasks.
[0030] In one general aspect, a tool-calling agent navigation and evolution method based on a global state graph is provided. Its characteristic is that it is applied to cross-application interactive code generation and API joint scheduling scenarios. For natural language instructions input by users, the system executes user instructions through two stages: an offline graph construction stage and an online dynamic execution stage, and finally outputs executable code containing multi-application API control flow and operation feedback for complex digital tasks.
[0031] The offline graph construction phase utilizes three core modules—a static skeleton parsing module, a dynamic state mining module, and a global graph weaving module—to work collaboratively to transform unstructured interactive data into a structured directed graph. ; The static skeleton parsing module generates two types of basic nodes and two types of constraint edges by parsing the original API document. Specifically, it creates function nodes for each API interface and parameter nodes by parsing the input parameters of each API interface; it establishes parameter requirement edges between functions and parameters based on the function signature; and it extracts the parameter nodes. Demand semantic vector and candidate function nodes The return value is a semantic vector, which is then aligned using a multidimensional semantic alignment function. Calculate the weights that depend on the data source If and only if Greater than the preset dependency graph threshold At that time, and Establish directed data source dependency edges between them; The formula for calculating the multidimensional semantic alignment function is: In the formula, Use the Sigmoid activation function; and Parameters Demand description feature embedding and function The return value describes the feature embedding; and It is a learnable nonlinear projection matrix; The scaling dimension of the feature space; Indicates parameters Expected data format probability distribution AND function Output data format probability distribution The relative entropy between them is used to measure the rigidity of data type matching; and This refers to the hyperparameter adjustment coefficient; This is a structure connectivity indicator function based on the global API namespace.
[0032] The dynamic state mining module inputs the raw API observations from the historical trajectory into the LLM and abstracts them, summarizing the unstructured return information into discrete state nodes. It then labels each state node with a semantic description and category, providing anchor points for subsequent weaving. Extract current API raw observations semantic feature encoding And calculate its relationship with each state node in the global candidate state set. State representation center semantic assignment fitness When fitness When the maximum value is greater than the preset state assignment threshold, the observation is assigned to the corresponding discrete state node; otherwise, the observation is extracted and initialized as a new discrete state node; wherein, the semantic assignment fitness... The calculation formula is: In the formula, To control the Gaussian kernel width parameter of the receptive field in the feature space; This represents the total number of currently dynamically maintained discrete state nodes. The L2 norm distance of the feature vectors; This is a penalty term for intent divergence based on a large language model, used to quantify observations. Implicit feedback intent and state nodes The probability of logical conflicts between standard semantic descriptions; Adjust the weights for the preset divergence.
[0033] The global graph weaving module inputs the raw API observations from the historical trajectory into the LLM. First, it establishes effect-aware edges from function nodes to state nodes. It analyzes the historical trajectory using a conditional probability function with a time decay factor, calculating the effect transfer weights from function nodes to discrete state nodes and defining the consequences of actions. Second, it establishes precondition edges from state nodes to the next function node. By introducing a Markov transition expectation formula weighted with expert trajectory success rates, it analyzes the payoff distribution of different functions executed subsequently in a specific state, defining the driving logic of the state on subsequent actions, including sequential execution after success and recovery strategies after failure. Further, the transfer weights of the effect-aware edges... Transition weights with precondition edges The calculation formulas are as follows: In the formula, This is the currently executing function node; These are the discrete state nodes that have been summarized. For the next candidate function node; It is an indicator function; and They are historical time steps The generated raw observations and the executed action functions; This is a time decay constant used to assign higher confidence weights to recent expert trajectories; This represents the total time step of the historical trajectory; In the state The next function is called immediately after it occurs. Statistical frequency; For the set of candidate functions; An adjustment coefficient to balance local experience frequency and global benefits; In the distribution of historical trajectories The expected value of the following; To execute long-range trajectories The global cumulative reward signal that ultimately achieves the goal; when the transfer weight exceeds the preset edge construction threshold, the physical edge construction operation is completed between the corresponding nodes.
[0034] The online dynamic execution phase constructs a closed-loop architecture of intent prediction, state awareness, tactical navigation, and qualitative execution. The specific operation process includes three stages: intent anchoring and data flow diffusion, state awareness-driven tactical navigation loop, and graph state evolution and context anchoring. The intent anchoring and data flow diffusion stage first utilizes an API Predictor to perform semantic analysis on user commands, predicting the initial set of functions required to complete the task. The API Predictor, by comparing the dense semantic features of the commands with the representation vectors of candidate functions in the graph, calculates the intent matching probability to filter initial functions. Then, starting from the initial function set, a breadth-first search is performed along the data dependency edges in the graph. Through iterative calculation of dependency closures, all necessary data source functions are automatically identified and loaded into the candidate toolset. Further, the initial function set... Prediction calculation formula and candidate toolset The specific recognition and loading algorithm is as follows: (1) Initial intent prediction formula (API Predictor implementation): In the formula, It is the set of all available functions in the global graph; The task intent feature vector is the output of the encoder from the user's instructions. Candidate functions Functional description representation vector; For cross-modal or cross-space semantic alignment parameter matrix; The dimension of the vector features; The preset initial intent trigger threshold.
[0035] (2) Dependency closure identification and expansion algorithm (automatic identification and loading implementation): Initialize candidate toolset and at the set maximum search depth Within, the following topological state transition equations are used for... Layer toolset iterative expansion: In the formula, For execution function The required set of parameter nodes; This represents a global static graph built offline. In, there exist parameter nodes Pointing to the data source function node Legitimate data dependency edges. When iterating to the point where the set no longer expands (i.e., ... (or reach maximum depth) The search terminates at this time, and the final output is... This is a complete set of candidate tools for loading the system into the large model context.
[0036] The state-aware driven tactical navigation loop phase maps environmental feedback into three states—success, hard failure, and soft failure—through real-time perception, and triggers differentiated topology navigation strategies: If a successful state is detected, the system uses inertial logic to query the high-frequency subsequent operations pointed to by the precondition edges and generate guidance suggestions. If a hard block is detected, such as permission denial, authentication failure, or illegal operation, the system determines that the current environment does not meet the execution conditions. At this time, the current intention is immediately blocked, and the system backtracks along the graph to find the missing hard preconditions and forcibly generates the highest priority task that can repair the environment. If a soft block is detected, such as no result, an empty list, or a query mismatch, the system determines that the action is heterogeneous but has not achieved the expected result. At this time, it should check whether the input parameters of the action come from the wrong dependency and query the recovery edges in the graph to recommend alternative paths. In the graph state evolution and context anchoring stage, the current abstract state node is instantiated into a concrete memory node, the real data generated by the execution is written into the data vault associated with the graph, the current state pointer of the system is officially migrated to the newly generated node, and the subsequent path is dynamically unfolded; the updated graph state and data context become the new starting point for the next round of navigation loop.
[0037] The data pipeline process in the offline graph construction phase is as follows: First, the parser traverses the unified API definition document to extract standardized function signatures and parameter constraints, and uses a large model to extract data dependency edges between function nodes and parameter nodes. Next, the abstraction of the dynamic state space is introduced, employing a function-centric generative abstraction strategy. The original observations generated by the same function in the historical interaction trajectory are used as input corpus to the LLM. Through semantic analysis, the LLM summarizes the chaotic natural language feedback into discrete state nodes with clear business semantics, and labels them as success, hard failure, and soft failure based on the nature of the execution result. Its key feature is the automatic construction of prompt words based on dynamic retrieval of comparative samples. The specific calculation steps are as follows: for the currently input original observations... The system first extracts its dense semantic vectors through a pre-trained text encoder. Subsequently, from the pre-configured offline seed state library, three categories of sets were selected: success, hard failure, and soft failure. It calculates and retrieves typical historical samples that are semantically most similar to the current observation, and dynamically assembles them into structured cue words with in-context learning capabilities. Finally, the assembled prompt words are input into a large language model for conditional probability generation; wherein, the structured prompt words... The automatic constructor function is represented as: In the formula, This is a string sequential concatenation operator; Metasystem instructions for defining abstract tasks and boundary conditions; A predefined set of state categories; To belong to category A high-quality manually labeled seed sample library; Candidate samples from the seed bank; This involves forcing the large language model to output a JSON-formatted constraint template containing discrete state node IDs and category labels. Based on this dynamic prompt, the large language model outputs the maximum conditional probability. The structured results. Finally, the system instantiates the graph through causal topology weaving. By analyzing the temporal co-occurrence probability of states and actions in historical trajectories, two types of key connections are established between nodes: one is the effect perception edge connecting the function and the state, which defines the consequences of the action; the other is the precondition edge connecting the state and the subsequent function, which defines the inertial path after success or the recovery strategy after failure. Ultimately, all nodes and edges are serialized into a causal graph file in JSON format, serving as the core knowledge base for inference in the online system.
[0038] The data dynamic flow process in the online dynamic execution phase is as follows: When the user's natural language instruction is received, the API Predictor first predicts the core intent function; then, the system activates the data dependency edges in the graph, performs a reverse data flow search starting from the core function, and automatically pulls all necessary data source functions. After entering the execution loop, the data flow enters the real-time state perception and mapping stage. Whenever the API execution generates raw observations, they are no longer discarded directly. Instead, the state classifier is called to load the effect perception edge of the function as a candidate label. When encountering novel states that were not captured in the offline phase during execution, or when discovering implicit causal relationships between functions, these newly generated state nodes and causal connections are written into the global graph in real time.
[0039] The technical effects to be achieved by the embodiments of the present invention are as follows: This invention fundamentally overcomes the limitations of existing large-scale intelligent agents in long-range tasks by constructing an intelligent agent navigation and evolution system based on a global state graph. Specifically, it includes: 1. Effectively avoid "negative transfer" and achieve high-precision reuse of experience. Existing technologies heavily rely on the surface text or vector semantic similarity of task instructions for matching. Once the environmental state changes slightly, it is easy to retrieve historical trajectories whose logic is not applicable, causing the agent to blindly imitate and triggering "negative transfer." This invention utilizes offline extracted functions, parameters, and discretized states to construct a global graph, changing the basis for reuse from "semantics" to the "logical" consistency of the underlying objective physical state.
[0040] Therefore, even when the environment shifts, the agent can accurately perceive the differences in the underlying physical logic through graph nodes, precisely align and locate the correct experience entry point, effectively avoiding the occurrence of negative transfer.
[0041] 2. Break the "ineffective error cycle" and achieve closed-loop control with strong constraints. Existing intelligent agents lack intermediate state verification and constraint verification mechanisms, making them prone to getting stuck in an infinite loop of blind retries when encountering deviations. This invention introduces a state-aware driven tactical navigation loop. After each API execution step, the system no longer directly discards the observations, but instead maps them to predefined SUCCESS, HARD_FAILURE, or SOFT_FAILURE state nodes in the graph. When a hard failure is encountered (such as permission denial), the system immediately uses the graph to backtrack and forcibly issues a task to repair the environment.
[0042] This real-time comparison mechanism based on the "truth graph" eliminates the risks of blind replication, enabling the agent to have real-time closed-loop control capabilities and significantly improving the reliability of long-term task execution.
[0043] 3. Suppress "illusions" and instruction deviations, providing controlled and stable self-evolution. Existing agent self-evolution techniques often employ unconstrained code or prompt word rewriting, lacking objective anchor points and easily leading to logical collapse and systemic illusions. This invention transforms the evolutionary process into incremental completion and correction of the global state graph topology. "Novel states" or "new recovery paths" discovered by the agent during operation are written as physical facts into the graph's data vault.
[0044] Evolution is no longer a black-box, random rewriting, but rather an accumulation of objective knowledge based on the results of physical execution. This provides the agent with stable feedback anchors, effectively suppresses illusions, and ensures that the evolutionary process converges to the optimal execution logic.
[0045] 4. Eliminate the "tool missing" problem during cold starts and prevent parameter illusions. In the early stages of complex task planning, large models are prone to missing necessary data acquisition steps during single inference. The offline system of this invention uses static semantic analysis to pre-determine the data dependency edges between parameters and source functions; during online execution, the system performs a reverse breadth-first search along the dependency edges to automatically retrieve all necessary data source functions.
[0046] This ensures that the agent is forced to load a complete toolchain as soon as it receives contextual prompts, thus eliminating the problems of missing tools and parameter forgery (parameter illusion) caused by oversights in large models at the physical operation boundary.
[0047] 5. Give the agent a global "sense of location" to achieve navigation-level dynamic replanning. Existing task-level memory leads to a lack of quantitative assessment of the proximity of the current state to the target by the agent. This invention realizes a paradigm shift from passive accumulation to active graph navigation. By instantiating abstract state nodes during execution and migrating the current state pointer, the system can mark its own position in a three-dimensional directed graph in real time.
[0048] When the execution path deviates, the agent does not need to simply roll back and retry. Instead, it can search for a remedial path in real time based on the precondition edges and recovery edges of the graph, realizing navigation-level dynamic path replanning, which greatly enhances the robustness in dealing with varied and complex tasks. Attached Figure Description
[0049] The above and other objects and features of this disclosure will become clearer from the following description taken in conjunction with the accompanying drawings.
[0050] Figure 1 This is a schematic diagram illustrating the architecture of a tool-invoking agent navigation and evolution method based on a global state graph according to an embodiment of the present disclosure; Figure 2 This is a schematic diagram illustrating a data pipeline architecture constructed from an offline graph according to an embodiment of the present disclosure; Figure 3 This is a schematic diagram illustrating the architecture of an offline graph construction module and an online dynamic execution module according to an embodiment of the present disclosure. Detailed Implementation
[0051] The following detailed embodiments are provided to aid the reader in gaining a comprehensive understanding of the methods, apparatus, and / or systems described herein. However, various changes, modifications, and equivalents of the methods, apparatus, and / or systems described herein will become apparent upon understanding this disclosure. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but may be changed as will become clear upon understanding this disclosure, except for operations that must occur in a specific order. Furthermore, for clarity and conciseness, descriptions of features known in the art may be omitted.
[0052] The features described herein may be implemented in different forms and should not be construed as limited to the examples described herein. Rather, the examples described herein are provided only to illustrate some of the many feasible ways of implementing the methods, apparatus, and / or systems described herein, which will become clear upon understanding the disclosure of this application.
[0053] As used herein, the term “and / or” includes any one of the associated listed items and any combination of any two or more.
[0054] Although terms such as “first,” “second,” and “third” may be used herein to describe various components, assemblies, regions, layers, or parts, these components, assemblies, regions, layers, or parts should not be limited by these terms. Rather, these terms are used only to distinguish one component, assembly, region, layer, or part from another. Thus, without departing from the teaching of the examples described herein, the first component, first assembly, first region, first layer, or first part referred to as the first component, first assembly, first region, first layer, or first part may also be referred to as the second component, second assembly, second region, second layer, or second part.
[0055] In the specification, when an element (such as a layer, region, or substrate) is described as being "on" another element, "connected to," or "bonded to" another element, the element may be directly "on" another element, directly "connected to," or "bonded to" the other element, or one or more other elements may be present in between. Conversely, when an element is described as being "directly on" another element, "directly connected to," or "directly bonded to" another element, no other elements may be present in between.
[0056] The terminology used herein is for the purpose of describing various examples only and is not intended to limit disclosure. Unless the context clearly indicates otherwise, the singular form is intended to include the plural form as well. The terms “comprising,” “including,” and “having” indicate the presence of the described features, quantities, operations, components, elements, and / or combinations thereof, but do not preclude the presence or addition of one or more other features, quantities, operations, components, elements, and / or combinations thereof.
[0057] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains upon understanding this disclosure. Unless expressly defined herein, terms (such as those defined in a general dictionary) shall be interpreted as having a meaning consistent with their meaning in the context of the relevant field and in this disclosure, and shall not be interpreted in an idealized or overly formalistic manner.
[0058] Furthermore, in the description of the examples, detailed descriptions of well-known related structures or functions will be omitted when it is believed that such detailed descriptions would lead to a vague interpretation of this disclosure.
[0059] Figure 1 This is a schematic diagram illustrating a tool-invoking agent navigation and evolution method based on a global state graph according to an embodiment of the present disclosure.
[0060] To achieve the aforementioned objectives, the system's entire lifecycle consists of two phases: an offline graph construction phase and an online dynamic execution phase. Its overall logical architecture is as follows: Figure 1 As shown.
[0061] Offline map construction phase: The core objective of the offline graph construction phase of the system is to extract "expert experience" from massive historical trajectory data and construct a neural symbolic knowledge graph that includes an operation space, a state space, and causal logic. This system transforms unstructured interactive data into a structured directed graph through the collaborative work of three core modules. The specific structure is shown in Table 1: Static skeleton parsing module: This module is responsible for establishing the physical operation boundaries of the agent. By parsing the original API documentation, the system automatically generates two types of basic nodes and two types of constraint edges: creating a function node for each API interface and creating a parameter node by parsing its input parameters. Based on the function signature, a connection is established between the function and its parameters. Edges are established by static semantic analysis to create data source dependency edges between parameter nodes and potential source function nodes. This effectively prevents parameter illusions during runtime.
[0062] Dynamic State Mining Module: This module aims to build the perception layer of the agent. It utilizes LLM to abstract the raw API observations from historical trajectories. Unstructured return information is summarized into discrete state nodes, and each state node is labeled with a semantic description and category, providing anchors for subsequent weaving.
[0063] Global Graph Weaving Module: This module establishes key causal connections in the graph by analyzing the success and failure logic of historical tasks. The first step is to perceive the weaving edges. ,Establish The edge is executed by analyzing historical trajectories. Observations were produced First, define the consequences of the action; second, weave the decision-making process. ,Establish The edges, through analysis in the state The expert then executed the function. The sequence pattern defines the driving logic of the state for subsequent actions, including sequential execution after success and recovery strategy after failure.
[0064] Table 1. Offline Causal Graph Metadata Definition Table Online dynamic execution phase: Unlike the linear trial-and-error model of the traditional ReAct framework, this system constructs a closed-loop architecture of "intent prediction - state awareness - tactical navigation - qualitative execution". This architecture utilizes the topological structure of the graph, preserving the flexibility of semantic planning for large models while strongly intervening in the execution path through symbolic causal logic. The specific operational process includes three core stages: Intent Anchoring and Data Flow Diffusion Phase: This phase aims to address the "tool deficiency" problem during task cold start, ensuring the agent has complete data acquisition capabilities from the initial planning stage. The system first uses the API Predictor to perform semantic analysis on user commands, predicting the initial set of functions required to complete the task. Starting with this initial set, the system performs a breadth-first search along data dependency edges in the graph. The system automatically identifies and loads all necessary data source functions into the candidate toolset. This mechanism ensures that even if the LLM neglects the data acquisition step (e.g., forgetting to call the search interface), the system can still force the provision of the tools needed to generate that parameter in the context window, achieving automated expansion from a "single-point intent" to a "complete toolchain."
[0065] State-aware tactical navigation loop: The system maps environmental feedback into three states—SUCCESS, HARD_FAILURE, and SOFT_FAILURE—through real-time perception, and triggers differentiated topology navigation strategies accordingly. If a successful state is detected, the system uses inertial logic to query the high-frequency subsequent operations pointed to by the precondition edge and generate guidance suggestions.
[0066] If a hard block is detected, such as permission denial, authentication failure, or illegal operation, the system determines that the current environment does not meet the execution conditions. At this time, the current intention is immediately blocked, and the system traces back along the graph to find the missing hard prerequisites and forcibly generates the highest priority task that can repair the environment.
[0067] If the system detects soft obstacles such as no results, an empty list, or a query mismatch, and determines that the action is heterogeneous but does not meet expectations, it should check whether the input parameters of the action come from the wrong dependents, and at the same time query the recovery edges in the graph to recommend alternative paths.
[0068] The graph state evolution and context anchoring phase: This phase is responsible for solidifying the execution results in the physical world into a dynamic context in the symbolic world, providing factual basis for the next round of planning. The system instantiates the current abstract state node into a concrete memory node. At this time, the real data generated by the execution is written into the data vault associated with the graph, completing the binding from logical symbols to physical facts. The system's current state pointer is officially migrated to the newly generated node, and the subsequent path unfolds dynamically accordingly. The updated graph state and data context become the basis for the next round of navigation loop. This mechanism ensures that each decision made by the agent is not isolated, but based on a complete causal trajectory paved with real interaction data.
[0069] Summary of system operating characteristics: The core advantage of this system lies in establishing a "perception-driven dynamic programming" paradigm. By constructing a unified global state graph, the system achieves a leap from traditional "semantic similarity matching" to "graph-based topology navigation." The agent no longer mechanically reuses discrete experience but possesses real-time state localization capabilities. When environmental deviations are perceived, it can utilize the causal logic of the graph to achieve navigation-level path replanning and self-recovery, thereby ensuring the robustness and logical closure of complex long-range tasks.
[0070] Data processing flow: The entire process is divided into two phases in terms of time sequence: offline construction and online execution. The offline phase focuses on "refining" the original API definitions and interaction trajectories into a structured causal graph to establish the knowledge base of the system. The online phase focuses on using the graph for real-time state perception and data injection to achieve the logical closed loop of the neural symbol system.
[0071] Offline graph construction data pipeline: pipeline mode such as Figure 2 As shown, the primary task of offline data processing is to construct the static physical skeleton of the graph. The system first traverses a unified API definition document using a parser to extract standardized function signatures and parameter constraints. During this process, the system utilizes a large model to extract data dependency edges between function nodes and parameter nodes. This step establishes the physical operational boundaries of the agent and locks in the legitimate source paths of parameter data before code execution, laying the foundation for subsequent logic weaving.
[0072] After establishing the static skeleton, the system enters the abstraction phase of the dynamic state space. The system employs a "function-centric generative abstraction" strategy, using thousands of raw observations generated by the same function in historical interaction trajectories as input to the large model. Through semantic analysis, LLM summarizes the chaotic natural language feedback into discrete state nodes with clear business semantics, and labels them as SUCCESS, HARD_FAILURE, or SOFT_FAILURE based on the nature of the execution result. This process reduces the infinite unstructured feedback to a finite set of symbolic states, endowing the graph with the ability to discriminate environmental outcomes.
[0073] Finally, the system instantiates the graph through causal topological weaving. By analyzing the temporal co-occurrence probabilities of "states" and "actions" in historical trajectories, the system establishes two types of key connections between nodes: first, effect-aware edges connecting functions and states, defining the consequences of actions; and second, precondition edges connecting states and subsequent functions, defining the inertial path after success or the recovery strategy after failure. Ultimately, all nodes and edges are serialized into a JSON-formatted causal graph file, serving as the core knowledge base for the online system's reasoning.
[0074] Data flow in online neural symbolic interaction: Data processing in the online phase begins with intent triggering and context expansion. When the system receives a user's natural language command, the API Predictor first predicts the core intent function. Subsequently, the system activates data dependency edges in the graph, performing a reverse data flow search starting from the core function to automatically retrieve all necessary data source functions. These prediction results, together with the extended toolset, constitute a complete Prompt Context input model, ensuring that the agent has the necessary tools to obtain data from the initial planning stage, thus solving the problem of tool deficiency during cold start.
[0075] After entering the execution loop, the data flow proceeds to the real-time state awareness and mapping stage. Whenever the API execution generates raw observations, the system no longer discards them directly. Instead, it calls the state classifier, loading the effect-aware edges of the function as candidate labels. Through LLM semantic alignment, unstructured observation text is mapped in real-time to unique state node IDs. This symbolic state ID then flows into the system's tactical navigator, triggering logical reasoning based on precondition edges to generate dynamic tactical guidance information, thereby driving the agent to correct its path or continue advancing.
[0076] The final link in the data loop is the dynamic evolution and incremental update of the graph topology. This process breaks through the limitations of static graphs, allowing the system to modify the graph structure in real time based on actual interaction results during runtime. When an agent encounters novel states not captured in the offline phase or discovers implicit causal relationships between functions during execution, the system writes these newly generated state nodes and causal connections into the global graph in real time. This mechanism solidifies immediate execution experience into long-term symbolic knowledge, not only correcting potential cognitive biases in offline graph construction but also ensuring that the graph can continuously improve itself as the task progresses, achieving dynamic growth from "predefined knowledge" to "practical experience."
[0077] Implementation process of each functional module: The core of this system consists of an offline map construction module and an online dynamic execution module, and its specific implementation process is as follows: Figure 3 As shown.
[0078] (1) Implementation process of each functional module The overall goal of the offline phase is to transform unstructured historical trajectories and static API documentation into directed graphs containing precise causal logic. .
[0079] 1. Implementation of the static skeleton parsing module: Step 1: Function and Parameter Node Extraction. The system parses the standard API documentation and extracts the function signatures. A function node is instantiated for each individual executable API. At the same time, extract the required input fields for this API and instantiate them as parameter nodes.
[0080] Step 2: Constructing constraint edges. In the corresponding... and Establish parameter requirement edges between , which represents the parameter constraints that must be satisfied to execute the function.
[0081] Step 3: Dependency Edge Extraction. Utilizing the static semantic analysis capabilities of Large Language Models (LLMs) or predefined type matching rules, analyze the input-output mapping relationships between different APIs. In the parameter nodes... With potential source function nodes that can generate this parameter Establish data dependency edges between .
[0082] 2. Implementation of the dynamic state mining module: Step 1: Observation aggregation. Collect historical interaction trajectory data, group them according to the target function called, and aggregate the massive amount of raw environmental observations generated by each function.
[0083] Step 2: Generative Abstract Clustering. Centered on a function, text observations of the same category are input into a large language model for semantic induction. LLM extracts unstructured long texts into discrete state nodes with clear business semantics. .
[0084] Step 3: Qualitative labeling of states. This involves labeling the extracted state nodes. The data is categorized into three types: SUCCESS (success), HARD_FAILURE (hard failure, such as permission denied), and SOFT_FAILURE (soft failure, such as empty query results).
[0085] 3. Implementation of the Global Atlas Weaving Module Step 1: Effect-aware edge weaving. Analyze historical trajectories and statistically analyze the execution of specific functions. Each state is then generated. The probability distribution. For high-frequency co-occurrence combinations, an effect-aware edge is established in the graph. (Right now ), which defines the objective consequences of an action.
[0086] Step 2: Precondition edge weaving. Analyze the specific state. The expert then proceeded to the next function. The sequence pattern. Establish precondition edges. (Right now This solidifies the inertial execution logic after success or the recovery strategy logic after failure.
[0087] Step 3: Graph Serialization. This will include... and The entire topology structure is serialized and stored.
[0088] (2) Implementation of the online dynamic execution module: The online phase is a neural symbolic closed-loop system that includes "intent prediction, state perception, tactical navigation, and qualitative execution".
[0089] Intent anchoring and data stream diffusion implementation Step 1: Core Intent Prediction. The system receives natural language commands from the user, analyzes the ultimate purpose of the current task through the API Predictor, and matches the core initial function set in the graph.
[0090] Step 2: Breadth-first search diffusion. Starting from the core function node, expand along the data dependency edges. Perform a reverse breadth-first search (BFS).
[0091] Step 3: Toolchain Assembly. Automatically capture all prerequisite data source functions required for the core function to run, and encapsulate them together with the core function into a complete toolset injected into the large model, thereby solving the problem of missing tools during the cold start phase.
[0092] (3) Implementation of state-aware tactical navigation loop: Step 1: Real-time State Mapping. After the agent executes a function, it obtains the raw feedback text. The system calls the state classifier and loads the associated states from the graph. Edges and their candidate state nodes Use LLM to align the current text to a unique, exact ID.
[0093] Step 2: Topology navigation and replanning.
[0094] Successful branch: If the mapping result is SUCCESS, the system queries the precondition edge. Provide LLM with priority recommendations for subsequent high-frequency operations.
[0095] Hard blocking branch: If mapped to HARD_FAILURE (e.g., authentication failure), the system forcibly blocks the current plan, backtracks along the graph to find the missing system-level preconditions, and issues the highest priority instruction to repair the environment.
[0096] Soft blocked branch: If the mapping is SOFT_FAILURE (if no matching data is available), the system checks the validity of the parameter source and provides alternative execution paths along the recovery edge.
[0097] Graph state evolution and context anchoring implementation: Step 1: Data Binding and Pointer Migration. Instantiate the current abstract state node and write the executed and verified real data (such as specific IDs, tokens, etc.) into the graph's data context, completing the binding from the symbolic space to the physical world. Then, migrate the system's global "current state pointer" to this new node.
[0098] Step 2: Incremental graph update. During execution, if the agent encounters a "novel state" not covered by the offline library, or explores an effective "new recovery path", the system will update the new nodes and edges to the global graph in real time, realizing the continuous growth and self-evolution of the graph driven by real interactions.
[0099] Terminology Explanation: English abbreviations and common technical terms: LLM (Large Language Model): A natural language processing model based on deep learning, used in this invention for tasks such as generative abstract clustering (dynamic state mining) and online semantic alignment of raw observations.
[0100] API (Application Programming Interface): The conventions for connecting different components of a software system; in this invention, it refers to the external tools or function interfaces called by an intelligent agent.
[0101] FSM (Finite State Machine): A computational model that represents a finite number of states and behaviors such as transitions and actions between these states. Existing technologies often use it to explicitly model task execution logic.
[0102] SIT-Graph (State Integrated Tool Graph): A multi-round tool invocation framework in the prior art, which uses an active evaluation mechanism to determine whether it is necessary to call a summary tool to extract the current state and integrate it into the tool edge.
[0103] ReAct (Reasoning and Acting): A traditional agent task execution framework that typically employs a large model to perform a linear "think-act-observe" trial-and-error process.
[0104] BFS (Breadth-First Search): A graph traversal algorithm. In the online execution phase of this invention, the algorithm searches backward along the data dependency edges starting from the core function node to automatically pull and assemble the preceding toolchain.
[0105] Key proprietary terms of this invention: Global State Graph: The core neural symbolic knowledge graph built offline by this system transforms unstructured interactive data into a structured directed graph, which includes an operation space, a state space, and causal logic. It serves as the knowledge foundation for realizing online topology navigation.
[0106] Function Node: One of the basic nodes in the graph, representing executable API operation primitives.
[0107] Parameter Node: One of the basic nodes in the graph, representing the input slots required for API calls.
[0108] State Node: One of the basic nodes in the graph, referring to the clustering of results abstracted from the original observations through semantic induction of the large model, and possessing clear business semantics.
[0109] Parameter Requirement Edge: A constraint edge in the graph that connects function nodes and parameter nodes, representing the parameter structure required for function execution.
[0110] Data Dependency Edge: A constraint edge in the graph that connects a parameter node to a potentially legitimate source function node. It represents the static legitimate source of the parameter value and is used to prevent parameter illusion.
[0111] Effect Perception Edge: A woven edge in the graph that connects an action (function) to the state it produces, defining the objective consequences of the action.
[0112] Precondition Edge: A woven edge in the graph that connects the state to the subsequent actions (functions) it triggers, solidifying the inertial execution logic after success or the recovery strategy logic after failure.
[0113] HARD_FAILURE: One of the status categories, referring to a blocked state where the current environment does not meet the execution conditions due to permission denial, authentication failure, illegal operation, etc., and the system must forcibly block and backtrack to repair the situation. SOFT_FAILURE: One of the status categories, referring to a blocked state where actions such as no result, empty list, and query mismatch are executed successfully, but the business logic does not meet expectations.
[0114] SUCCESS: One of the state categories, referring to the state where the action was successfully executed and triggered the inertial logic to recommend subsequent high-frequency operations.
[0115] Negative transfer refers to the phenomenon where existing technologies rely excessively on the surface text or vector semantic similarity matching of instructions. When the environmental state changes slightly, the system is very likely to retrieve historical trajectories that are not logically applicable and blindly imitate them, resulting in the complete failure of task execution.
[0116] Parameter Hallucination: The phenomenon where an agent, in the early stages of planning, neglects to acquire data due to a single inference step in a large model, and thus fabricates API input parameters out of thin air.
[0117] API Predictor: In an online dynamic execution system, this module receives user natural language instructions, predicts the final goal of the current task through semantic analysis, and matches the core set of initial functions in the graph.
[0118] While some embodiments of this disclosure have been shown and described, those skilled in the art will understand that modifications may be made to these embodiments without departing from the principles and spirit of this disclosure, which are defined by the claims and their equivalents.
Claims
1. A method for tool-invoking intelligent agent navigation and evolution based on a global state graph, characterized in that, In response to natural language commands input by the user, the system executes the user commands through two phases: an offline graph construction phase and an online dynamic execution phase, and finally outputs feedback on the task.
2. The tool-invoking agent navigation and evolution method based on a global state graph as described in claim 1, characterized in that, The offline graph construction phase utilizes three core modules—a static skeleton parsing module, a dynamic state mining module, and a global graph weaving module—to work collaboratively to transform unstructured interactive data into a structured directed graph. ; The static skeleton parsing module generates two types of basic nodes and two types of constraint edges by parsing the original API document. Specifically, it creates function nodes for each API interface and parameter nodes by parsing the input parameters of each API interface; it establishes parameter requirement edges between functions and parameters based on the function signature; and it extracts the parameter nodes. Demand semantic vector and candidate function nodes The return value is a semantic vector, which is then aligned using a multidimensional semantic alignment function. Calculate the weights that depend on the data source If and only if Greater than the preset dependency graph threshold At that time, and Establish directed data source dependency edges between them; The formula for calculating the multidimensional semantic alignment function is: In the formula, Use the Sigmoid activation function; and Parameters Demand description feature embedding and function The return value describes the feature embedding; and It is a learnable nonlinear projection matrix; The scaling dimension of the feature space; Indicates parameters Expected data format probability distribution AND function Output data format probability distribution The relative entropy between them is used to measure the rigidity of data type matching; and This refers to the hyperparameter adjustment coefficient; This is a structure connectivity indicator function based on the global API namespace.
3. The tool-invoking agent navigation and evolution method based on a global state graph as described in claim 2, characterized in that, The dynamic state mining module inputs the raw API observations from the historical trajectory into the LLM and abstracts them, summarizing the unstructured return information into discrete state nodes. It then labels each state node with a semantic description and category, providing anchor points for subsequent weaving. Extract current API raw observations semantic feature encoding And calculate its relationship with each state node in the global candidate state set. State representation center semantic assignment fitness When fitness When the maximum value is greater than the preset state assignment threshold, the observation is assigned to the corresponding discrete state node; otherwise, the observation is extracted and initialized as a new discrete state node; wherein, the semantic assignment fitness... The calculation formula is: In the formula, To control the Gaussian kernel width parameter of the receptive field in the feature space; This represents the total number of currently dynamically maintained discrete state nodes. The L2 norm distance of the feature vectors; This is a penalty term for intent divergence based on a large language model, used to quantify observations. Implicit feedback intent and state nodes The probability of logical conflicts between standard semantic descriptions; Adjust the weights for the preset divergence.
4. The tool-calling agent navigation and evolution method based on a global state graph as described in claim 3, characterized in that, The global graph weaving module inputs the raw API observations from the historical trajectory into the LLM. First, it establishes effect-aware edges from function nodes to state nodes. It analyzes the historical trajectory using a conditional probability function with a time decay factor, calculating the effect transfer weights from function nodes to discrete state nodes and defining the consequences of actions. Second, it establishes precondition edges from state nodes to the next function node. By introducing a Markov transition expectation formula weighted with expert trajectory success rates, it analyzes the payoff distribution of different functions executed subsequently in a specific state, defining the driving logic of the state on subsequent actions, including sequential execution after success and recovery strategies after failure. Further, the transfer weights of the effect-aware edges... Transition weights with precondition edges The calculation formulas are as follows: In the formula, This is the currently executing function node; These are the discrete state nodes that have been summarized. For the next candidate function node; It is an indicator function; and They are historical time steps The generated raw observations and the executed action functions; This is the time decay constant, used to assign higher confidence weights to recent expert trajectories; This represents the total time step of the historical trajectory; In the state The next function is called immediately after it occurs. Statistical frequency; For the set of candidate functions; An adjustment coefficient to balance local experience frequency and global benefits; In the distribution of historical trajectories The expected value of the following; To execute long-range trajectories The global cumulative reward signal that ultimately achieves the goal; when the transfer weight exceeds the preset edge construction threshold, the physical edge construction operation is completed between the corresponding nodes.
5. The tool-invoking agent navigation and evolution method based on a global state graph as described in claim 4, characterized in that, The online dynamic execution phase constructs a closed-loop architecture of intent prediction, state awareness, tactical navigation, and qualitative execution. The specific operation process includes three stages: intent anchoring and data flow diffusion, state awareness-driven tactical navigation loop, and graph state evolution and context anchoring. The intent anchoring and data flow diffusion stage first utilizes an API Predictor to perform semantic analysis on user commands, predicting the initial set of functions required to complete the task. The API Predictor, by comparing the dense semantic features of the commands with the representation vectors of candidate functions in the graph, calculates the intent matching probability to filter initial functions. Then, starting from the initial function set, a breadth-first search is performed along the data dependency edges in the graph. Through iterative calculation of dependency closures, all necessary data source functions are automatically identified and loaded into the candidate toolset. Further, the initial function set... Prediction calculation formula and candidate toolset The specific recognition and loading algorithm is as follows: (1) API Predictor implementation, constructing the initial intent prediction formula: In the formula, It is the set of all available functions in the global graph; The task intent feature vector is the output of the encoder from the user's instructions. Candidate functions Functional description representation vector; For cross-modal or cross-space semantic alignment parameter matrix; The dimension of the vector features; The preset initial intent trigger threshold; (2) Automatic loading is achieved by relying on closure recognition and extension algorithms: Initialize candidate toolset and at the set maximum search depth Within, the following topological state transition equations are used for... Layer toolset iterative expansion: In the formula, To execute the function The required set of parameter nodes; This represents a global static graph built offline. In, there exist parameter nodes Pointing to the data source function node Legitimate data depends on edges; when Or reach maximum depth The search terminates at that time, and the final output is This is a complete set of candidate tools that can be loaded into the large model context.
6. The tool-invoking agent navigation and evolution method based on a global state graph as described in claim 5, characterized in that, The state-aware driven tactical navigation loop phase maps environmental feedback into three states—success, hard failure, and soft failure—through real-time perception, and triggers differentiated topology navigation strategies: If a successful state is detected, use inertial logic to query the high-frequency subsequent operations pointed to by the precondition edges and generate guidance suggestions; if a hard block such as permission denial, authentication failure, or illegal operation is detected, determine that the current environment does not meet the execution conditions, immediately block the current intent, backtrack along the graph to find the missing hard preconditions, and forcibly generate the highest priority task that can repair the environment; if a soft block such as no result, empty list, or query mismatch is detected, determine that the action is heterogeneous but did not meet expectations, then check whether the input parameters of the action come from the wrong dependency, and at the same time query the recovery edges in the graph to recommend alternative paths. In the graph state evolution and context anchoring stage, the current abstract state node is instantiated into a concrete memory node, the real data generated by the execution is written into the data vault associated with the graph, the current state pointer is officially migrated to the newly generated node, and the subsequent path unfolds dynamically accordingly. The updated graph state and data context become the basis for the next navigation loop.
7. The tool-invoking agent navigation and evolution method based on a global state graph as described in claim 6, characterized in that, The data pipeline process in the offline graph construction phase is as follows: First, the parser traverses the unified API definition document to extract standardized function signatures and parameter constraints, and uses a large model to extract data dependency edges between function nodes and parameter nodes. Next, we move into the abstraction phase of the dynamic state space, adopting a generative abstraction strategy centered on functions, using the original observations generated by the same function in the historical interaction trajectory as the corpus input to the large model; LLM uses semantic analysis to summarize chaotic natural language feedback into discrete state nodes with clear business semantics, and labels them as success, hard failure, and soft failure according to the nature of the execution result. Finally, the graph is instantiated through causal topology weaving. By analyzing the temporal co-occurrence probability of states and actions in historical trajectories, two types of key connections are established between nodes: one is the effect perception edge connecting the function and the state, which defines the consequences of the action; the other is the precondition edge connecting the state and the subsequent function, which defines the inertial path after success or the recovery strategy after failure. Ultimately, all nodes and edges are serialized into a causal graph file in JSON format, serving as the core knowledge base for online reasoning.
8. The tool-calling intelligent agent navigation and evolution method based on a global state graph as described in claim 6, characterized in that, The data dynamic flow process in the online dynamic execution phase is as follows: When the user's natural language instruction is received, the API Predictor first predicts the core intent function; Subsequently, the data dependency edges in the graph are activated, and a reverse data flow search is performed starting from the core function to automatically pull all necessary data source functions; After entering the execution loop, the data flow enters the real-time state perception and mapping stage. Whenever the API execution generates raw observations, they are no longer discarded directly. Instead, the state classifier is called to load the effect perception edge of the function as a candidate label. When encountering novel states that were not captured in the offline phase during execution, or when discovering implicit causal relationships between functions, these newly generated state nodes and causal connections are written into the global graph in real time.
