Intelligent agent memory management method and system

By using structured memory units and a unified management framework, the problems of insufficient retrieval accuracy and coupling of personalized logic in intelligent agent memory schemes are solved, achieving efficient and flexible memory management, which is suitable for multi-agent systems and personalized scenarios.

CN121681879APending Publication Date: 2026-03-17CHINA CONSTR BANK CORP (FUJIAN BRANCH)
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511556191.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing intelligent agent memory solutions suffer from insufficient retrieval accuracy due to the flattened memory structure, making it difficult to achieve efficient and accurate multi-condition retrieval. Furthermore, the personalized memory is difficult to decouple from the general architecture, which limits the large-scale application of intelligent agent systems in scenarios with high security and high personalization requirements.

Method used

A structured memory unit is adopted, including ternary metadata of multi-label set, multi-dimensional attribute set and multi-level path. Through a unified memory management framework, intelligent agent interaction events are stored and retrieved, realizing high-precision memory retrieval and decoupling from the upper-level triggering mechanism.

Benefits of technology

It significantly improves the recall and accuracy of memory retrieval, supports complex multi-condition composite queries, has strong system flexibility and maintainability, is suitable for multi-agent collaborative systems and single-user multi-instance scenarios, and has flexible deployment modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121681879A_ABST
    Figure CN121681879A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent agent memory management method and system. According to the method, deep semantic organization of memory content is realized by defining a structured memory unit containing ternary metadata formed by a multi-label set, a multi-dimensional attribute set and a multi-level path; and receiving and processing a memory operation from any trigger event through a unified memory management framework. According to the method, the problems of low retrieval precision, poor data isolation between instances and tight coupling with service logic caused by flattening of a memory structure of an existing agent system are effectively solved, and the performance, the safety and the expandability of the agent system in enterprise-level application are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence and multi-agent system technology, specifically relating to an agent memory management method and system. Background Technology

[0002] With the development of artificial intelligence technology, multi-agent systems are widely used in complex scenarios such as enterprise office automation, customer service, and agent memory management. In these applications, agents need to interact with users and the environment continuously over a long period of time and store relevant historical information to provide consistent and personalized services.

[0003] Currently, most mainstream intelligent agent memory solutions use vector databases or simple key-value pairs for storage. However, existing technologies have the following key drawbacks: 1. Flattened memory structure and insufficient retrieval accuracy: Most mainstream solutions use vector databases or key-value pairs to store memory content, lacking a structured expression of memory semantics. When retrieval is required based on multiple conditions (such as "source is email, tag contains 'reimbursement', time is within the past week"), existing systems struggle to efficiently and accurately recall relevant memories, leading to a decline in agent response quality.

[0004] 2. Difficulty in balancing personalized memory with general architecture: Although some systems support personalized memory, their personalized logic is strongly coupled with specific business logic (such as being bound to a specific task scheduler), making it difficult to reuse the memory management module and adapt to diverse triggering methods (such as user commands, event-driven, proactive behaviors, etc.).

[0005] The aforementioned shortcomings severely restrict the large-scale application of intelligent agent systems in scenarios with high security and high personalization requirements. Therefore, there is an urgent need for a new memory management solution that can achieve efficient and accurate retrieval, natural data isolation, and decoupling from business logic. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide an intelligent agent memory management method and system to achieve high-precision retrieval of intelligent agent memory and decoupling from the upper-layer triggering mechanism.

[0007] This invention is implemented as follows: In a first aspect, the present invention provides an intelligent agent memory management method, comprising the following steps: Step S1: Define a structured memory unit, which includes core content and ternary metadata consisting of a set of multiple tags, a set of multiple dimensions of attributes, and a set of multiple levels of paths; Step S2: Receive agent interaction event information through a unified memory management framework, convert it into the memory unit and store it; Step S3: Using the unified memory management framework, perform composite condition retrieval based on the multi-tag set, multi-dimensional attribute set, and multi-level path in the ternary metadata.

[0008] Furthermore, the agent is dynamically created by the agent manager for a specific user or task context based on the agent class template.

[0009] Furthermore, the multi-tag set includes dynamically expandable semantic classification tags, the sources of which include preset tags, user-defined tags, and automatically extracted keywords.

