A business scenario-oriented agent automatic generation system
Patent Information
- Application Number
- CN202611346069.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]然而,上述现有技术仍存在明显的不足
1.本发明提供的一种面向业务场景的智能体自动生成系统及方法,通过多模态业务需求语义解析、领域知识图谱驱动的场景自适应策略生成、基于能力图谱匹配的智能体自动装配、运行时执行效能参数与资源争用冲突的实时监测,以及基于监测结果生成的双向调整信号对智能体自动构建阶段的能力接口匹配优先序和场景自适应阶段的策略参数进行协同反馈,形成了从设计态到执行态再到设计态的双向闭环优化机制。该机制一方面通过将接口响应延迟、令牌消耗速率和结果准确率等实际执行效能参数与预设基准阈值的偏差比率量化为各能力接口的惩罚系数,以修正余弦相似度匹配得分的方式动态压低劣化能力接口在后续匹配中的优先序,从而抑制性能衰减因素对智能体生成质量的持续影响;另一方面通过将资源争用冲突类型与冲突规则库匹配后,以交叉注意力机制将备用补偿策略模板中的并发控制参数与当前生成策略参数进行深度融合,生成兼具场景适配特性和资源竞争应对能力的增强型生成策略,使后续生成的智能体在执行过程中具备主动规避资源冲突的能力。两条反馈路径分别作用于智能体自动构建模块和场景自适应引擎,并通过执行效能参数的持续采集和迭代输入形成闭合联动,使得系统能够在持续运行中不断自我修正和进化,显著提升了智能体生成系统在动态业务环境下的自适应能力和长期运行稳定性。
Smart Images

