An agent management and control framework self-evolution method and system based on cognitive learning theory and multi-dimensional editable surface
By using a multidimensional editable surface based on cognitive learning theory, the automated management of the intelligent agent control framework is improved, which solves the problems of manual dependence and insufficient security in the existing technology, and realizes efficient and secure multidimensional optimization and knowledge retention of intelligent agents.
Patent Information
- Application Number
- CN202611246665.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-27
AI Technical Summary
The existing intelligent agent management framework relies on manual optimization in the management of prompt word assembly, tool scheduling, and memory update, resulting in high evaluation costs, lack of multi-dimensional degradation judgment, and lack of security mechanisms in the automatic editing process, which can easily lead to increased resource consumption or decreased output compliance. The skill management module lacks the ability to assess and decompose complexity, resulting in knowledge forgetting and decreased retrieval accuracy.
By employing a multidimensional editable surface based on cognitive learning theory, and through an improved SM-2 interval repetition scheduling mechanism, skill complexity assessment and decomposition, a two-layer self-evolutionary control loop, and a temporary-verification-write security governance mechanism, the system achieves automated management and security optimization of the agent control framework.
It effectively blocked the positive feedback loop, improved the knowledge retention rate, improved the accuracy of skill retrieval, ensured the safety and reliability of automated editing, and prevented the increase in resource consumption or the decrease in output compliance caused by the optimization of a single indicator.
Smart Images