[0010] Furthermore, the multi-dimensional attribute set includes multiple mutually orthogonal attribute dimensions, including at least time, source, sentiment polarity, and confidence level.

[0011] Furthermore, the multi-level path is used to represent the hierarchical relationship between memory units, forming a tree-like or graph-like structure.

[0012] Furthermore, the unified memory management framework is decoupled from the specific types of upper-layer triggering events and business logic.

[0013] In a second aspect, the present invention provides an intelligent agent memory management system that implements the intelligent agent memory management method described in the first aspect, the system comprising: The Agent Instance Manager is used to create and manage agent instances. A unified memory management framework for handling memory write and retrieval requests; A memory repository is used to store structured memory units containing core content, multi-tag sets, multi-dimensional attribute sets, and multi-level path ternary metadata.

[0014] Furthermore, the memory repository adopts a hybrid architecture of relational database, graph database, and vector database.

[0015] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of an intelligent agent memory management method as described in the first aspect.

[0016] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of an intelligent agent memory management method as described in the first aspect.

[0017] The advantages of this invention are: 1. High retrieval accuracy and efficiency: Through the joint indexing mechanism of "multi-tag + multi-dimensional + multi-level", it supports complex multi-condition compound queries, which significantly improves the recall and accuracy of memory retrieval.

[0018] 2. High system flexibility and maintainability: The unified memory management framework is decoupled from the upper-level triggering mechanism and business logic, enabling this memory module to function as an independent and reusable platform component, supporting rapid system iteration and flexible expansion.

[0019] 3. Flexible deployment mode: With intelligent agent instances as the basic management unit, this invention can be applied to both large-scale multi-agent collaborative systems and personalized scenarios with multiple instances for a single user, making it widely applicable. Attached Figure Description

[0020] The present invention will now be further described with reference to the accompanying drawings and embodiments.

[0021] Figure 1 This is a schematic diagram of the method flow of the present invention.

[0022] Figure 2 This is a schematic diagram of the system structure of the present invention.

[0023] Figure 3 This is the system architecture diagram of the present invention. Detailed Implementation

[0024] In this invention, "smart agent instance" refers to a running entity generated from the same smart agent class template, which has an independent memory space and context, and is the basic unit of memory isolation.

[0025] The overall concept of this invention is to propose a unified memory management method that is decoupled from upper-layer triggering mechanisms and system scale. Its core lies in allocating a logically independent memory space to each agent instance in an AI agent system—regardless of whether the system comprises multiple collaborating agents or a single agent is instantiated into multiple copies with different contexts or permissions—and organizing all memory content within this space into structured units that are "multi-labeled, multi-dimensional, and multi-level." Regardless of whether memory operations are triggered by user interaction, agent-initiated behavior, external events, or any other means, standardized writing and querying are performed through a unified memory management framework. This achieves efficient, accurate, and scalable personalized memory services while ensuring data isolation.

[0026] The following detailed description is provided through specific embodiments: Example 1

[0027] like Figure 1As shown, an intelligent agent memory management method includes the following steps: Step S1: Define a structured memory unit, which includes core content and ternary metadata consisting of a set of multiple tags, a set of multiple dimensions of attributes, and a set of multiple levels of paths; Specifically, each memory unit contains: core content and ternary metadata; Core content: raw information (such as text, document summaries, and dialogue fragments).

[0028] Ternary metadata consists of the following three parts: 1. Multi-Tag Set: A dynamically expandable set of string tags used for semantic classification. Tag sources include: preset role tags (such as "knowledge"), task tags (such as "email processing"), user-defined tags, and keywords automatically extracted by NLP.

[0029] 2. Multi-Dimensional Attribute Set: A set of predefined orthogonal attribute dimensions and their values, for example: Time dimension (timestamp): Memory creation time; Source dimension: Information source (e.g., "email", "screenshot", "user_input"); Sentiment dimension: content sentiment polarity (-1~1); Confidence dimension: Information reliability score (0~1).

[0030] 3. Multi-Level Path: Multi-level paths are used to represent the hierarchical relationship between memory units, forming a tree-like or graph-like structure. The parent-child or aggregation relationship between memories is represented by the hierarchical path (e.g., / projectA / meeting_notes / 20240520).