Figure CN122986150A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, specifically to an automatic intelligent agent generation system for business scenarios. Background Technology
[0002] With the rapid development of large language models and artificial intelligence technologies, agent-based automated systems have been widely applied in business process processing, intelligent customer service, and data analysis. To lower the technical barrier to agent construction, existing technologies have attempted to utilize large language models to automate agent generation. For example, some solutions use large language models to verify pseudocode architectures and generate static code to achieve secure and predictable agent performance; others, based on capability discovery mechanisms, automate agent construction by building capability interfaces and analyzing instructions using large language models; still others generate corresponding interaction cards by identifying dependencies between interfaces and build end-to-end execution status monitoring. Furthermore, end-to-end automated agent construction methods based on graph structure semantic fusion achieve end-to-end automated agent construction by integrating graph structure knowledge with the generation capabilities of large language models. In agent technology solutions that translate natural language into executable processes, mechanisms such as tool registry centers maintaining tool metadata and capability matching engines dynamically filtering available tools based on inference chains have also been introduced.
[0003] However, the aforementioned existing technologies still have significant shortcomings. First, most existing agent generation schemes are unidirectional linear generation processes, meaning that the agent is built and deployed in one go based on user input. After generation, the agent's behavior logic and configuration parameters are usually fixed, lacking runtime monitoring and dynamic optimization mechanisms. When business load, external interface performance, or resource environment changes, the agent's execution performance may deteriorate, and the system cannot autonomously perceive or repair it. Second, existing systems do not fully utilize the characteristics of business scenarios during agent generation, lacking the ability to dynamically adapt generation strategies based on actual business scenario characteristics. This results in generated agents that are often general solutions, failing to meet the personalized needs of specific business scenarios. Third, existing LLM-based agent systems generally suffer from problems such as uncontrollable task planning, frequent errors in tool call parameters, chaotic multi-tool orchestration, insufficient observability, and lack of adaptive capabilities. Fourth, existing technologies lack a two-way feedback mechanism between the design and execution phases, failing to feed back actual performance information from the runtime phase to the agent generation and construction phases, making it difficult to form a complete closed loop from generation to operation to optimization. Summary of the Invention
[0004] To address the problems of existing technologies, this invention provides an automatic agent generation system for business scenarios.
[0005] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: Firstly, an intelligent agent automatic generation system oriented towards business scenarios, comprising: The business scenario perception module is configured to acquire business requirement information input by the user, perform multimodal semantic parsing on the business requirement information, and identify the type and scenario feature parameters of the target business scenario; the multimodal semantic parsing includes joint semantic understanding of at least two modalities among text input, voice input, flowchart input, and table input; The scene adaptive engine is configured to retrieve domain knowledge matching the target business scene from a pre-built domain knowledge graph based on the scene feature parameters, and dynamically adapt the intelligent agent generation strategy based on the retrieved domain knowledge; the domain knowledge graph includes business domain entities, relationships between entities, business rules, and historical generation cases. The intelligent agent automatic construction module is configured to decompose the target business scenario into multiple sub-tasks according to the adapted generation strategy, determine the task dependencies and task constraints between each sub-task, assign corresponding capability interfaces to each sub-task through capability graph matching, and generate an intelligent agent set containing one or more intelligent agents and the interaction relationships between intelligent agents. The interactive iterative optimization module is configured to display candidate schemes and the generation reasoning process of the generated intelligent agent set to the user, receive feedback instructions from the user, iteratively adjust the intelligent agent set based on the feedback instructions, and write the optimization results confirmed by the user into the long-term memory. The deployment and execution module is configured to deploy a set of intelligent agents confirmed by the user to the target business system, generate an application programming interface to achieve the connection with the target business system, and execute the set of intelligent agents to complete the business tasks corresponding to the target business scenario. The runtime monitoring and feedback module is coupled to the intelligent agent automatic construction module, the scene adaptive engine, and the deployment and execution module, respectively; The runtime monitoring and feedback module includes: The status acquisition unit is configured to collect the actual execution performance parameters and resource contention conflict records of each subtask in real time according to a preset sampling period during the process of the deployment and execution module executing the intelligent agent set; the actual execution performance parameters include at least interface response latency, token consumption rate and result accuracy. The constraint factor generation unit is configured to compare the actual execution performance parameters with a preset performance benchmark threshold to generate a first adjustment signal; and to match the resource contention conflict record with a preset conflict rule base to generate a second adjustment signal. The feedback execution unit is configured to output the first adjustment signal to the intelligent agent automatic construction module, and at the same time output the second adjustment signal to the scene adaptive engine; In response to the first adjustment signal, the intelligent agent automatic construction module dynamically reduces the matching priority of capability interfaces whose actual response latency is higher than the corresponding threshold and whose actual result accuracy is lower than the corresponding threshold in the capability interface screening of subsequent subtasks. In response to the second adjustment signal, the scene adaptive engine recalls a compensation strategy template corresponding to the current resource contention conflict type from a predefined backup strategy template library, and fuses the compensation strategy template with the currently adapted agent generation strategy to generate an enhanced generation strategy. The new execution performance parameters generated after the enhanced generation strategy is invoked by the agent automatic construction module are collected again by the state acquisition unit and input to the constraint factor generation unit to form a closed-loop iterative optimization.
[0006] Preferably, the business scenario perception module includes: A multimodal input interface is configured to receive business requirement input in at least one of the following modalities: text, voice, flowchart, and table. The modal fusion encoder is configured to extract features from inputs of different modalities separately, and fuse the features of each modality into a unified business semantic vector through a cross-modal attention mechanism; the cross-modal attention mechanism is implemented based on the Transformer architecture, and performs attention calculation using the first modal feature as the query vector and the second modal feature as the key vector and value vector; A scenario classifier is configured to classify the target business scenario based on the business semantic vector and output a scenario type identifier and a scenario feature parameter vector. The scenario feature parameters include business domain category, task complexity level, expected output type and compliance requirement level, wherein the task complexity level is determined comprehensively based on the expected value of the number of subtasks and the expected value of the interface call depth.
[0007] Preferably, the scene adaptation engine includes: The scenario-knowledge retrieval device is configured to construct a retrieval query vector based on the scenario feature parameters, perform vector retrieval in the domain knowledge graph, and recall candidate knowledge subgraphs related to the target business scenario; the vector retrieval adopts an approximate nearest neighbor search based on the FAISS index, and the recall number is [missing information]. , The value range is 5 to 20; the domain knowledge graph is a pre-built role-task-tool-data quadruple knowledge base for different business domains; The strategy adapter is configured to select an appropriate basic generation strategy template from a predefined generation strategy template library based on the retrieved candidate knowledge subgraph, and to parameterize the basic generation strategy template according to the scenario feature parameters to obtain a customized generation strategy; the parameterization includes adjusting the recursion depth of subtask decomposition according to the task complexity level, adjusting the output format constraint rules according to the expected output type, and adjusting the permission verification strength according to the compliance requirement level. The strategy validator is configured to perform compliance verification and feasibility assessment on the customized generated strategy, and output the customized generated strategy to the intelligent agent automatic construction module after the assessment is passed; the compliance verification includes at least data privacy compliance verification and interface permission compliance verification.
[0008] Preferably, the intelligent agent automatic construction module includes: The task decomposer is configured to recursively decompose the business objectives of the target business scenario into a hierarchical set of subtasks using a large language model combined with the domain knowledge graph, and to identify the data dependencies, temporal dependencies, and resource dependencies between the subtasks; the recursive decomposition stops when the current subtask has at least one matching capability interface in the capability interface library. The capability matching engine is configured to build a capability interface library and store each capability interface in a vectorized form. This vectorized storage is achieved by concatenating the name, description, input / output parameter structure, and example calls of each capability interface and then inputting them into the BERT model for encoding. Semantic matching is performed between the description information of each sub-task and the capability description information in the capability interface library. The cosine similarity between the description vector of each sub-task and the vector of each capability interface is calculated, and the top N candidate capability interfaces with the highest similarity for each sub-task are retrieved. N The value range is from 3 to 10; An assembler is configured to select the optimal capability interface from the candidate capability interface set of each subtask and combine them according to the task dependencies and task constraints to generate the set of intelligent agents and the interaction relationships between them. The selection of the optimal capability interface is based on the comprehensive matching score of each capability interface. The comprehensive matching score is determined by a weighted sum of the cosine similarity and the reliability score of the capability interface. The reliability score is dynamically updated based on the historical call success rate and average response time. An output type constraint is configured to constrain the output format and data structure of the intelligent agent set according to the expected output type of the target business scenario. The constraint specification is expressed in JSON Schema format.
[0009] Preferably, the interactive iterative optimization module includes: The inference chain visualization unit is configured to graphically display the entire inference process from business requirement analysis to agent assembly completion during the generation of the agent set. The entire inference process includes the reasoning basis of each decision node, the knowledge sources referenced, and the evaluation scores of candidate solutions. The graphical method uses a directed acyclic graph to display the inference relationship between each decision node. The feedback receiving unit is configured to provide a graphical interactive interface to receive user confirmation, modification, and rejection operations for the candidate solutions; the modification operation includes at least one of replacing the capability interface corresponding to the specified subtask, adjusting the execution order of the subtasks, and modifying the task constraints. The incremental optimization unit is configured to, based on the user's modification instructions, perform partial re-matching and replacement of the capability interfaces corresponding to the unconfirmed subtasks while keeping the configuration of the confirmed subtasks unchanged. The partial re-matching is only performed on the subtree where the modified subtask is located and does not involve full regeneration. The memory update unit is configured to write the final agent configuration confirmed by the user, the corresponding business scenario features, and user preference information into the long-term memory. The long-term memory is implemented using a vector database, with business scenario feature vectors as indexes and the final agent configuration as storage values, for initializing generation strategies for subsequent similar business scenarios.
[0010] Preferably, the deployment and execution module includes: An interface generator is configured to automatically generate application programming interface documents and interface code that conform to the Representational State Transmission Specification or the Graphical Query Language Specification based on the capability interface signatures of each agent in the set of agents. The execution engine is configured to schedule the execution order of each agent according to the task dependency relationship and manage the data transfer and state synchronization between agents; the scheduling method is based on the topological sorting of the directed acyclic graph, and when there are multiple subtasks with an in-degree of zero, a parallel scheduling strategy is adopted to execute them simultaneously. An exception handler is configured to monitor the execution status of each agent and execute preset exception handling logic when an exception is detected. The exception handling logic includes task retry, degraded execution, and breakpoint resumption. The task retry adopts an exponential backoff strategy with an initial retry interval of 1 second and a maximum number of retries of 3. The breakpoint resumption records the execution completion status at the subtask level and resumes execution from the first unfinished subtask after the system recovers. An execution log recorder is configured to record the decision-making basis, intermediate states, and final results of the entire execution process of the intelligent agent set, and generate a traceable execution audit log; the execution audit log is stored in a blockchain hash chain structure, and each log block contains the hash value of the previous block, the current timestamp, and the execution event record.
[0011] Preferably, in the status acquisition unit, the preset performance benchmark threshold for the interface response latency is no more than 500 milliseconds for a single call response time, the preset performance benchmark threshold for the token consumption rate is no more than 1000 tokens per second, and the preset performance benchmark threshold for the result accuracy is no less than 95%. The constraint factor generation unit compares the actual performance parameters with preset performance benchmark thresholds by calculating the deviation ratio between the actual measured value of each parameter and the corresponding threshold. The formula for calculating the deviation ratio is as follows: When the deviation ratio exceeds a preset deviation tolerance, the preset deviation tolerance is ±10%, and a first adjustment signal carrying the deviation ratio value and the corresponding capability interface identifier is generated; The resource contention conflict record includes records of multiple subtasks competing for the same database connection pool, the same computing resource, or the same external application interface within the same time window; the duration of the time window is 5 seconds; the conflict rule base contains conflict levels and preset mitigation actions corresponding to different conflict types, the conflict levels are divided into three levels: low, medium, and high, and the preset mitigation actions include at least one of increasing resource quotas, enabling request queuing, and implementing rate limiting.
[0012] Preferably, the specific method by which the intelligent agent automatic construction module responds to the first adjustment signal by reducing the capability interface matching priority is as follows: After receiving the first adjustment signal, the capability matching engine extracts the deviation ratio value corresponding to each capability interface. Calculate the penalty coefficient for each capability interface based on the aforementioned deviation ratio value. The calculation formula is: ,in The deviation ratio value is... This is a preset proportional coefficient. The value range is from 0.5 to 1.0. The value range is from 0 to 0.6; The original cosine similarity score between each subtask description vector and each capability interface vector is used to calculate the similarity score. Multiply by (1 - the penalty coefficient of the corresponding capability interface) ), to obtain the corrected overall matching score ; Based on the corrected comprehensive matching score, the candidate capability interfaces of each subtask are reordered, and capability interfaces with a corrected comprehensive matching score lower than a preset entry threshold are removed from the candidate set. The preset entry threshold is 0.3.
[0013] Preferably, the scene adaptive engine generates the enhanced generation strategy in response to the second adjustment signal in the following specific manner: The policy adapter extracts the policy parameter matrix of the currently adapted agent generation policy. The first feature is represented by the first feature; the strategy parameter matrix includes numerical representations of scene classification parameters, task decomposition parameters, capability matching weights, and output constraint parameters. Based on the resource contention conflict type carried in the second adjustment signal, the corresponding compensation strategy template is recalled from the backup strategy template library, and the parameter matrix of the compensation strategy template is extracted. , as a second feature representation; The first feature representation and the second feature representation are deeply fused using a cross-attention mechanism, specifically including: using the first feature representation as a query matrix. The second feature is represented as a key matrix. Sum matrix Calculate the attention weight matrix ,in As the feature dimension, the feature matrix is fused. Based on the fusion feature matrix The enhanced generation strategy is generated through a feedforward neural network. The enhanced generation strategy includes both the scene adaptation parameters of the currently adapted agent generation strategy and the concurrency control parameters of the compensation strategy template. The concurrency control parameters include at least the resource isolation level and the concurrent request rate limiting threshold. The scene adaptive engine pushes the enhanced generation strategy to the agent automatic construction module, replacing the currently adapted agent generation strategy.
[0014] Secondly, a method for automatically generating intelligent agents for business scenarios includes the following steps: Step S1: Obtain the business requirement information input by the user, perform multimodal semantic parsing on the business requirement information, and identify the type and feature parameters of the target business scenario; Step S2: Based on the scene feature parameters, retrieve domain knowledge matching the target business scene from the pre-constructed domain knowledge graph, and dynamically adapt the intelligent agent generation strategy based on the retrieved domain knowledge. Step S3: According to the adapted generation strategy, the target business scenario is decomposed into multiple sub-tasks, the task dependencies and task constraints between each sub-task are determined, and corresponding capability interfaces are assigned to each sub-task through capability graph matching, generating a set of intelligent agents containing one or more intelligent agents and the interaction relationships between intelligent agents. Step S4: Show the user the candidate schemes and generation reasoning process of the generated intelligent agent set, receive the user's feedback instructions, iteratively adjust the intelligent agent set based on the feedback instructions, and write the optimization results confirmed by the user into the long-term memory. Step S5: Deploy the set of intelligent agents confirmed by the user to the target business system, generate an application programming interface to achieve the docking with the target business system, and execute the set of intelligent agents to complete the business tasks corresponding to the target business scenario; Step S6: During the execution of the intelligent agent set, the actual execution performance parameters and resource contention conflict records of each subtask are collected in real time according to a preset sampling period; the actual execution performance parameters include at least interface response latency, token consumption rate and result accuracy. Step S7: Compare the actual execution performance parameters with a preset performance benchmark threshold to generate a first adjustment signal; and match the resource contention conflict record with a preset conflict rule base to generate a second adjustment signal. In step S8, during the capability matching process of step S3, the first adjustment signal is fed back to dynamically reduce the matching priority of capability interfaces whose actual response latency is higher than the corresponding threshold and whose actual result accuracy is lower than the corresponding threshold. At the same time, during the strategy adaptation process of step S2, the second adjustment signal is fed back to recall the compensation strategy template corresponding to the current resource contention conflict type from the backup strategy template library, and the compensation strategy template is fused with the currently adapted agent generation strategy to generate an enhanced generation strategy. Step S9: The enhanced generation strategy generated in step S8 is used as the updated agent generation strategy. The process returns to step S5 to execute the agent set for the next round. The newly generated execution performance parameters are then re-inputted into step S6 to form a closed-loop iterative optimization.
[0015] The beneficial effects of this invention are as follows: 1. The present invention provides an intelligent agent automatic generation system and method for business scenarios. Through multimodal business requirement semantic parsing, scenario adaptive strategy generation driven by domain knowledge graph, intelligent agent automatic assembly based on capability graph matching, real-time monitoring of runtime execution performance parameters and resource contention conflicts, and bidirectional adjustment signals generated based on monitoring results, the system provides coordinated feedback on the capability interface matching priority in the automatic construction phase and the strategy parameters in the scenario adaptive phase, forming a bidirectional closed-loop optimization mechanism from the design state to the execution state and back to the design state. This mechanism, on the one hand, quantifies the deviation ratio of actual execution performance parameters such as interface response latency, token consumption rate, and result accuracy from preset benchmark thresholds into penalty coefficients for each capability interface. This dynamically reduces the priority of degraded capability interfaces in subsequent matching by adjusting the cosine similarity matching score, thereby suppressing the continuous impact of performance degradation factors on the quality of agent generation. On the other hand, after matching resource contention conflict types with the conflict rule base, a cross-attention mechanism is used to deeply integrate the concurrency control parameters in the backup compensation strategy template with the current generation strategy parameters. This generates an enhanced generation strategy that combines scene adaptability and resource contention response capabilities, enabling subsequently generated agents to proactively avoid resource conflicts during execution. These two feedback paths act on the agent automatic construction module and the scene adaptation engine, respectively, forming a closed loop through continuous collection and iterative input of execution performance parameters. This allows the system to continuously self-correct and evolve during operation, significantly improving the agent generation system's adaptability and long-term operational stability in dynamic business environments.
[0016] 2. This invention introduces an interactive iterative optimization module, which transparently displays the entire reasoning process of task decomposition, capability matching, and assembly decisions in a graphical manner to the user during the automatic generation of intelligent agents. This allows users to intuitively understand the reasoning basis of each decision node and the evaluation results of candidate solutions. Through an incremental optimization mechanism, only the affected local subtrees are re-matched and replaced after the user's modification command is issued, ensuring user controllability while avoiding the computational overhead of full regeneration. The memory update unit associates the user-confirmed final configuration with business scenario characteristics and stores it in a long-term memory. This allows subsequent generation strategy initialization for similar scenarios to directly reuse historical successful experiences, realizing the migration and accumulation of generation experience across business scenarios, further improving the quality consistency and efficiency of intelligent agent generation. Simultaneously, the parallel scheduling strategy based on directed acyclic graph topology sorting, the task retry and breakpoint continuation mechanism based on exponential backoff, and the tamper-proof execution audit log based on a blockchain hash chain structure in the deployment and execution module jointly ensure the reliable execution and full-process traceability of the intelligent agent set in actual business systems, enabling the system to have industrial-grade availability in business scenarios with high compliance requirements. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall system architecture of the present invention.
[0018] Figure 2 This is a schematic diagram of the feedback path of the runtime monitoring and feedback module of the present invention.
[0019] Figure 3 This is a schematic diagram of the overall process of the intelligent agent automatic generation method of the present invention. Detailed Implementation
[0020] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] like Figures 1 to 3 The example shown is an automatic agent generation system for business scenarios.
[0022] I. System Overall Architecture This invention provides an intelligent agent automatic generation system for business scenarios, including a business scenario perception module, a scenario adaptation engine, an intelligent agent automatic construction module, an interactive iterative optimization module, a deployment and execution module, and a runtime monitoring and feedback module. The runtime monitoring and feedback module is coupled to the intelligent agent automatic construction module, the scenario adaptation engine, and the deployment and execution module, respectively.
[0023] The business scenario perception module receives business requirement information input by the user, performs multimodal semantic parsing on the information, and then passes the identified target business scenario type and scenario feature parameters to the scenario adaptation engine. The scenario adaptation engine retrieves matching domain knowledge from the domain knowledge graph based on the scenario feature parameters, dynamically adapts the generation strategy, and then passes it to the intelligent agent automatic construction module. The intelligent agent automatic construction module decomposes the business scenario into sub-tasks according to the generation strategy, assigns capability interfaces to each sub-task through capability matching, generates an intelligent agent set, and then submits it to the interactive iterative optimization module for user confirmation. The deployment and execution module deploys the confirmed intelligent agent set to the target business system and executes it. The runtime monitoring and feedback module collects performance parameters during execution, generates adjustment signals, and feeds them back to the intelligent agent automatic construction module and the scenario adaptation engine, forming a closed-loop optimization.
[0024] II. Detailed Implementation of the Business Scenario Awareness Module The business scenario perception module includes a multimodal input interface, a modal fusion encoder, and a scenario classifier.
[0025] 2.1 Multimodal Input Interface The multimodal input interface supports at least one of the following modalities for business requirement input: text input (such as business requirement documents described in natural language), voice input (such as recorded business requirement statements dictated by users), flowchart input (such as business process flowchart files in BPMN format), and table input (such as data dictionaries or business rule tables in Excel format). Each modal input undergoes format standardization through its corresponding preprocessing subunit: text input is processed through word segmentation and stop word removal; voice input is transcribed into text by a speech recognition engine (such as Whisper) before entering the text processing channel; flowchart input has its node and edge information extracted by a BPMN parser; and table input has its field names, field types, and sample data extracted through structured parsing.
[0026] 2.2 Modal Fusion Encoder The multimodal input interface transmits the preprocessed modal data to the modal fusion encoder. The modal fusion encoder extracts features from the inputs of different modalities separately and fuses the features of each modality into a unified business semantic vector through a cross-modal attention mechanism.
[0027] For text modalities, a pre-trained BERT model (such as BERT-base-chinese, with an output dimension of 768) is used to encode the input text into text feature vectors. ,in The length of the text sequence. The feature dimensions are as follows: For the speech modality, it is first converted to text by a speech recognition engine and then processed as a text modality. For the flowchart modality, a Graph Attention Network (GAT) is used to encode the nodes and edges of the BPMN flowchart, resulting in a graph feature vector G∈ℝ^{L_g×d}, where L_g is the number of nodes in the graph. For the table modality, a TabTransformer is used to encode the column names and sample data of the table into a table feature vector F∈ℝ^{L_f×d}, where L_f is the number of table fields.
[0028] The cross-modal attention mechanism is implemented based on the Transformer architecture. Taking text features as the first modality and flowchart features as the second modality as an example, the text features are used as the query vector Q, and the flowchart features are used as the key vector K and value vector V, respectively, to calculate the cross-modal attention:
[0029] in The dimension of the key vector is defined. Deep fusion of features from various modalities is achieved through the stacking of multiple cross-modal attention modules (preferably 6 layers). Finally, the fused multimodal features are passed through an average pooling layer and a fully connected layer to output a unified business semantic vector. .
[0030] 2.3 Scene Classifier Modal fusion encoders will convert business semantic vectors This is passed to the scene classifier. The scene classifier is based on the business semantic vector. The target business scenarios are classified, and the scenario type identifier and scenario feature parameter vector are output.
[0031] The scene classifier employs a Softmax classification layer and is pre-trained with fine-tuning on a dataset containing no fewer than 10,000 labeled business scene samples. The classification output is a scene type identifier. ,in The total number of predefined scene types, The value range is from 50 to 200.
[0032] Scene feature parameter vector It includes the following four dimensions: (1) Business domain category (such as finance, medical care, manufacturing, government affairs, etc.), represented by one-hot encoding; (2) Task complexity level The expected number of subtasks is determined by combining the expected number of subtasks and the expected depth of API calls. Mapped to levels 1 to 5, expected API call depth Mapping to levels 1 to 5, with the maximum value taken as the final task complexity level; (3) Expected output type (4) Compliance requirement level These correspond to general compliance, strict compliance, and highest level of compliance, respectively.
[0033] III. Detailed Implementation of the Scene Adaptive Engine The scene-adaptive engine includes a scene-knowledge retrieval unit, a policy adapter, and a policy validator.
[0034] 3.1 Domain Knowledge Graph Construction Before the scene-adaptive engine can operate, it needs to pre-build a domain knowledge graph. This knowledge graph is a knowledge base consisting of a role-task-tool-data quadruple, built for different business domains.
[0035] The knowledge graph is constructed using a combination of top-down and bottom-up approaches: First, domain experts define the top-level ontology (including role classes, task classes, tool classes, data classes, and their relationship types). Then, entities and relationships are extracted from historical business documents, standard operating procedures (SOPs), and existing agent cases. After manual verification, these are stored in a graph database (such as Neo4j). The number of entities is no less than 10,000, and the number of relationships is no less than 50,000. Each entity and relationship is associated with a corresponding text description, which is encoded into a 768-dimensional vector using the BERT model and stored along with the entity ID, forming an index structure that supports vector retrieval.
[0036] 3.2 Scenario - Knowledge Retrieval The scene-knowledge retrieval engine constructs a retrieval query vector based on the scene feature parameter P. Specifically, the scene type will be identified. Embedding vector and scene feature parameter vector After concatenation, it is mapped to a 768-dimensional vector through a fully connected network.
[0037] During retrieval, an approximate nearest neighbor search based on the FAISS index was employed. The FAISS index type used was IVF1024, PQ64, with nlist=1024, and a training sample size of at least 10,000 records. Retrieval parameters were set as follows: nprobe=10 (balancing precision and speed), recall number... The similarity threshold is set to 0.6; search results below this threshold are filtered out. The retrieval returns a candidate knowledge subgraph related to the target business scenario, containing no fewer than [number missing]. A candidate knowledge triplet.
[0038] 3.3 Policy Adapter The scene-knowledge retrieval unit passes the retrieved candidate knowledge subgraphs to the policy adapter. Based on the candidate knowledge subgraphs, the policy adapter selects a suitable basic generation policy template from a predefined generation policy template library, and parametrically adjusts the basic generation policy template according to scene feature parameters to obtain a customized generation policy.
[0039] The generation strategy template library contains at least 20 basic templates, each containing the following parameters: subtask decomposition strategy (including decomposition granularity and upper limit of decomposition depth) and capability matching strategy (including matching algorithm type and number of candidates). The system includes assembly strategies (including optimization objectives and constraint satisfaction priorities) and output constraint strategies (including output format templates and validation rules). Template selection is based on the most frequently occurring scenario type labels in the candidate knowledge subgraph.
[0040] Parameterized adjustments include the following operations: (1) Adjusting the upper limit of the recursion depth of subtask decomposition according to the task complexity level L. The time limit is 2 floors. The time limit is 7 levels, and the intermediate levels are determined by linear interpolation; (2) According to the expected output type Adjust the output format constraint rules, such as Add JSON Schema validation when processing structured data. Add visualization template configuration to chart reports; (3) According to compliance requirement level Adjust the strength of permission verification. At that time, only basic authentication was performed. Increase fine-grained data anonymization and operational auditing.
[0041] 3.4 Policy Verifier The policy adapter passes the customized generation policy to the policy validator. The policy validator performs compliance checks and feasibility assessments on the customized generation policy. Compliance checks include at least data privacy compliance checks (checking whether the data fields involved in the policy contain sensitive information, such as ID card numbers, mobile phone numbers, etc.) and interface permission compliance checks (checking whether the interfaces called by the policy have the corresponding access permissions). The feasibility assessment verifies whether the policy can complete at least one complete agent generation process within a preset time (e.g., 30 seconds) under given scenario characteristics through simulated execution. After passing the assessment, the policy validator outputs the customized generation policy to the agent automatic construction module.
[0042] IV. Detailed Implementation of the Automatic Agent Construction Module The agent automatic construction module includes a task decomposer, a capability matching engine, an assembler, and an output type constraint.
[0043] 4.1 Task Decomposer The task decomposer recursively breaks down the business objectives of the target business scenario into a hierarchical set of subtasks using a large language model combined with a domain knowledge graph.
[0044] The large language model uses a pre-trained model with no less than 7 billion parameters (such as Llama 2-7B or ChatGLM3-6B), and guides the model to decompose tasks through Few-shot prompting. The prompt template includes: (1) a natural language description of the business objective; (2) a subgraph in the domain knowledge graph related to the current task (provided in the form of a list of triples); (3) decomposition examples (no less than 3); (4) output format requirements (JSON format, including subtask name, subtask description, subtask type, and dependency relationship).
[0045] The stopping condition for recursive decomposition is: the current subtask has at least one matching capability interface in the capability interface library. When each subtask is decomposed, the task decomposer simultaneously identifies and marks three types of dependencies between the subtask and other subtasks: (1) Data dependency - subtask B needs the output of subtask A as input; (2) Timing dependency - subtask B can only start after subtask A is completed; (3) Resource dependency - subtask A and subtask B need to compete for the same resource (such as the same database connection pool).
[0046] The maximum depth of recursive decomposition is controlled by the upper limit of recursion depth provided by the scene adaptive engine, which defaults to 5 levels. The number of subtasks in each node is controlled between 2 and 5.
[0047] 4.2 Capability Matching Engine The task decomposer passes a hierarchical set of subtasks to the capability matching engine. The capability matching engine builds a capability interface library and stores each capability interface in a vectorized form. Then, it matches a set of candidate capability interfaces for each subtask.
[0048] Capability Interface Library Construction: The capability interface library pre-registers all callable capabilities supported by the system. Each capability interface contains the following metadata: interface name, interface description (natural language), input parameter structure (JSON Schema format), output parameter structure (JSON Schema format), call example, reliability score (initial value of 0.95), historical call success rate, and average response time. Vectorized storage of each capability interface is achieved by concatenating the interface name, description, input / output parameter structure, and call example, then inputting the concatenation into the BERT model for encoding, outputting a 768-dimensional vector, which is stored in the FAISS vector index along with the interface ID.
[0049] Semantic matching: For the description information of each subtask, the capability matching engine also encodes it into a 768-dimensional subtask description vector using the BERT model. Then, it calculates the cosine similarity between the subtask description vector and each capability interface vector:
[0050] in For the first Description vectors of each subtask For the first The vectors of each capability interface. The cosine similarity value ranges from... The closer the value is to 1, the more semantically relevant it is.
[0051] The capability matching engine retrieves the top N candidate capability interfaces by similarity for each subtask. The value ranges from 3 to 10. During recall, a similarity threshold of 0.3 is set; interfaces with similarity values below this threshold are not included in the candidate set.
[0052] 4.3 Assembler The capability matching engine passes the candidate capability interface set for each subtask to the assembler. The assembler selects the optimal capability interface from the candidate capability interface set for each subtask based on task dependencies and task constraints, and combines and assembles them to generate a set of intelligent agents and the interaction relationships between them.
[0053] Overall matching score calculation: The overall matching score for each candidate capability interface is determined by a weighted sum of cosine similarity and reliability scores.
[0054] in These are the weighting coefficients. The value range is from 0.5 to 0.8, with a default value of 0.7; For capability interface The reliability score, initially set at 0.95, is dynamically updated based on historical call success rate and average response time. After each successful call, if the response time is below a threshold (500ms) and the returned result is valid, then... Increase by 0.001 (maximum 0.99); if the call fails or times out, then Decrease by 0.01 (lower limit is 0.70).
[0055] Optimal Selection and Assembly: The assembler uses a dependency-based dynamic programming algorithm for optimal selection. The algorithm input is a subtask dependency graph. ,in For the set of subtask nodes, Given a set of dependent edges, the output is the capability interface selected for each subtask. The algorithm starts with independent subtasks and processes them layer by layer in topological order. For each subtask, it selects the capability interface with the highest comprehensive matching score from the candidate set, while ensuring that the combination of selected interfaces meets resource constraints (such as the number of interfaces called simultaneously in the same database connection pool does not exceed the connection pool size).
[0056] After assembly, the assembler generates a set of intelligent agents. Each intelligent agent encapsulates the capability interface call logic of one or more subtasks. The interaction relationship between intelligent agents is automatically determined based on the dependency relationship between subtasks—data dependency is converted into data transmission channels between intelligent agents, and temporal dependency is converted into call order constraints between intelligent agents.
[0057] 4.4 Output Type Constraints The assembler passes the assembled set of agents to the output type constraint. The output type constraint determines the expected output type based on the target business scenario. The output format and data structure of the intelligent agent set are constrained and specified, and the constraint specification is expressed in JSON Schema format.
[0058] For example, when the expected output type is "structured data", the JSON Schema generated by the output type constraint includes: a root node of type object, a required array listing all required fields, and each field's type determined by business semantics as string, number, integer, boolean, or array. Additional Properties are set to false to disable extra fields. When the expected output type is "chart report", a chart configuration object is added to the JSON Schema, containing fields such as chart_type (enumerated values are bar, line, pie, scatter), title (string), x_axis (object), and y_axis (object). The output type constraint embeds the generated JSON Schema into the configuration of the intelligent agent collection, allowing the deployment and execution modules to validate the output at runtime.
[0059] V. Detailed Implementation of the Interactive Iterative Optimization Module The interactive iterative optimization module includes an inference chain visualization unit, a feedback receiving unit, an incremental optimization unit, and a memory update unit.
[0060] 5.1 Inference Chain Visualization Unit The reasoning chain visualization unit graphically displays the entire reasoning process from business requirement analysis to agent assembly during the generation of the agent set. The graphical method uses a directed acyclic graph (DAG) to show the derivation relationship between each decision node. Each decision node displays the following information: (1) Basis of consideration - the input data and rules on which the node makes the decision; (2) Source of knowledge referenced - specific knowledge triples retrieved from the domain knowledge graph; (3) Evaluation score of candidate solutions - the comprehensive matching score of each candidate capability interface.
[0061] The visualization interface is implemented based on Web technology. The front end uses D3.js or ECharts for graphics rendering, and the back end pushes decision events during the generation process in real time via WebSocket.
[0062] 5.2 Feedback Receiving Unit The feedback receiving unit provides a graphical interactive interface to receive user confirmation, modification, and rejection operations for candidate solutions. Modification operations include: (1) replacing the capability interface corresponding to a specified subtask - the user manually selects another capability interface from the candidate list; (2) adjusting the execution order of subtasks - the user adjusts the order of nodes in the DAG by dragging and dropping; (3) modifying task constraints - the user edits the parameter values of the constraints (such as adjusting the timeout from 30 seconds to 60 seconds).
[0063] 5.3 Incremental Optimization Unit The feedback receiving unit transmits the user's modification instructions to the incremental optimization unit. Based on these instructions, the incremental optimization unit performs partial re-matching and replacement of the capability interfaces corresponding to unconfirmed subtasks, while maintaining the configuration of confirmed subtasks. This partial re-matching only applies to the subtree containing the modified subtask and does not involve a full regeneration. Specifically, when a user modifies the capability interface of a subtask, the incremental optimization unit only recalculates the candidate capability interface matching for that subtask and all downstream subtasks that depend on its output; the configurations of upstream subtasks and unrelated branch subtasks remain unchanged. This design significantly reduces the computational overhead of iterative optimization.
[0064] 5.4 Memory Update Unit After the user confirms the final solution, the memory update unit writes the user-confirmed final agent configuration, corresponding business scenario features, and user preference information into the long-term memory. The long-term memory is implemented using a vector database (such as Milvus or Qdrant), indexed by business scenario feature vectors and stored using the final agent configuration. When similar business scenarios arise subsequently, the scenario adaptation engine can prioritize retrieving historical successful cases from the long-term memory as a reference for initializing the generation strategy, thereby accelerating the generation process and improving generation quality.
[0065] VI. Specific Implementation Methods of the Deployment and Execution Module The deployment and execution module includes an interface generator, an execution engine, an exception handler, and an execution logger.
[0066] 6.1 Interface Generator The interface generator automatically generates application programming interface (API) documents and code conforming to either the RESTful or GraphQL specification, based on the capability interface signatures of each agent in the agent set. For the RESTful specification, the generator generates a corresponding HTTP endpoint for each agent, including the URL path, HTTP method (GET / POST / PUT / DELETE), request parameters (Query or Body parameters in JSON format), and response structure (JSON format). For the GraphQL specification, the generator generates the corresponding schema definition (including Query and Mutation types) and the Resolver function skeleton. The generated API code is implemented using Python Flask or Node.js Express frameworks and can be directly deployed and run.
[0067] 6.2 Execution Engine The interface generator delivers the generated interface code along with the set of agents to the execution engine. The execution engine schedules the execution order of the agents according to task dependencies and manages data transfer and state synchronization between the agents.
[0068] The scheduling method is based on topological sorting of a directed acyclic graph. The execution engine first performs topological sorting on the task dependency graph to obtain a linear execution sequence of subtasks. When there are multiple subtasks with an in-degree of zero (i.e., multiple subtasks are independent of each other), a parallel scheduling strategy is used to execute them simultaneously to fully utilize computing resources. The maximum parallelism is twice the number of CPU cores by default and can be adjusted through the configuration file.
[0069] Data transfer is achieved through shared memory or message queues. For intermediate results with a data size of less than 1MB, shared memory is used for transfer; for intermediate results with a data size greater than 1MB or requiring persistence, message queues (such as RabbitMQ or Kafka) are used. State synchronization is managed through a distributed coordination service (such as ZooKeeper or etcd). After each subtask is completed, its status is updated to "completed" in the coordination service.
[0070] 6.3 Exception Handler During execution, the execution engine continuously monitors the execution status of each agent and transmits abnormal events to the exception handler. When an exception is detected, the exception handler executes pre-defined exception handling logic, including task retries, degraded execution, and breakpoint resumption.
[0071] Task retries employ an exponential backoff strategy. The initial retry interval is 1 second, doubling with each subsequent retry (1 second, 2 seconds, 4 seconds, 8 seconds, etc.), with a maximum of 3 retries. Retry is only performed on recoverable exception types (such as network timeouts or temporary service unavailability); unrecoverable exceptions (such as incorrect parameters or insufficient permissions) are not retried.
[0072] Degraded execution is triggered after all retries fail. Degraded execution means using an alternative capability interface to replace the original capability interface to complete the subtask, or returning a cached default result. The alternative capability interface is selected from the candidate capability interface set for this subtask, based on the interface with the second-highest overall matching score.
[0073] Resuming execution from a standby point records the completion status at the subtask level. Before executing each subtask, the execution engine records its start status in the coordination service; after execution, it updates the status to completion. When the system recovers from a failure, the exception handler reads the status of each subtask from the coordination service and resumes execution from the first subtask with a status of "not started," without repeating completed subtasks.
[0074] 6.4 Execution Logger The execution logger records the decision-making basis, intermediate states, and final results of the entire execution process of the intelligent agent ensemble, generating a traceable execution audit log. The execution audit log is stored using a blockchain hash chain structure, with each log block containing the hash value of the previous block, the current timestamp, and the execution event record. The hash algorithm used is SHA-256. This design ensures the log is immutable, meeting the auditing needs of scenarios with high compliance requirements (such as finance and government).
[0075] VII. Specific Implementation Method of the Runtime Monitoring and Feedback Module The runtime monitoring and feedback module includes a status acquisition unit, a constraint factor generation unit, and a feedback execution unit.
[0076] 7.1 Status Acquisition Unit During the process of the deployment and execution module executing the intelligent agent set, the status acquisition unit collects the actual execution performance parameters and resource contention conflict records of each subtask in real time according to the preset sampling period (default 5 seconds).
[0077] Actual performance parameters should include at least the following three items: (1) Interface response latency – The time interval from initiating an interface call to receiving a complete response, in milliseconds. The preset performance benchmark threshold is that the response time for a single call does not exceed 500 milliseconds. The measurement method is to record the timestamps before and after the interface call and calculate the difference.
[0078] (2) Token consumption rate – The number of API call tokens consumed per unit time, measured in tokens per second. The preset performance benchmark threshold is no more than 1000 tokens per second. Token consumption is obtained by intercepting API call requests, accumulating the number of calls within the statistical window, and dividing by the time window length.
[0079] (3) Result accuracy – The consistency ratio between the result returned by the capability interface and the expected result, with a value range of [0,1]. The preset performance benchmark threshold is no less than 95%. The accuracy is evaluated as follows: For subtasks with clear expected output (such as data query and numerical calculation), the returned result is compared with the pre-labeled correct answer (exact matching or threshold matching); for subtasks without clear expected output (such as text generation), semantic similarity is calculated through manual sampling or by using an auxiliary evaluation model (such as BERT-score).
[0080] Resource contention conflict logs include records of multiple subtasks competing for the same database connection pool, the same computing resource (such as GPU memory, CPU core), or the same external application interface within the same time window (5 seconds). The status acquisition unit detects conflict events by monitoring system resource usage (such as the number of database connections, GPU memory utilization, and API call frequency).
[0081] 7.2 Constraint Factor Generation Unit The status acquisition unit transmits the acquired actual execution performance parameters and resource contention conflict records to the constraint factor generation unit. The constraint factor generation unit compares the actual execution performance parameters with a preset performance benchmark threshold to generate a first adjustment signal; and matches the resource contention conflict records with a preset conflict rule base to generate a second adjustment signal.
[0082] The first adjustment signal generation method involves calculating the deviation ratio between the actual measured value of each parameter and its corresponding threshold. The formula for calculating the deviation ratio is:
[0083] in These are actual measured values. This corresponds to the baseline threshold. Regarding interface response latency, This represents the actual response time (ms). Regarding the token consumption rate, This represents the actual consumption rate (units / second). Items per second; for result accuracy For actual accuracy, When the deviation ratio exceeds the preset deviation tolerance (±10%), the constraint factor generation unit generates a first adjustment signal carrying the deviation ratio value and the corresponding capability interface identifier. Specifically, when the response delay... At time, or the rate of token consumption At that time, or the accuracy of the results When the accuracy is below 0.855, the generation of the first adjustment signal is triggered.
[0084] The second adjustment signal is generated by matching resource contention conflict records with a preset conflict rule base. The conflict rule base contains conflict levels and preset mitigation actions corresponding to different conflict types. Conflict levels are divided into three tiers: low, medium, and high. A resource being contested by 2 to 3 subtasks within a 5-second time window is considered low conflict; contested by 4 to 5 subtasks is medium conflict; and contested by 6 or more subtasks is high conflict. Preset mitigation actions include increasing resource quotas (e.g., increasing the database connection pool size from 10 to 20), enabling request queuing (changing concurrent requests to serial processing), and implementing rate limiting (limiting the number of requests per unit time to a preset upper limit). The constraint factor generation unit generates a second adjustment signal carrying a conflict type identifier, conflict level, and recommended mitigation actions based on the matched conflict level and conflict type.
[0085] 7.3 Feedback Execution Unit The constraint factor generation unit transmits the first adjustment signal and the second adjustment signal to the feedback execution unit. The feedback execution unit outputs the first adjustment signal to the agent automatic construction module, and simultaneously outputs the second adjustment signal to the scene adaptation engine.
[0086] In response to the first adjustment signal, the agent automatic construction module dynamically reduces the matching priority of capability interfaces whose actual response latency is higher than the corresponding threshold and whose actual result accuracy is lower than the corresponding threshold during the capability interface screening of subsequent subtasks. See Part VIII for details on the adjustment method.
[0087] In response to the second adjustment signal, the scene adaptation engine recalls a compensation strategy template corresponding to the current resource contention conflict type from a predefined backup strategy template library. It then fuses this compensation strategy template with the currently adapted agent generation strategy to generate an enhanced generation strategy. See Part Nine for details on the fusion method.
[0088] VIII. Specific Implementation Methods for Dynamically Adjusting the Priority of Capability Interface Matching The specific method by which the intelligent agent's automatic construction module reduces the capability interface matching priority in response to the first adjustment signal is as follows: Step 1: After receiving the first adjustment signal, the capability matching engine extracts the deviation ratio value R corresponding to each capability interface.
[0089] Step 2: Calculate the penalty coefficient P for each capability interface based on the deviation ratio. The calculation formula is:
[0090] in This is the deviation ratio value. This is a preset proportional coefficient. The value range is from 0.5 to 1.0, with a default value of 0.8. The value ranges from 0 to 0.6. For example, when the response latency deviation ratio of a certain capability interface... (That is, the actual response latency is 750ms, which is 50% of the baseline threshold of 500ms). hour, . When the deviation ratio When it exceeds 0.75, Take the upper limit of 0.6.
[0091] Step 3: Calculate the original cosine similarity score between each subtask description vector and each capability interface vector. Multiply by (1 - the penalty coefficient of the corresponding capability interface) The corrected overall matching score is obtained as follows:
[0092] Continuing with the previous example, if the original cosine similarity between a subtask and the capability interface is... The corrected overall matching score .
[0093] Step 4: Based on the revised overall matching score, the candidate capability interfaces for each subtask are re-ranked, and capability interfaces with a revised overall matching score lower than the preset entry threshold (0.3) are removed from the candidate set. This mechanism ensures that capability interfaces with poor execution performance are dynamically suppressed in subsequent agent generation, thereby reducing the adverse impact of performance degradation factors on the overall system performance.
[0094] IX. Specific Implementation Methods of Enhanced Generation Strategy Fusion The scene adaptive engine responds to the second adjustment signal to generate an enhanced generation strategy in the following specific way: Step 1: The policy adapter extracts the policy parameter matrix of the generated policy of the currently adapted agent. This serves as the first feature representation. The policy parameter matrix is a matrix with dimension [missing information]. The matrix ( The number of parameter groups in the strategy. For the dimensions of each set of parameters, It includes the numerical representation of scene classification parameters (such as scene type weight vector), task decomposition parameters (such as decomposition depth and branch factor), capability matching weights (such as matching weights of each capability dimension), and output constraint parameters (such as the verification threshold of each output field).
[0095] Step Two: Based on the resource contention conflict type carried in the second adjustment signal, retrieve the corresponding compensation strategy template from the backup strategy template library. The backup strategy template library contains at least 10 pre-set compensation strategy templates, each corresponding to a different combination of conflict types (e.g., "database connection pool contention + high conflict," "external API rate limiting + medium conflict," etc.). Each compensation strategy template includes a resource isolation level parameter (value range 1 to 5) and a concurrent request rate limiting threshold parameter (value range 10 to 1000). The strategy adapter extracts the parameter matrix of the compensation strategy template. As a second feature representation, the dimension is... same.
[0096] Step 3: Represent the first feature using a cross-attention mechanism Second feature representation Perform deep fusion. Specifically, represent the first feature. As a query matrix The second feature represents as a bond matrix Sum matrix Calculate the attention weight matrix:
[0097] in The dimension of the key vector ( ). Fusion feature matrix , Dimensions and The same. The cross-attention mechanism allows the fused feature matrix H to be adjusted according to the characteristics of the current strategy ( ), from the compensation strategy template ( It selectively absorbs compensation parameters that are most relevant to the current scene.
[0098] Step 4: Based on the fusion feature matrix An enhanced generation strategy is generated through a two-layer fully connected feedforward neural network. The hidden layer dimension of the feedforward neural network is 256, and the output layer dimension is... The same. The enhanced generation strategy includes both the scene adaptation parameters of the currently adapted agent generation strategy and the concurrency control parameters of the compensation strategy template. The concurrency control parameters include at least the resource isolation level (an integer from 1 to 5, where a higher value indicates stricter resource isolation) and the concurrent request rate limiting threshold (an integer from 10 to 1000, representing the maximum number of requests allowed per second).
[0099] Step 5: The scene adaptation engine pushes the enhanced generation strategy to the agent automatic construction module, replacing the currently adapted agent generation strategy. Subsequent agent generation will be based on the enhanced generation strategy, enabling newly generated agents to have stronger resource competition capabilities.
[0100] The new execution performance parameters generated after the enhanced generation strategy is invoked by the agent's automatic construction module are collected again by the state acquisition unit and input into the constraint factor generation unit, forming a continuous closed-loop iterative optimization.
[0101] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An intelligent agent automatic generation system for business scenarios, characterized in that, include: The business scenario perception module is configured to acquire business requirement information input by the user, perform multimodal semantic parsing on the business requirement information, and identify the type and scenario feature parameters of the target business scenario; the multimodal semantic parsing includes joint semantic understanding of at least two modalities among text input, voice input, flowchart input, and table input; The scene adaptive engine is configured to retrieve domain knowledge matching the target business scene from a pre-built domain knowledge graph based on the scene feature parameters, and dynamically adapt the intelligent agent generation strategy based on the retrieved domain knowledge. The domain knowledge graph includes business domain entities, relationships between entities, business rules, and historical generated cases; The intelligent agent automatic construction module is configured to decompose the target business scenario into multiple sub-tasks according to the adapted generation strategy, determine the task dependencies and task constraints between each sub-task, assign corresponding capability interfaces to each sub-task through capability graph matching, and generate an intelligent agent set containing one or more intelligent agents and the interaction relationships between intelligent agents. The interactive iterative optimization module is configured to display candidate schemes and the generation reasoning process of the generated intelligent agent set to the user, receive feedback instructions from the user, iteratively adjust the intelligent agent set based on the feedback instructions, and write the optimization results confirmed by the user into the long-term memory. The deployment and execution module is configured to deploy a set of intelligent agents confirmed by the user to the target business system, generate an application programming interface to achieve the connection with the target business system, and execute the set of intelligent agents to complete the business tasks corresponding to the target business scenario. The runtime monitoring and feedback module is coupled to the intelligent agent automatic construction module, the scene adaptive engine, and the deployment and execution module, respectively; The runtime monitoring and feedback module includes: The status acquisition unit is configured to collect the actual execution performance parameters and resource contention conflict records of each subtask in real time according to a preset sampling period during the process of the deployment and execution module executing the intelligent agent set; the actual execution performance parameters include at least interface response latency, token consumption rate and result accuracy. The constraint factor generation unit is configured to compare the actual execution performance parameters with a preset performance benchmark threshold and generate a first adjustment signal; In addition, the resource contention conflict records are matched with a preset conflict rule base to generate a second adjustment signal; The feedback execution unit is configured to output the first adjustment signal to the intelligent agent automatic construction module, and at the same time output the second adjustment signal to the scene adaptive engine; In response to the first adjustment signal, the intelligent agent automatic construction module dynamically reduces the matching priority of capability interfaces whose actual response latency is higher than the corresponding threshold and whose actual result accuracy is lower than the corresponding threshold in the capability interface screening of subsequent sub-tasks. In response to the second adjustment signal, the scene adaptive engine recalls a compensation strategy template corresponding to the current resource contention conflict type from a predefined backup strategy template library, and fuses the compensation strategy template with the currently adapted agent generation strategy to generate an enhanced generation strategy. The new execution performance parameters generated after the enhanced generation strategy is invoked by the agent automatic construction module are collected again by the state acquisition unit and input to the constraint factor generation unit to form a closed-loop iterative optimization.
2. The system according to claim 1, characterized in that, The business scenario perception module includes: A multimodal input interface is configured to receive business requirement input in at least one of the following modalities: text, voice, flowchart, and table. The modal fusion encoder is configured to extract features from inputs of different modalities separately, and fuse the features of each modality into a unified business semantic vector through a cross-modal attention mechanism; the cross-modal attention mechanism is implemented based on the Transformer architecture, and performs attention calculation using the first modal feature as the query vector and the second modal feature as the key vector and value vector; A scenario classifier is configured to classify the target business scenario based on the business semantic vector and output a scenario type identifier and a scenario feature parameter vector. The scenario feature parameters include business domain category, task complexity level, expected output type and compliance requirement level, wherein the task complexity level is determined comprehensively based on the expected value of the number of subtasks and the expected value of the interface call depth.
3. The system according to claim 1, characterized in that, The scene adaptive engine includes: The scenario-knowledge retrieval device is configured to construct a retrieval query vector based on the scenario feature parameters, perform vector retrieval in the domain knowledge graph, and recall candidate knowledge subgraphs related to the target business scenario; the vector retrieval adopts an approximate nearest neighbor search based on the FAISS index, and the recall number is [missing information]. , The value range is 5 to 20; the domain knowledge graph is a pre-built role-task-tool-data quadruple knowledge base for different business domains; The strategy adapter is configured to select an appropriate basic generation strategy template from a predefined generation strategy template library based on the retrieved candidate knowledge subgraph, and to parameterize the basic generation strategy template according to the scenario feature parameters to obtain a customized generation strategy; the parameterization includes adjusting the recursion depth of subtask decomposition according to the task complexity level, adjusting the output format constraint rules according to the expected output type, and adjusting the permission verification strength according to the compliance requirement level. The strategy validator is configured to perform compliance verification and feasibility assessment on the customized generated strategy, and output the customized generated strategy to the intelligent agent automatic construction module after the assessment is passed; the compliance verification includes at least data privacy compliance verification and interface permission compliance verification.
4. The system according to claim 1, characterized in that, The intelligent agent automatic construction module includes: The task decomposer is configured to recursively decompose the business objectives of the target business scenario into a hierarchical set of subtasks using a large language model combined with the domain knowledge graph, and to identify the data dependencies, temporal dependencies, and resource dependencies between the subtasks; the recursive decomposition stops when the current subtask has at least one matching capability interface in the capability interface library. The capability matching engine is configured to build a capability interface library and store each capability interface in a vectorized form. This vectorized storage is achieved by concatenating the name, description, input / output parameter structure, and example calls of each capability interface and then inputting them into the BERT model for encoding. Semantic matching is performed between the description information of each sub-task and the capability description information in the capability interface library. The cosine similarity between the description vector of each sub-task and the vector of each capability interface is calculated, and the top N candidate capability interfaces with the highest similarity for each sub-task are retrieved. N The value range is from 3 to 10; An assembler is configured to select the optimal capability interface from the candidate capability interface set of each subtask and combine them according to the task dependencies and task constraints to generate the set of intelligent agents and the interaction relationships between them. The selection of the optimal capability interface is based on the comprehensive matching score of each capability interface. The comprehensive matching score is determined by a weighted sum of the cosine similarity and the reliability score of the capability interface. The reliability score is dynamically updated based on the historical call success rate and average response time. An output type constraint is configured to constrain the output format and data structure of the intelligent agent set according to the expected output type of the target business scenario. The constraint specification is expressed in JSON Schema format.
5. The system according to claim 1, characterized in that, The interactive iterative optimization module includes: The inference chain visualization unit is configured to graphically display the entire inference process from business requirement analysis to agent assembly completion during the generation of the agent set. The entire inference process includes the reasoning basis of each decision node, the knowledge sources referenced, and the evaluation scores of candidate solutions. The graphical method uses a directed acyclic graph to display the inference relationship between each decision node. The feedback receiving unit is configured to provide a graphical interactive interface to receive user confirmation, modification, and rejection operations for the candidate solutions; the modification operation includes at least one of replacing the capability interface corresponding to the specified subtask, adjusting the execution order of the subtasks, and modifying the task constraints. The incremental optimization unit is configured to, based on the user's modification instructions, perform partial re-matching and replacement of the capability interfaces corresponding to the unconfirmed subtasks while keeping the configuration of the confirmed subtasks unchanged. The partial re-matching is only performed on the subtree where the modified subtask is located and does not involve full regeneration. The memory update unit is configured to write the final agent configuration confirmed by the user, the corresponding business scenario features, and user preference information into the long-term memory. The long-term memory is implemented using a vector database, with business scenario feature vectors as indexes and the final agent configuration as storage values, for initializing the generation strategy of subsequent similar business scenarios.
6. The system according to claim 1, characterized in that, The deployment and execution module includes: An interface generator is configured to automatically generate application programming interface documents and interface code that conform to the Representational State Transmission Specification or the Graphical Query Language Specification based on the capability interface signatures of each agent in the agent set. The execution engine is configured to schedule the execution order of each agent according to the task dependency relationship and manage the data transfer and state synchronization between agents; the scheduling method is based on the topological sorting of the directed acyclic graph, and when there are multiple subtasks with an in-degree of zero, a parallel scheduling strategy is adopted to execute them simultaneously. An exception handler is configured to monitor the execution status of each agent and execute preset exception handling logic when an exception is detected. The exception handling logic includes task retry, degraded execution, and breakpoint resumption. The task retry adopts an exponential backoff strategy with an initial retry interval of 1 second and a maximum number of retries of 3. The breakpoint resumption records the execution completion status at the subtask level and resumes execution from the first unfinished subtask after the system recovers. An execution log recorder is configured to record the decision-making basis, intermediate states, and final results of the entire execution process of the intelligent agent set, and generate a traceable execution audit log; the execution audit log is stored in a blockchain hash chain structure, and each log block contains the hash value of the previous block, the current timestamp, and the execution event record.
7. The system according to claim 1, characterized in that: In the status acquisition unit, the preset performance benchmark threshold for the interface response latency is no more than 500 milliseconds for a single call response time, the preset performance benchmark threshold for the token consumption rate is no more than 1000 tokens per second, and the preset performance benchmark threshold for the result accuracy is no less than 95%. The constraint factor generation unit compares the actual performance parameters with preset performance benchmark thresholds by calculating the deviation ratio between the actual measured value of each parameter and the corresponding threshold. The formula for calculating the deviation ratio is as follows: When the deviation ratio exceeds a preset deviation tolerance of ±10%, a first adjustment signal carrying the deviation ratio value and the corresponding capability interface identifier is generated. The resource contention conflict record includes records of multiple subtasks competing for the same database connection pool, the same computing resource, or the same external application interface within the same time window; the duration of the time window is 5 seconds; the conflict rule base contains conflict levels and preset mitigation actions corresponding to different conflict types, the conflict levels are divided into three levels: low, medium, and high, and the preset mitigation actions include at least one of increasing resource quotas, enabling request queuing, and implementing rate limiting.
8. The system according to claim 1, characterized in that, The specific method by which the intelligent agent automatic construction module responds to the first adjustment signal by reducing the capability interface matching priority is as follows: After receiving the first adjustment signal, the capability matching engine extracts the deviation ratio value corresponding to each capability interface. Calculate the penalty coefficient for each capability interface based on the aforementioned deviation ratio value. The calculation formula is: ,in The deviation ratio value is... This is a preset proportional coefficient. The value ranges from 0.5 to 1.
0. The value range is from 0 to 0.6; The original cosine similarity score between each subtask description vector and each capability interface vector is used to calculate the similarity score. Multiply by (1 - the penalty coefficient of the corresponding capability interface) ), to obtain the corrected overall matching score ; Based on the corrected comprehensive matching score, the candidate capability interfaces of each subtask are reordered, and capability interfaces with a corrected comprehensive matching score lower than a preset entry threshold are removed from the candidate set. The preset entry threshold is 0.
3.
9. The system according to claim 1, characterized in that, The specific way in which the scene adaptive engine responds to the second adjustment signal to generate an enhanced generation strategy is as follows: The policy adapter extracts the policy parameter matrix of the currently adapted agent generation policy. , as the first feature representation; The strategy parameter matrix includes numerical representations of scenario classification parameters, task decomposition parameters, capability matching weights, and output constraint parameters. Based on the resource contention conflict type carried in the second adjustment signal, the corresponding compensation strategy template is recalled from the backup strategy template library, and the parameter matrix of the compensation strategy template is extracted. , as a second feature representation; The first feature representation and the second feature representation are deeply fused using a cross-attention mechanism, specifically including: using the first feature representation as a query matrix. The second feature is represented as a key matrix. Sum matrix Calculate the attention weight matrix ,in As the feature dimension, the feature matrix is fused. Based on the fusion feature matrix The enhanced generation strategy is generated through a feedforward neural network. The enhanced generation strategy includes both the scene adaptation parameters of the currently adapted agent generation strategy and the concurrency control parameters of the compensation strategy template. The concurrency control parameters include at least the resource isolation level and the concurrent request rate limiting threshold. The scene adaptive engine pushes the enhanced generation strategy to the agent automatic construction module, replacing the currently adapted agent generation strategy.
10. A method for automatically generating intelligent agents for business scenarios, characterized in that, Includes the following steps: Step S1: Obtain the business requirement information input by the user, perform multimodal semantic parsing on the business requirement information, and identify the type and feature parameters of the target business scenario; Step S2: Based on the scene feature parameters, retrieve domain knowledge matching the target business scene from the pre-constructed domain knowledge graph, and dynamically adapt the intelligent agent generation strategy based on the retrieved domain knowledge. Step S3: According to the adapted generation strategy, the target business scenario is decomposed into multiple sub-tasks, the task dependencies and task constraints between each sub-task are determined, and corresponding capability interfaces are assigned to each sub-task through capability graph matching, generating a set of intelligent agents containing one or more intelligent agents and the interaction relationships between intelligent agents. Step S4: Show the user the candidate schemes and generation reasoning process of the generated intelligent agent set, receive the user's feedback instructions, iteratively adjust the intelligent agent set based on the feedback instructions, and write the optimization results confirmed by the user into the long-term memory. Step S5: Deploy the set of intelligent agents confirmed by the user to the target business system, generate an application programming interface to achieve the docking with the target business system, and execute the set of intelligent agents to complete the business tasks corresponding to the target business scenario; Step S6: During the execution of the intelligent agent set, the actual execution performance parameters and resource contention conflict records of each subtask are collected in real time according to a preset sampling period. The actual execution performance parameters include at least interface response latency, token consumption rate, and result accuracy. Step S7: Compare the actual performance parameters with a preset performance benchmark threshold to generate a first adjustment signal; In addition, the resource contention conflict records are matched with a preset conflict rule base to generate a second adjustment signal; In step S8, during the capability matching process of step S3, the first adjustment signal is fed back to dynamically reduce the matching priority of capability interfaces whose actual response latency is higher than the corresponding threshold and whose actual result accuracy is lower than the corresponding threshold. At the same time, during the strategy adaptation process of step S2, the second adjustment signal is fed back to recall the compensation strategy template corresponding to the current resource contention conflict type from the backup strategy template library, and the compensation strategy template is fused with the currently adapted agent generation strategy to generate an enhanced generation strategy. Step S9: The enhanced generation strategy generated in step S8 is used as the updated agent generation strategy. The process returns to step S5 to execute the agent set for the next round. The newly generated execution performance parameters are then re-inputted into step S6 to form a closed-loop iterative optimization.