Figure CN123180291A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the interdisciplinary field of software engineering and cognitive science, specifically to a self-evolutionary method and system for intelligent agent management framework based on cognitive learning theory and multidimensional editable surfaces. Background Technology
[0002] The reliability of the behavior of large language model agents largely depends on the management capabilities of their external agent control framework in areas such as prompt word assembly, tool scheduling, and memory updates. Existing agent control frameworks mainly rely on manual tuning in their design and maintenance, requiring repeated trials for configuration modifications, resulting in high evaluation costs. Existing automatic optimization schemes mostly target single dimensions such as prompt words and prioritize task success rate, lacking multi-dimensional degradation judgments for task completion, output quality, resource efficiency, and security compliance. This makes it easy to introduce hidden degradations such as increased resource consumption or decreased output compliance when improving a single metric.
[0003] In terms of memory and skill management, current state updates generally adopt a linear decay model with a fixed time window, failing to distinguish the differentiated impact of access events such as active invocation and passive context injection on memory retention. This may create a positive feedback loop of "injection-reference-reinforcement," leading to the premature forgetting of high-value knowledge while shallow information occupies storage for a long time. The spaced repetition effect in cognitive psychology has not yet been systematically engineered and applied to the intelligent agent management framework. At the same time, after long-term use, the skill definition continues to expand, resulting in excessively broad coverage and decreased accuracy of vector retrieval and instruction compliance in large language models. Most existing skill management modules only support merging and lack the ability to automatically split based on multi-dimensional complexity assessment.
[0004] Furthermore, the automatic editing process lacks a security mechanism that separates temporary storage, verification, and writing. Automatically generated modifications lack dependency deduction and verification before being written, making it difficult to guarantee the security and reliability of automatic optimization results. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a self-evolutionary method and system for intelligent agent management framework based on cognitive learning theory and multidimensional editable surfaces, thus solving the problems mentioned in the background.
[0006] To achieve the above objectives, the technical solution of the present invention is as follows: Firstly, a self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces includes the following steps: S1: Construct multi-dimensional editable surfaces, defining the engineering elements of the intelligent agent management framework as five types of editable surfaces, including prompt word surface, tool surface, middleware surface, skill surface, and architecture boundary surface; maintain independent version numbers, change logs, rollback functions, lock flags, and parent node references for each type of surface; among them, the skill surface supports a parent-child skill hierarchy structure and sets anti-infinite recursion constraints; S2: Construct a cognitively driven memory-skill management subsystem, specifically including: S21: An improved SM-2 interval repetition scheduling mechanism is applied to the historical state data generated by agent interaction, and the retention period and difficulty factor are updated according to the data access event type; among them, the memory quality score weight assigned to passive context injection events is lower than that of active invocation events. The effective memory quality score is obtained by multiplying the mapped memory quality score by a preset passive decay coefficient, so as to reduce the contribution of passive injection to the extension of the retention period and block the positive feedback loop of "injection-reference-reinforcement". S22: Calculate the multi-dimensional complexity score of each skill in the skill surface. This score is based on the normalized weighted sum of skill description length, number of execution steps, number of triggers, and concept density. When the score exceeds the preset splitting threshold, a splitting operation is triggered, splitting the original skill into multiple sub-skills with non-overlapping sets of triggers, and generating a routing skill that retains the original triggers. The splitting operation must be verified for functional integrity. The sub-skills generated by the splitting are marked with child node identifiers and will not be split again. S23: When constructing the input context, perform a context selective injection operation: retrieve historical state data and skills related to the current task, and inject the retrieved items into the input-related data and skills within the context window budget that does not exceed the preset proportion of the context window.
[0007] S3: Construct a two-layer self-evolutionary control loop, including: The edit candidate generation module generates an edit candidate set for the editable surface; the execution module applies the edit candidate set in an isolated sandbox environment to produce a first execution result, which is compared with a second execution result in a baseline environment where the edit candidate set is not applied; the evaluation module quantifies the two sets of results in multiple dimensions, including task completion, output quality, resource efficiency, and security compliance. If the quantified results in all dimensions are not inferior to the second execution result, and the optimization performance score synthesized by candidate adoption rate, retrieval hit rate, and response timeliness is not lower than a preset threshold, the edit candidate set is adopted. S4: Construct a security governance layer that integrates a three-stage mechanism of temporary storage, verification, and writing. For the adopted edit candidate set, it is temporarily stored in a priority queue. In the verification stage, semantic inference verification is performed based on the inter-surface dependency graph. The inter-surface dependency graph is used to describe the upstream-downstream dependency relationship between the five types of editable surfaces. After user approval, the writing is performed. S5: Construct a workspace-driven continuous learning module, using the workspace as a unified data source to carry long-term memory files, skill bases, and file-stored knowledge graphs managed based on an improved SM-2 interval repetition scheduling mechanism; the file-stored knowledge graph predefines multiple relation types belonging to four domains and multiple edge sources ordered in descending order of credibility, supports append writing, atomic writing, and cross-process file locks, and triggers graph compression when the total number of edges in the graph exceeds a preset edge threshold, merging or deleting low-weight redundant relation edges; S6: Construct a consistency maintenance module with a closed loop of verification-recycling-rollback. It periodically scans expired state data, conflicting skill definitions, and inconsistent orphan edges and circular edges in the knowledge graph in the work area, and performs automatic recycling or rollback operations based on the interface stability score.
[0008] Secondly, a self-evolving system of intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces includes: The surface module is used to organize the engineering elements of the intelligent agent management framework into multiple versioned editable surfaces and maintain version and rollback information; The cognitive management module includes an interval scheduler, a skill complexity evaluator and decomposer, a context-selective injection pipeline, an optimization efficiency quantifier, and a file-stored knowledge graph engine. The evolution control module includes an editing candidate generation module, an execution module, and an evaluation module; the evaluation module is used to output multi-dimensional evaluations and combine them with optimization performance scores to determine adoption. The security governance module includes a three-stage controller for temporary storage, verification, and writing, as well as a policy engine. The workspace module is used to host and maintain editable surfaces, memories, skills, and knowledge graphs using a unified data source. The consistency maintenance module is used to periodically scan for inconsistencies in the work area and trigger recycling or rollback operations.
[0009] Thirdly, a computing device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements a self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces.
[0010] Fourthly, a computer-readable storage medium storing a computer program that, when executed by a processor, implements a self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and a multidimensional editable surface.
[0011] This invention provides a self-evolutionary method and system for intelligent agent management framework based on cognitive learning theory and multidimensional editable surfaces. Compared with existing technologies, it has the following advantages: The improved SM-2 interval repetitive scheduling mechanism updates the retention period and difficulty factor differently based on different event types such as active invocation and passive injection, which can block the positive feedback loop of "injection-reference-reinforcement". Compared with linear decay within a fixed time window, this mechanism can reduce the situation where shallow information occupies storage for a long time and high-value knowledge is forgotten prematurely, thereby improving the knowledge retention rate of the agent in long-term tasks.
[0012] A skill complexity assessment and decomposition mechanism is introduced. By calculating a multi-dimensional complexity score that includes skill description length, number of execution steps, and concept density, overloaded skills are automatically identified and decomposition operations are triggered. Combined with routing skill generation and functional integrity verification, this mechanism can transform bloated skill definitions into fine-grained sets of sub-skills, which helps reduce the average skill description length and improves the problems of decreased vector retrieval accuracy and reduced instruction compliance accuracy in large language models caused by excessively long skill definitions.
[0013] A two-layer self-evolutionary control loop was constructed, utilizing the collaborative work of proposal, execution, and evaluation modules to compare execution results before and after editing in an isolated sandbox environment. Through a comprehensive judgment based on multi-dimensional non-degenerate criteria and optimization performance scores, editing is only adopted when the performance is not inferior to the baseline and meets the performance threshold. This mechanism provides multi-dimensional anti-degenerate safeguards for the agent's automatic optimization, helping to mitigate hidden degradation problems such as increased resource consumption or decreased output compliance caused by optimizing a single metric.
[0014] It integrates a three-stage security governance mechanism of temporary storage, verification, and writing, performing semantic inference and verification based on the dependency graph between surfaces before editing and writing. By simulating the post-change running state through a large language model and combining it with a rule engine to detect fault mode keywords, this mechanism can intercept potential logical conflicts and errors before persistence, which helps to improve the security and reliability of automated editing and reduce the risk of noise introduced by automatic writing. Attached Figure Description
[0015] Figure 1 This is a system block diagram of the system of the present invention.
[0016] Figure 2 This is a schematic diagram of the overall process of the method of the present invention.
[0017] Figure 3This is a schematic diagram of the skill complexity assessment and breakdown process of the present invention.
[0018] Figure 4 This is a schematic diagram of the two-layer self-evolution control loop of the present invention.
[0019] Figure 5 This is a schematic diagram of the consistency maintenance process of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Please see Figures 1 to 5 As shown, the embodiments of the present invention provide the following technical solutions: As an embodiment of the present invention: This invention relates to a self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces, comprising the following steps: S1: Constructing Multidimensional Editable Surfaces The basic framework for constructing all operable objects that can be automatically modified is the multidimensional editable surface, which is the configuration abstraction layer that can be automatically modified in the intelligent agent management framework.
[0022] All engineering elements in the agent management framework are defined as five types of editable surfaces: prompt word surface, tool surface, middleware surface, skill surface, and architecture boundary surface. Among them, engineering elements are the core configuration items used to construct the agent's behavioral logic in the agent management framework.
[0023] Among them, the prompt word surface, tool surface, middleware surface, skill surface, and architecture boundary surface correspond to the prompt word assembly, tool scheduling, middleware invocation, skill management, and architecture boundary constraints mentioned in the background technology, respectively.
[0024] In this embodiment, each type of editable surface is equipped with an independent management mechanism, including: Version Number: The version number automatically increments with each modification to the editable surface, tracking its evolution history. Change Log: Records detailed information about each modification, including the operation type, specific changes, timestamp, and operator. Rollback Function: Based on the change log, it restores the surface state to a previous version by reversing all recorded operations after a specific version. Lock Flag: When an editable surface is being modified, a lock flag prevents other concurrent modification operations. Parent Node Reference: Designed on the skill surface to build parent-child skill hierarchies. The skill surface supports parent-child skill hierarchies. When a complex root skill is broken down into multiple fine-grained sub-skills, the original skill becomes a routing skill, which routes tasks to the appropriate sub-skills based on user requests. The new sub-skill records a reference to its parent skill (i.e., the routing skill).
[0025] At the same time, a hard constraint is set: if a skill is already a child node of the corresponding parent skill, then no further splitting operation will be performed on it, that is, a skill that is already a child node will not be split again.
[0026] Step S2: Construct a cognitively driven memory-skill management subsystem A cognitively driven memory-skill management subsystem is constructed, which intelligently manages historical state data (i.e., memory) and skills through three sub-mechanisms, including the following steps: Step S21: Apply the improved SM-2 interval repetition scheduling mechanism SM-2, or SuperMemo-2, is an interval repetition algorithm. The improved SM-2 interval repetition scheduling mechanism manages the lifecycle of historical state data generated by agent interactions, replacing the traditional fixed-time decay in this embodiment. Using the improved SM-2 algorithm, the retention period and difficulty factor are updated based on the event type of the data being accessed. The accessed event types are categorized as: active successful call events, active failed call events, and passive context injection events. The key improvement of this mechanism is assigning a lower recall quality score weight to passive context injection events, making their impact on extending the retention period lower than that of active call events. The specific update algorithm is as follows: Suppose that one piece of historical state data currently has a difficulty factor and a repetition count. When this historical state data is accessed: Step a1, Mapping Memory Quality Score: Based on the type of event accessed, a memory quality score q between 0 and 5 is determined, i.e., q∈[0,5]. If the event is a successful active invocation, it is mapped to a high score, for example, a memory quality score of at least 3. If the event is a failed active invocation, it is mapped to a low score, for example, a memory quality score less than 3. If the accessed event is a passive context injection event, the mapped memory quality score q is multiplied by a preset passive attenuation coefficient ω to obtain the corrected q′; subsequent memory quality threshold comparisons, adjustment amount Δ calculations, and difficulty factor updates all use q′; where ω∈[0.4,0.8], and in this embodiment, ω=0.6.
[0027] When q′≥Q1, in this embodiment, if the score is not lower than 3, it indicates good memory performance. The number of repetitions n is then increased by 1, and the adjustment amount Δ of the difficulty factor EF is calculated based on the mapped recall quality score q′, ensuring that Δ is positively correlated with the mapped recall quality score q′. The difficulty factor EF1 is then updated to min(EF). max ,max(EF min ,EF+Δ)); where EF1 is the updated difficulty factor, Q1 is the preset memory quality threshold, and EF min As the preset lower limit of the difficulty factor, EF max This is the preset upper limit of the difficulty factor; the adjustment amount Δ is obtained as follows: when q≥Q1, first determine whether the access event is a passive context injection event; if so, then q′=ωq, otherwise q′=q; and then use Δ=max(0,α-(Q1) to determine the upper limit of the difficulty factor. max -q′)×(β+(Q1 max -q′)×γ)), to obtain the adjustment amount Δ; α, β, and γ are all preset coefficient values, and β>γ, Q1 max This represents the maximum theoretical value for the recall quality score. In this embodiment, Q1 max The value is 5, α∈[0.1,0.5], α can take the value 0.25, β∈[0.05,0.3], β can take the value 0.12, γ∈[0.01,0.1], γ can take the value 0.04, EF min The value is 1.2, EF max The value is 3.5, δ is 0.15, and N... th The value is 5; when Δ < 0, Δ = 0; when EF1 > EF max When EF1 = EFmax, take EF1. When q′<Q1, in this embodiment, if the score is lower than 3, it indicates poor memory performance. In this case, the number of repetitions n is reset to 0, the difficulty factor EF is reduced, and the difficulty factor EF1 is updated to max(EF). min ,EF-δ), where δ is the preset penalty decay step size, if EF1>EF max Then take EF1 = EFmax ; When the number of repetitions n≥N th At that time, the next retention period I next From this retention period I current The result is calculated by multiplying by the updated difficulty factor EF1, where, when I next >I max When, take I next =I max I max To preset the maximum retention period, in this embodiment, I max The value is 365 days, i.e., I next =min(I max ,I current ×EF1); where N th The preset stable repetition threshold is the threshold for determining the number of repetitions required for memory to enter a stable growth period. By reducing the weight of the positive impact of passively injected events, this mechanism reduces the following positive feedback loop: the system automatically injects a memory (i.e., historical state data) that is referenced in subsequent tasks; the referencing behavior is treated as a successful invocation; the memory review interval is incorrectly extended; and the system injects the memory more frequently.
[0028] S22: Calculate skill complexity and trigger splitting When the multidimensional complexity score of a skill exceeds a threshold, it is automatically split into multiple fine-grained sub-skills. A multidimensional complexity score is calculated for each skill. This multidimensional complexity score is expressed as C=w L ×f L (L / L0)+w S ×f S (S / S0)+w T ×f T (T / T0)+w D ×f D (D / D0) is derived, where C is the multi-dimensional complexity score of the relevant skill, L is the skill description length (the total number of characters in the skill description), S is the number of execution steps (the total number of execution steps contained in the skill description), T is the number of triggers (the total number of triggers for the skill), and D is the concept density. The concept density D is the ratio of the number of terminology keywords identified in the skill description to the total number of words. That is, it is obtained by scanning the skill description and identifying the total number of terminology keywords belonging to the pre-built technical dictionary of this field, divided by the total number of words after word segmentation of the skill description. The pre-built technical dictionary of this field is obtained in the following ways: high-frequency technical terms are extracted from historical task data and formed after manual review; or concept words are extracted from the concept layer domain nodes of the file-stored knowledge graph as dictionary entries.
[0029] L0, S0, T0, and D0 are the normalized baseline values for each dimension. In this embodiment, L0 is 800 characters, S0 is 8 execution steps, T0 is 5 triggers, and D0 is 0.3. L w S w T w D Let w be the weight coefficients for each dimension, and satisfy w L +w S +w T +w D =1, in this embodiment, w L The value is 0.2, w S The value is 0.4, w T The value is 0.25, w D The value is 0.15; f L f S f T f D The normalization function for each dimension is uniformly adopted as the piecewise saturated normalization function f(x)=min(x,1), which is fixed at 1 when the dimension ratio exceeds 1, and is used to unify the dimensions of each dimension to a comparable scale.
[0030] In the background, all skills are scanned asynchronously. When the multi-dimensional complexity score of a relevant skill exceeds the preset splitting threshold, in this embodiment, the splitting threshold is set to 0.7, and the skill is added to the splitting candidate queue.
[0031] The splitting operation is as follows: The splitting engine performs cluster analysis on the trigger set of the original skill, making each trigger type semantically cohesive. Then, it generates an independent sub-skill for each trigger type, where the trigger sets of the sub-skills are mutually exclusive, and their combined functionality completely covers all the capabilities of the original skill. Simultaneously, a routing skill is generated, which completely inherits all the triggers of the original skill, but its internal implementation becomes a request dispatcher based on vector similarity calculation.
[0032] In this embodiment, clustering adopts hierarchical clustering based on the cosine similarity of trigger text vectors. The hierarchical clustering process is as follows: each trigger text vector is used as an initial cluster; the average cosine similarity between any two clusters is calculated, and the two clusters with the highest similarity are merged. After merging, the center vector of the new cluster is calculated; the above merging process is repeated, and a preset similarity threshold θ∈[0.6,0.8] is extracted. In this embodiment, 0.65 is used until the similarity between clusters is lower than the preset similarity threshold; each type of trigger generates a sub-skill, and the trigger sets of sub-skills do not overlap; the routing skill selects the top k sub-skills with the highest similarity through vector retrieval, where k is 3 by default. Functional integrity verification includes: the union of the sub-skill trigger sets is equal to the original skill trigger set; the sub-skill functional descriptions do not conflict with each other; the routing skill can map all sub-skills.
[0033] Simultaneously, the splitting results undergo functional integrity verification. This verification checks include: whether the source skill exists, whether there are functional conflicts between newly generated sub-skills, and whether the trigger allocation is reasonable. Only after passing verification will the splitting plan be submitted to the user for approval, and only after approval will it be finally written into the workspace.
[0034] S23: Perform context-selective injection operation In this embodiment, when constructing the input context for a large language model, highly relevant information is proactively supplemented to alleviate the problem of insufficient context information caused by traditional pruning-based context engines.
[0035] Extract the pre-defined multi-trigger protection strategy. The context-selective injection operation will only be initiated when the following three conditions are met simultaneously: the length of the user query exceeds the preset character length threshold (e.g., 10 characters); the query contains intent keywords from the preset dictionary; and the number of dialogue rounds since the last context-selective injection operation has exceeded the preset number of rounds threshold (e.g., 3 rounds).
[0036] Once the triggering conditions are met, the context-selective injection operation is as follows: Step c1: Retrieve relevant entries: Encode the user query using a text embedding model, perform an approximate nearest neighbor search in the memory vector library and the skill vector library, and take the top-ranked results as a seed node set. In this embodiment, the top 20 results can be taken as the seed node set.
[0037] Step c2, Knowledge Graph Enhanced Retrieval: Starting from the seed node, expand neighboring nodes within a finite number of hops along the relation edges of the pre-constructed file-stored knowledge graph. Simultaneously, calculate the path weight for each expansion path, which is the product of the weights of all edges on the path, and set a lower limit for the path weight (e.g., 0.1). Neighboring nodes with path weights lower than this lower limit will be filtered out and not included in the candidate list.
[0038] Step c3, Context Window Budget Truncation: Sort all candidate entries obtained through retrieval and knowledge graph expansion according to their overall relevance to the query. The overall relevance is calculated by weighting the initial retrieval score and path weight. Within a context window budget that does not exceed a preset proportion (e.g., 5%) of the current large language model's context window size, truncate the highest-ranking entries in order.
[0039] Step c4, Formatted Injection: The final selected item is formatted into a piece of text and appended to the end of the system prompt message, thereby providing contextual supplementary content for this task.
[0040] S3: Constructing a two-layer self-evolutionary control loop The two-layer self-evolutionary control loop is composed of an editing candidate generation module, an execution module, and an evaluation module working together, wherein: The edit candidate generation module is used to monitor task failure logs and user feedback on corrections, analyze the root cause of the problem, locate the editable surface that needs to be modified, such as a prompt word template, and generate a corresponding set of edit candidates, such as a modified prompt word text.
[0041] The candidate generation module executes in the following order: failure log / correction feedback, extracting failed task IDs, locating associated surfaces and configuration items, matching editing templates, and generating editing candidates. Editing templates include prompt word rewriting templates, tool parameter adjustment templates, and middleware timeout configuration templates.
[0042] Execution Module: In an isolated sandbox environment, based on the edit candidate set generated by the edit candidate generation module, a pre-defined evaluation task is run to obtain the first execution result. Simultaneously, the exact same task is run in parallel in a baseline environment where no new edits are applied to obtain the second execution result, which serves as a comparison benchmark.
[0043] Evaluation module: This module assesses the first and second execution results across four dimensions: task completion, output quality, resource efficiency, and security compliance. The evaluation employs a multi-dimensional, non-degradable decision-making strategy; that is, a preliminary pass is only achieved when all metrics, after editing, are no lower than the baseline environment.
[0044] In this embodiment, task completion rate = number of successfully completed tasks / total number of tasks; output quality = normalized mean of output quality score; resource efficiency = 1-min(resource consumption based on model call / resource quota based on model preset, 1); security compliance = 1-min(number of compliance violations / total number of interactions, 1); and the value range of each dimension is [0, 1].
[0045] It should be noted that the multi-dimensional non-degradation judgment strategy requires that all four indicators—task completion, output quality, resource efficiency, and security compliance—must not be worse than the baseline environment after editing, rather than simply looking at the overall average score. For example, if an editing candidate improves in task completion and maintains the same output quality, but decreases in resource efficiency, it will be rejected due to degradation in the resource efficiency dimension.
[0046] The optimization performance score uses multiplicative synthesis rather than linear weighting because candidate adoption rate, retrieval hit rate, and response timeliness are coupled. A significant degradation in any dimension will substantially weaken the overall self-evolutionary performance. Therefore, if any dimension is set to 0 or falls below the corresponding minimum requirement due to insufficient data, the optimization performance score will not reach the adoption threshold, thus preventing a single dimension from being artificially inflated and masking deficiencies in other dimensions.
[0047] In addition, the evaluation module also considers the indicators corresponding to the optimization performance score for assessment. The optimization performance score is synthesized as follows: Step d1: Calculate the candidate acceptance rate: Use the number of accepted edit candidates as the numerator; use the total number of accepted, rejected, and postponed candidates as the denominator, and calculate a ratio. If the denominator is zero, the candidate acceptance rate is set to 0, and a data insufficiency flag is generated.
[0048] Step d2: Calculate the retrieval hit rate: Use the number of relevant memories hit in the retrieval task as the numerator; use the total number of relevant memories to be recalled as the denominator, and calculate a ratio. If the denominator is zero, the retrieval hit rate is set to 0, and a data insufficiency flag is generated.
[0049] Step d3: Calculate response timeliness: Take the reciprocal of the average evaluation delay over a calculation period; then divide it by a preset maximum delay reciprocal for normalization. If the denominator is zero, the response timeliness is set to 0, and a data insufficiency flag is generated.
[0050] Step d4: Synthesize the final score: Multiply the values of the three dimensions mentioned above. If any input data for the candidate adoption rate, retrieval hit rate, or response timeliness is missing, the corresponding output record is marked as insufficient data, and the performance score for this optimization is determined to be invalid and does not meet the adoption criteria.
[0051] The evaluation module will only give the final decision of "adoption" when a candidate for editing does not deteriorate in the four dimensions of task completion, output quality, resource efficiency, and security compliance, and its optimization performance score is not lower than the pre-set minimum score threshold.
[0052] S4: Construct a security governance layer for temporary storage, verification, and writing. For the set of edit candidates adopted by the evaluated module, they are input into the pre-built security governance layer, which is executed as follows: S41. Temporary Storage: The adopted edit candidate set enters a priority-ordered waiting queue. At the same time, the editable surface to be modified is locked to prevent interference from other operations.
[0053] S42. Verification: Semantic inference verification based on the inter-surface dependency graph. Specific steps are as follows: S42-1. Query a pre-built graph describing the dependencies between editable surfaces and find all upper-level surfaces that depend on the current surface to be modified.
[0054] In this embodiment, the inter-surface dependency graph is constructed as follows: the configuration reference fields of the five types of editable surfaces are traversed, cross-layer dependencies are extracted, and directed edges are formed; for example, when the prompt word surface references the tool layer interface, a dependency edge is established from the prompt word surface to the tool layer.
[0055] S42-2. Call the large language model, concatenate the configuration content to be modified with the current configuration of all upper-layer surfaces and input it into the large language model, outputting a structured runtime log text to simulate the runtime status of the upper-layer surfaces after dependency changes.
[0056] S42-3. Using a preset rule engine, scan the generated deduction text and check whether it matches the preset fault mode keyword list, which includes words such as "JSON parsing error", "field missing", and "context length exceeds the limit".
[0057] In this embodiment, the rule engine uses fuzzy matching to detect fault pattern keywords in the inferred text; when any keyword in the list is hit, or the number of hits exceeds a preset hit threshold, for example, the preset hit threshold is 3, the verification is determined to be a failure.
[0058] S42-4. If any fault mode keyword is hit in the simulation text, the verification will fail.
[0059] S43. Writing: Only edit candidate sets that pass the verification phase will be submitted to the user for final approval. After verification, a summary of the changes will be pushed to the user's approval interface; after obtaining the user's explicit consent, the changes will be persistently written to the corresponding editable surface, and the surface will be unlocked; if the user rejects the change, the current edit candidate set will be discarded and the target surface will be unlocked.
[0060] S5: Building a workspace-driven continuous learning module A standardized workspace was established as the system's unified data source, where all persistent states are centrally stored. Within the workspace, a file-based knowledge graph is used, stored as files in subdirectories. In this embodiment, the workspace includes the following sub-areas: a constraint file area for storing Markdown-formatted constraint files; a long-term memory file area for storing long-term memory files managed by an improved SM-2 interval repetition scheduling mechanism, where each record includes the memory content, difficulty factor, number of repetitions, next retention period, and timestamp; a skill library area for storing skill definitions; and a knowledge graph edge data area for storing JSONL-formatted graph edge data. Each area is persistently stored through the file system. During writing, temporary files with renaming are used to ensure atomicity, and during reading, cross-process mutual exclusion is achieved through operating system file locks.
[0061] The edge data of the graph, i.e. the relationships between nodes, is in JSONL format. JSONL stands for JSON Lines, meaning each line represents a JSON record, appended to a dedicated file. Each line is an independent JSON record containing fields such as source node, target node, relationship type, weight, timestamp, and source tag.
[0062] The file-stored knowledge graph extracts predefined relation types belonging to four different domains (inter-memory domain, inter-skill domain, cross-domain relation domain, and concept layer domain), and sets independent weight ranges and decay parameters for each relation. In this embodiment, the relation types include the following nine types: For the inter-memory domain: memory-memory temporal relation, memory-memory co-occurrence relation; For the inter-skill domain: skill-skill extension relation, skill-skill substitution relation; For the cross-domain relation domain: memory-skill trigger relation, skill-tool call relation, skill-middleware dependency relation; For the concept layer domain: concept-concept superordinate relation, concept-concept related relation.
[0063] Meanwhile, the sources of edges are divided into 7 levels according to their confidence level from high to low. In this embodiment, the 7 levels are as follows: explicit user confirmation, user editing and correction, rule engine verification passed, user approval passed, multi-round task verification passed, automatic generation by the system, and automatic inference with low confidence. This source information is marked in the source field of each edge record.
[0064] Among them, edges with low confidence that are automatically inferred from sources (such as those automatically generated by large language models) can be reviewed and deleted by users at any time.
[0065] This file-based knowledge graph supports atomic writes and cross-process file locks, ensuring data security under concurrent operations. Atomic writes are achieved by first writing the new record to a temporary file and then replacing the original file with a renamed version; cross-process locks use operating system file locks. During graph compression, edges that meet the deletion criteria are merged according to their relation type. The weight after merging is the arithmetic mean of the weights of the merged edges, the timestamp is the latest value, and the source tag is updated to system compression. Before deleting an edge, it is necessary to determine whether the node will still be reachable after deletion.
[0066] Meanwhile, its index structure is rapidly reconstructed from the edge data file at any time. When the graph becomes too large, for example, when the total number of edges exceeds a preset edge count threshold (in this embodiment, the preset edge count threshold is 5000), graph compression is triggered. Graph compression only merges or directly deletes edges that simultaneously meet the following conditions: the edge weight is below a preset redundancy threshold; the edge has not been queried or participated in path expansion within the most recent preset time window; and deletion will not disrupt node connectivity. High-weight core edges and recently active edges are generally not deleted. By deleting low-weight redundant relationship edges, the query performance of the graph structure is maintained, while the core knowledge associations required for long-term tasks are preserved.
[0067] S6: Construct a closed-loop consistency maintenance module Periodically perform consistency maintenance operations, which involves a full scan of the entire work area to identify various inconsistencies, such as expired state data that has passed its expiration date, skill definitions that conflict with each other's triggers or functions, orphan edges in the knowledge graph that no longer exist but still remain, and circular edges that, once formed, will lead to infinite loops in relational reasoning.
[0068] The detection methods for orphan edges include: traversing the graph edge list and checking whether the source and target nodes still exist in the corresponding memory / skill / concept node sets; performing topological sorting or depth-first traversal on the graph adjacency list and marking back edges; and comparing the Jaccard similarity of each pair of trigger sets within the same skill set, identifying a conflict if the similarity exceeds 0.8 and the functional descriptions are different.
[0069] An interface stability score is calculated based on the editing history of each interface or module. In this embodiment, the method is as follows: count the number of conflicts and runtime errors in the last 30 modifications, and calculate the interface stability score as 1 / (1 + number of conflicts × w1 + number of errors × w2), where w1 = 0.6 and w2 = 0.4. When the interface stability score is higher than the preset stability threshold, it is considered to be highly stable. The preset stability threshold is 0.8, and an automatic recycling operation is performed to clean up the identified items to be cleaned up / failed data.
[0070] When the interface stability score is lower than or equal to 0.8, it is considered low stability. A version rollback operation is performed to restore it to the previous known stable version.
[0071] As a second embodiment of the present invention: In its specific implementation, compared to Embodiment 1, the technical solution of this embodiment differs only in that this embodiment also provides a self-evolving system for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces. This system is used to execute a self-evolving method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces. The system is characterized by comprising: Surface module: Corresponds to method step S1, which contains sub-units for managing five types of versioned editable surfaces and their logging and rollback functions.
[0072] Cognitive Management Module: Corresponding to method step S2, it integrates the following: Interval Scheduler: Implements the logic of the improved SM-2 interval repetitive scheduling mechanism described above.
[0073] Skill Complexity Assessment and Decomposition Tool: Implements the above-mentioned multi-dimensional complexity score calculation and decomposition verification process.
[0074] Context-selective injection pipeline: Implements the above injection process from intent detection to context window budget truncation.
[0075] Optimize the efficiency quantifier: Implement the calculation and synthesis logic of the above three-dimensional factors.
[0076] File-based knowledge graph engine: responsible for reading, writing, querying, indexing, and compressing the aforementioned JSONL graph data.
[0077] Evolutionary control module: corresponding to method step S3, including: Edit Candidate Generation Module: Used to generate edit candidates.
[0078] Execution module: Used to compare and edit candidates for the first and second execution results in the sandbox.
[0079] Evaluation module: It integrates a multi-dimensional comparison scorer and can call the output of the optimization effectiveness quantifier to make the final adoption decision.
[0080] Security governance module: corresponding to method step S4, including: The three-stage controller of temporary storage-verification-write enables queue management, locking, and process scheduling.
[0081] Strategy Engine: Contains a dependency graph between surfaces and a rule engine, used to perform semantic inference and verification.
[0082] Workspace module: Corresponding to method step S5, it provides a standardized file system interface to uniformly manage memory files, skill libraries, and map files.
[0083] Consistency maintenance module: corresponds to step S6 of the method, and has a built-in periodic scanner, inconsistency detector and rollback executor.
[0084] As an embodiment of the present invention: This embodiment, based on Embodiments 1 and 2, further illustrates how some technical features of the present invention can be implemented in specific engineering projects. It should be noted that the content of this embodiment is merely illustrative and should not be construed as limiting the scope of protection of the present invention.
[0085] The cognitively driven memory-skill management subsystem needs to update the memory state based on different types of access events. Example 1 already provides three types of events: active successful retrieval, active failed retrieval, and passive context injection. To more precisely adapt to the access patterns in actual agent operation, this example further divides access events into five types: active successful access, citation, loading, passive context injection, and review failure. Active successful access can be understood as a person or agent explicitly retrieving a memory and successfully using it for the current task; citation is the association and use of a memory during skill execution; loading indicates that the system pre-loads the memory during the preparation phase; passive context injection corresponds to the situation mentioned earlier where context is automatically added through the selective context injection pipeline; and review failure refers to the large language model's failure to match the memory content as expected during the review evaluation phase. For passive context injection events, the mapped recall quality score can still be multiplied by a passive decay coefficient ω, as in Example 1, to reduce its positive impact on extending the retention period.
[0086] In the engineering implementation of the SM-2 interval repetition scheduling mechanism, newly stored memories can be set to have zero repetitions, an initial difficulty factor of 2.5, and an initial retention period of one day. As subsequent accesses and reviews occur, when the number of repetitions reaches a preset stable repetition threshold, such as 5 times, the memory can be considered to have entered a relatively stable consolidation phase. At this point, the next retention period can be obtained by multiplying the current retention period by the updated difficulty factor, and a maximum retention period upper limit can be set, such as 365 days, to prevent the retention interval from extending indefinitely. When the system performs batch reviews during the idle phase of the cold path, memories can be sorted in descending order of freshness, prioritizing memories that are close to or have exceeded their review time point for evaluation in the large language model, thereby improving the overall efficiency of background review.
[0087] Regarding the storage of file-based knowledge graphs, Example 1 already explained that the graph edge data uses JSONL format and is stored in a subdirectory of the working area. In actual projects, this subdirectory can be further named . / graph / , where the edge data file is edges.jsonl, with each line recording one edge, including information such as source node, target node, relation type, weight, timestamp, and source tag. To accelerate queries, an additional index.json can be maintained as an adjacency index file, loaded into memory when the system starts. Cross-process concurrency safety is implemented using a .graph.lock file lock. When the total number of edges in the graph exceeds, for example, 5000, a graph compression operation is triggered. After compression, index.json is updated and locked before being written to maintain consistency between the index and the edge data file.
[0088] During the temporary storage phase of the security governance layer, each edit candidate entering the queue, in addition to saving the modification target, can also record the inference chain given by the language model, at least one alternative editing scheme, and the corresponding confidence level. This allows for a more complete reconstruction of the cause and potential impact of the edit candidate during subsequent verification or user approval. In the verification phase, in addition to the semantic inference verification based on the inter-surface dependency graph described in Example 1, several engineering verification items can be added. For example, checking whether the surface to be modified actually exists, checking whether the change causes functional conflicts with other surfaces, checking whether the skill trigger allocation is complete, and checking whether the parent skill still retains routing capabilities. These verification items can be executed before or after the inference verification to proactively intercept obviously unreasonable or potentially disruptive edit candidates.
[0089] Within the system's internal scheduling, different tasks in the cognitive management module have varying real-time requirements. For ease of engineering implementation, tasks can be categorized into three types: hot paths, semi-hot paths, and cold paths. Hot path tasks are executed in each dialogue turn, such as context-selective injection and graph K-jump queries, typically expected to complete within 200 milliseconds to avoid significantly increasing dialogue latency. Semi-hot path tasks are executed asynchronously when conditions are triggered, such as the language model's micro-reflective evaluation of the effects of certain operations. Cold path tasks run only when the agent is idle, including background maintenance tasks such as SM-2 batch review, skill complexity scanning, knowledge graph compression, and consistency recycling. This hierarchical scheduling approach ensures core interactive responsiveness while fully utilizing idle system resources for self-evolutionary maintenance.
[0090] At the hardware and software level, the system in this embodiment can be deployed in an environment with a multi-core CPU, a GPU or NPU with at least 24GB of video memory, and NVMe high-speed storage. The inference backend can support various formats such as Ollam, vLLM, OpenAI API, and Claude API. For the isolated testing environment of editing candidates, Docker or Firecracker sandboxes can be used to ensure that the automatic editing process does not pollute the production environment. The above deployment method is only an example, and in actual implementation, it can be flexibly adjusted according to the task scale and computing resources.
[0091] Furthermore, any content not described in detail in this specification is existing technology known to those skilled in the art.
[0092] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, retrieval method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, retrieval method, article, or apparatus.
[0093] 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.
[0094] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces, characterized in that, Includes the following steps: S1: Construct multi-dimensional editable surfaces, defining the engineering elements of the agent management framework as cue word surfaces, tool surfaces, middleware surfaces, skill surfaces, and architecture boundary surfaces; S2: Construct a cognitively driven memory-skill management subsystem, and apply an improved SM-2 interval repetition scheduling mechanism to update the retention period and difficulty factor of historical state data; Calculate the multi-dimensional complexity score of each skill on the skill surface. When the score exceeds the preset splitting threshold, split the original skill into multiple sub-skills and generate routing skills; perform context-selective injection. S3: Construct a two-layer self-evolutionary control loop, generate an edit candidate set, apply the edit candidate set in an isolated sandbox environment to obtain the first execution result, and compare it with the second execution result in the baseline environment without applying the edit candidate set. When all dimensions are not inferior to the baseline and the optimization performance score is not lower than the threshold, the result is adopted. S4: Construct a security governance layer, execute a three-stage mechanism of temporary storage-verification-write, perform semantic inference and verification based on the dependency graph between surfaces, and write after user approval; S5: Build a workspace-driven continuous learning module, using the workspace as a unified data source to carry long-term memory files, skill bases and file-based knowledge graphs; S6: Construct a consistency maintenance module that periodically scans the workspace for expired state data, conflicting skill definitions, and inconsistent items in the knowledge graph, and performs automatic recycling or rollback operations based on the interface stability score.
2. The self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces according to claim 1, characterized in that, In step S21, each type of surface in the multidimensional editable surface maintains an independent version number, change log, rollback function, lock flag, and parent node reference; the skill surface supports a parent-child skill hierarchy structure and sets anti-infinite recursion constraints; The updated algorithm of the improved SM-2 interval repetition scheduling mechanism is as follows: the access event is mapped to a memory quality score q, where q∈[0,5]; the effective memory quality score q′ is determined according to the access event type: when the access event is a passive context injection event, the mapped memory quality score q is multiplied by the preset passive decay coefficient ω to obtain the corrected effective memory quality score q′; q′ is used for subsequent memory quality threshold comparison, adjustment amount Δ calculation and difficulty factor update. When q′≥Q1, the number of repetitions n is incremented by 1, and the adjustment amount Δ of the difficulty factor EF is calculated based on the effective recall quality score q′, so that Δ is positively correlated with the score q′, and EF1=min(EF) is updated. max ,max(EF min ,EF+Δ)); where Q1 is the preset memory quality threshold, EF min As the preset lower limit of the difficulty factor, EF max This is the preset upper limit for the difficulty factor; When q′<Q1, reset the number of repetitions n to 0, decrease the difficulty factor EF, and update EF1=max(EF). min ,EF-δ), where δ is the preset penalty decay step size; When the number of repetitions n≥N th Next retention period I next From this retention period I current The result is calculated by multiplying by the updated difficulty factor EF1, where, when I next >I max When, take I next =I max I max The preset maximum retention period; where N th The preset stable repetition threshold is the threshold for the number of repetitions required to determine when memory enters a stable growth period. The formula for calculating the adjustment amount Δ is: Δ = max(0, α - (Q1) / 2) max -q′)×(β+(Q1 max -q′)×γ)), where α, β, and γ are all preset coefficient values, and β > γ, Q1 max This represents the maximum theoretical value for the recall quality score.
3. The self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces as described in claim 1, characterized in that, In step S22, the multi-dimensional complexity score is calculated as C=w L ×f L (L / L0)+w S ×f S (S / S0)+w T ×f T (T / T0)+w D ×f D (D / D0), where L is the skill description length, S is the number of execution steps, T is the number of triggers, and D is the concept density; L0, S0, T0, and D0 are the normalized baseline values for each dimension; w L w S w T w D Let w be the weight coefficients for each dimension, and satisfy w L +w S +w T +w D =1; f L f S f T f D is the normalization function for each dimension; where concept density D is the ratio of the number of term keywords identified in the skill description to the total number of words.
4. The self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces according to claim 1, characterized in that, In step S23, the context-selective injection operation injects relevant input data and skills within the context window budget. It also has multiple trigger protection strategies: it is only triggered when the user query length exceeds the preset length threshold, contains intent keywords, and the number of conversation rounds since the last context-selective injection exceeds the preset number of rounds; it enhances the retrieval of the knowledge graph, uses the retrieved nodes as seeds to expand the neighbors along the relational edges of the knowledge graph within the preset number of hops, and sets a lower limit for path weight to filter low-relevance edges.
5. The self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces according to claim 1, characterized in that, In step S3, the dimensions that are not inferior to the baseline include four dimensions: task completion, output quality, resource efficiency, and security compliance. The specific method for synthesizing the optimization performance score is as follows: multiply the candidate adoption rate, retrieval hit rate, and response timeliness to obtain the optimization performance score; where, candidate adoption rate = number of accepted items / (number of accepted items + number of rejected items + number of postponed items). If the denominator is 0, the candidate adoption rate is determined to be 0, and a data insufficiency mark is recorded; retrieval hit rate = number of relevant memories hit / total number of relevant memories to be recalled. If the denominator is 0, the retrieval hit rate is determined to be 0, and a data insufficiency mark is recorded; response timeliness is a normalized value, that is, normalized response timeliness = min(preset maximum evaluation delay / average evaluation delay within the calculation period, 1). If the data is empty, the response timeliness is determined to be 0, and a data insufficiency mark is recorded; If any of the candidate adoption rate, retrieval hit rate, or response timeliness is marked as insufficient recorded data, the performance score for this optimization is deemed invalid and does not meet the adoption criteria.
6. The self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces according to claim 1, characterized in that, In step S4, the semantic inference verification based on the inter-surface dependency graph performs the following steps: query all upper-level surfaces that depend on the current surface to be modified, simulate the running state of the upper-level surfaces after the change using a large language model, and generate inference text; The rule engine checks whether the inferred text matches the preset fault mode keywords. If it does, the verification is deemed to have failed.
7. The self-evolutionary method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces according to claim 1, characterized in that, In step S5, the edge data format of the file-stored knowledge graph is JSONL, with one record per line, including source node, target node, relation type, weight, timestamp, and source tag fields; each relation type belongs to four domains: memory-to-memory, skill-to-skill, cross-domain, and concept layer, and each relation has an independent weight range and decay parameter; the knowledge graph supports append writing, atomic writing, and cross-process file locks, and triggers graph compression when the total number of edges in the graph exceeds a preset edge number threshold.
8. A self-evolving system for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces, the system being used to execute the self-evolving method for an intelligent agent control framework based on cognitive learning theory and multidimensional editable surfaces as described in any one of claims 1-7, characterized in that, The system includes: The surface module is used to organize the engineering elements of the intelligent agent management framework into multiple versioned editable surfaces and maintain version and rollback information; The cognitive management module includes an interval scheduler, a skill complexity evaluator and decomposer, a context-selective injection pipeline, an optimization efficiency quantifier, and a file-based knowledge graph engine. The evolution control module includes an editing candidate generation module, an execution module, and an evaluation module; the evaluation module is used to output multi-dimensional evaluations and combine them with optimization performance scores to determine adoption. The security governance module includes a three-stage controller for temporary storage, verification, and writing, as well as a policy engine. The workspace module is used to host and maintain editable surfaces, memories, skills, and knowledge graphs with a unified data source. The consistency maintenance module is used to periodically scan for inconsistencies in the work area and trigger recycling or rollback operations.
9. A computing device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the program to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method of any one of claims 1 to 7.