[0031] Step S2: Receive agent interaction event information through a unified memory management framework, convert it into structured memory units, and store it. General memory processing flow: Triggering events include, but are not limited to, user questions, agent instance initiative tasks, external system events (such as new emails arriving), and other agent collaboration requests.

[0032] Memory writing: When an event is triggered and information that needs to be persisted is generated, the unified memory management framework receives the original data, automatically fills in or guides the user to configure tags, calculate dimension values, determine hierarchical paths, generate structured memory units and store them in their dedicated namespace based on the context of the agent instance.

[0033] Memory Query: When an event triggers and requires access to historical memory, the agent submits a structured query to the framework, such as: SELECT * WHERE tags CONTAINS ('Reimbursement', 'Urgent') AND source = 'email' AND timestamp > NOW() - 7d. The framework utilizes tag inverted indexes and multidimensional indexes (such as R-Tree and Bitmap Index) to efficiently execute the query and return a list of matching memory units.

[0034] Step S3: Perform compound condition retrieval based on the multi-label set, multi-dimensional attribute set and multi-level path in the ternary metadata through a unified memory management framework. Example 2

[0035] like Figure 2 and Figure 3 As shown, an intelligent agent memory management system is used to implement the intelligent agent memory management method described in Embodiment 1. The system architecture is deployed on a private cloud server cluster (hardware device) and mainly includes an intelligent agent instance manager, a unified memory management framework, and a memory repository containing ternary metadata including multi-label sets, multi-dimensional attribute sets, and multi-level paths.

[0036] When an employee interacts with the system through a user terminal, the agent instance manager creates a dedicated agent instance for that employee based on a preset agent class (such as "Agent Memory Administrator"), for example, "Agent Memory Administrator - Zhang San". Simultaneously, the system allocates a separate namespace for this instance in the memory repository.

[0037] Each memory unit consists of core content and ternary metadata. The ternary metadata includes: Multiple tags: such as "reimbursement", "finance", "urgent".

[0038] Multi-dimensional: such as {Time: 2024-05-21 10:00:00, Source: “email”, Sentiment: 0.1, Confidence: 0.9}.

[0039] Multi-level: such as " / Company / Finance Department / May 2024 / Reimbursement Process".

[0040] The memory processing flow is as follows: Memory writing: When a triggering event occurs (such as receiving an email about expense reimbursement approval), the unified memory management framework intervenes. It parses the email content, automatically or semi-automatically tags it, calculates dimension values, and categorizes it into the corresponding hierarchical path, ultimately generating a structured memory unit and storing it in the namespace of "Intelligent Agent Memory Administrator - Zhang San".

[0041] Memory Query: When the agent instance needs to answer "What urgent expense reimbursement emails were received last week?", the unified memory management framework receives and parses this natural language query, converting it into a structured query command (e.g., WHERE tagsCONTAINS('Expense Reimbursement', 'Urgent') AND source = 'email' AND timestamp > NOW() - 7d). Subsequently, the framework utilizes inverted and multidimensional indexes in the repository to quickly perform a retrieval within the namespace of "Agent Memory Administrator - Zhang San" and returns accurate results.

[0042] The memory repository can be implemented using a hybrid architecture that combines relational databases, graph databases, and vector databases to optimize the storage and indexing efficiency of different types of ternary metadata.

[0043] All software modules are deployed on a private cloud server cluster (hardware device) to ensure data security and system stability.

[0044] User terminals: PCs, mobile devices, etc. used by employees to interact with the intelligent agent.

[0045] Agent Instance Manager: Responsible for dynamically generating and managing multiple agent instances for each employee based on preset agent class templates (such as "Agent Memory Administrator - Zhang San" and "To-Do Item Administrator - Li Si").

[0046] Unified memory management framework: The core virtual device of this invention provides standardized memory writing, querying, and updating interfaces, and enforces multi-tag, multi-dimensional, and multi-level structured processing logic.

[0047] Memory repository: The underlying persistent storage is used to store structured memory units containing core content and multi-label, multi-dimensional, multi-level ternary metadata. It can be implemented based on a hybrid architecture of relational database, graph database and vector database, and is logically isolated by agent instance. Example 3

[0048] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it can implement any of the implementation methods in Embodiment 1.

[0049] Since the computer-readable storage medium described in this embodiment is the same computer-readable storage medium used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation methods and various variations of the computer-readable storage medium in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how this computer-readable storage medium implements the method in the embodiments of this application will not be described in detail here. Any computer-readable storage medium used by those skilled in the art to implement the method in the embodiments of this application falls within the scope of protection of this application. Example 4

[0050] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement any of the implementation methods in Embodiment 1.

[0051] Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application.

[0052] The technical solutions provided in this application embodiment have at least the following technical effects: 1. High retrieval accuracy and efficiency: Through the joint indexing mechanism of "multi-tag + multi-dimensional + multi-level", it supports complex multi-condition compound queries, which significantly improves the recall and accuracy of memory retrieval.

[0053] 2. High system flexibility and maintainability: The unified memory management framework is decoupled from the upper-level triggering mechanism and business logic, enabling this memory module to function as an independent and reusable platform component, supporting rapid system iteration and flexible expansion.

[0054] 3. Flexible deployment mode: With intelligent agent instances as the basic management unit, this invention can be applied to both large-scale multi-agent collaborative systems and personalized scenarios with multiple instances for a single user, making it widely applicable.

[0055] The core idea of ​​this invention—"constructing an isolated, structured memory space for each proxy entity"—is widely applicable to the following fields: 1. Game AI: Create independent memories for each NPC (non-player character) so that they can remember their interaction history with different players, making their behavior more personalized and consistent.

[0056] 2. Internet of Things (IoT): Manages the historical status, environmental data, and fault records of each smart device (such as industrial sensors and home robots), supporting predictive maintenance.

[0057] 3. Customer service robot: Assign a dedicated memory instance to each customer session to ensure consistency of service across sessions, while strictly isolating different customer data.

[0058] In the above scenario, the memory management method of the present invention can be directly applied simply by replacing "agent instance" with "NPC instance", "device agent" or "session agent", without substantially changing its core architecture.

[0059] The above embodiments and figures are not intended to limit the product form and style of the present invention. Any appropriate changes or modifications made by those skilled in the art should be considered as not departing from the patent scope of the present invention.

Claims

1. An agent memory management method, characterized by: The method comprises the following steps: Step S1: defining a structured memory unit, which comprises core content and three-element metadata composed of a multi-tag set, a multi-dimensional attribute set and a multi-level path; Step S2: receiving an agent interaction event information through a unified memory management framework, converting it into the memory unit and storing it; Step S3: performing a composite condition retrieval based on the multi-tag set, the multi-dimensional attribute set and the multi-level path in the three-element metadata through the unified memory management framework.

2. The method of claim 1, wherein: The agent is dynamically created by an agent manager according to an agent class template for a specific user or task context.

3. The method of claim 1, wherein: The multi-tag set comprises dynamically expandable semantic classification tags, and the sources include preset tags, user-defined tags and automatically extracted keywords.

4. The method of claim 1, wherein: The multi-dimensional attribute set comprises a plurality of mutually orthogonal attribute dimensions, at least including time, source, sentiment polarity and confidence.

5. The method of claim 1, wherein: The multi-level path is used to represent the hierarchical relationship between memory units, forming a tree or graph structure.

6. The method of claim 1, wherein: The unified memory management framework is decoupled from the specific type of upper trigger event and business logic.

7. An agent memory management system characterized by: The method comprises the following steps: An agent instance manager is used to create and manage agent instances; A unified memory management framework is used to process memory writing and retrieval requests; A memory repository is used to store structured memory units containing core content and three-element metadata of a multi-tag set, a multi-dimensional attribute set and a multi-level path.

8. The intelligent agent memory management system of claim 7, wherein: The memory repository adopts a hybrid architecture of a relational database, a graph database and a vector database.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that: The processor executes the program to implement the steps of the agent memory management method according to any one of claims 1-6.

10. A computer readable storage medium having stored thereon a computer program, characterized in that: The program is executed by the processor to implement the steps of the agent memory management method according to any one of claims 1-6.

Citation Information

Cited By

  • Multi-modal and hierarchical memory based agent pet interaction method and related device

    CN122263949A

  • Multi-modal and hierarchical memory based agent pet interaction method and related device

    CN122263949B