MemNetAI Concept Reference
Memory Entity
An object used to isolate different independent memory sets. For example, each person's brain is a memory entity because the memories stored in each brain are independent. On the MemNet platform, each memory entity stores numerous memories and serves as the core executor for autonomous thinking and automatic dreaming functions.
Internal Memory Entities
The memories stored in each memory entity contain various entities (e.g., Xiao Ming, Xiao Hong, Minecraft). These entities are referred to as internal memory entities. We construct relationships between these internal memory entities using a graph database to enable associative reasoning.
OpenAI Conversation Context
The OpenAI context refers to the total token range available to the model in a single request. This range is also known as the Context Window.
Memory Status
- Valid Memory: Explicitly valid memories whose content can be directly trusted and adopted.
- Suspected Outdated Memory: Memories with minor conflicts or inconsistencies with new memories, but not yet fully confirmed as outdated. Such memories are linked to the corresponding new memories.
- Outdated Memory: Memories whose partial content has become obsolete due to conflicts with new memories. Example:
- Old memory: Xiao Ming said he was in a relationship with Xiao Hong.
- New memory: Xiao Ming said he had broken up with Xiao Hong. The old memory will be marked as outdated and linked to the new memory. When an outdated memory is retrieved during recall, its associated new memory will be loaded synchronously to ensure the latest memory state and prevent memory confusion. Unlike many memory systems that directly overwrite outdated memories, we retain them and establish links to new memories. The reason is that outdated memories, while no longer current, are not forgotten—this design is more natural and closely mimics human memory storage mechanisms.
- Repudiated Memory: Memories whose specific information is directly refuted by new memories. This can be understood as an enhanced version of outdated memories: outdated memories are marked and linked through inference, whereas repudiated memories involve explicit direct denial of content. Example:
- Old memory: Xiao Ming told Kimi that insects avoid light sources, and Kimi indicated understanding.
- New memory: Xiao Ming told Kimi that he was wrong earlier— insects are phototactic and will approach light sources. Here, Xiao Ming explicitly repudiates a previous memory, so the old memory is marked as repudiated and linked to the new memory.
Memory Change Log
The memory change log records the status changes and their causes throughout a memory's lifecycle. It is not a simple "status tag" but a traceable, interpretable, and replayable change recording mechanism. A corresponding memory change log must be generated whenever a memory's semantic validity is modified (e.g., repudiated, marked as outdated, changed from valid to suspected outdated). The log should fully describe:
- For the aforementioned memory status changes, the system should not only add a tag but also retain information on why the tag was added and which parts of the memory were affected. For example, for a repudiated memory, in addition to marking it as "repudiated", the log can record which specific part was repudiated and which conversation triggered the repudiation, providing additional contextual details. (Core elements: Why, Which part, What caused it).
- During subsequent recall processes, the memory's change log must be loaded alongside the memory itself to ensure accuracy and reliability. (Memory change logs must also be implemented in memory visualization features).
- Additionally, each log entry should include the ID of the new memory associated with the non-valid memory. Currently, each memory can have a maximum of three memory change logs.
New Memories Associated with Non-Valid Memories
New memories associated with non-valid memories refer to memories that trigger status changes in previously valid memories. These changes include being marked as suspected outdated, outdated, or repudiated.
Hallucination Issue
AI Hallucination refers to a phenomenon where large language models fabricate information that they perceive as real, even appearing reasonable or credible. In simple terms, it means the AI is "talking nonsense"—generating content inconsistent with real-world facts or user input.
Traceable Memory Change Chain
Some memory systems focus primarily on maintaining the current valid state without preserving the complete memory evolution process. In contrast, MemNetAI introduces a traceable memory change chain to record the evolution of memories and the reasons for their revision. A truly human-like memory system does not only remember "current facts" but also retains the "trajectory of how cognition was revised". Memory is not just a state—it is a process of state evolution. If a system:
- Only knows "what is correct now"
- But does not know "why I was wrong before" it is more like a cache than a growing cognitive system.
Prompt Enhancement
Prompt enhancement refers to optimizing and refining prompts to improve the quality and relevance of AI model outputs. Specifically, a prompt enhancer converts a user's simple description into a more detailed, structured prompt that better aligns with the model's language and task requirements. For example, if a user inputs "a woman in a red dress", the prompt enhancer might generate "Professional fashion photography of an elegant woman wearing a flowing deep red evening gown, with soft studio lighting and dramatic shadows"—thereby enhancing the professionalism and detail of the generated content.
System Prompt
A system prompt is a system-level instruction used to define the AI's identity, behavioral boundaries, response style, and priority rules. It has a higher priority than user input and is designed to ensure the model's behavior is stable, controllable, and consistent with expectations.
Common Sense Library
A common sense library is a storage unit for foundational knowledge that provides stable reference value during reasoning and comprehension processes. In the MemNet project, the retrieval mechanism of the common sense library shares the same technical path as RAG (Retrieval-Augmented Generation), but its semantic positioning and scope of application are constrained by the project context. During memory retrieval, the system can simultaneously retrieve information from both the memory entity and the common sense library to supplement background knowledge, reduce ambiguity, and enhance reasoning completeness.
Global Common Sense Library
The global common sense library is a project-level common sense storage unit whose content is visible and retrievable to all memory entities under the project. Scope of Application:
- Shared across the entire project
- Not tied to specific memory entities
- Serves as a unified background knowledge source across all memory entities
Memory Entity-Specific Common Sense Library
The memory entity-specific common sense library is a common sense storage unit bound to a specific memory entity. Its content is only visible and retrievable to that memory entity. Scope of Application:
- Private to the memory entity
- Does not participate in retrieval processes for other memory entities
- Used for context-specific knowledge supplementation
One-Time Recall-Only Common Sense Library
When calling the recall API, users can obtain common sense library IDs through the platform and independently configure the list of common sense libraries required for memory entity recall. Scope of Application:
- The common sense library participates in retrieval and context construction only during the current recall API call.
- No persistent association is established with any memory entity.
- The configuration expires immediately after the recall request ends and does not affect subsequent recall behavior.
- Does not modify the existing common sense library configuration of the memory entity, nor does it alter the default project-level or system-level common sense libraries.
Autonomous Thinking
A memory entity retrieves historical memories, generates a "thought" as the core theme, and performs autonomous, multi-round association and deduction within the memory system—thereby realizing the reprocessing of memories and the generation of new ideas.
Automatic Dreaming
A memory entity retrieves historical memories, generates a "thought" as the core theme, and performs autonomous, multi-round association, reorganization, and deduction within the memory system. This process reprocesses existing memories and fosters the development of new cognitive structures and ideological outcomes.
Rate Limiting
Heat Value Calculation
Purpose
To prevent high-frequency or high-cost requests from monopolizing system resources, the platform implements a weight-based billing rate-limiting strategy for certain APIs: each request consumes a specific amount of "heat". If the cumulative consumption within a sliding time window exceeds the threshold, the request will be rate-limited.
Core Concepts
- Heat: The consumption value of a single request. APIs that are more resource-intensive typically have higher configured heat values.
- Window (windowSeconds): The statistical range, calculated as "the most recent N seconds".
- Threshold (maxWeight): The maximum allowed cumulative heat within the window.
- Rate-Limiting Key (key): A unique identifier for the rate-limiting statistical dimension, usually a combination of "user + API/resource".
Calculation Rules
At any given time now, for the same rate-limiting key key:
- Calculate the sum of heat from all requests in the most recent
windowSecondsseconds:
- If
totalHeat + heat(current request) > maxWeight, rate-limiting is triggered and the current request is rejected. - Otherwise, the request is allowed, and the heat of the current request is added to the window. Intuitive understanding: Rate limiting is based on total request cost within the window, not the number of requests.
Basic Heat Value Configuration
| Type | Heat Value |
|---|---|
| Memory | 38 |
| Recall | 6 |
| Thinking | 44 |
| Dreaming | 44 |
| Common Sense | 50 |
Namespace
A namespace is a naming scope mechanism used for logical isolation and organization of resources within the same system or project. Its key functions include:
- Preventing naming conflicts
- Supporting multi-user, multi-agent, and multi-tenant scenarios
- Providing stable expansion boundaries for long-term system evolution
Best Practice: Isolating Memory Entities Using Namespaces
In B2C or multi-agent scenarios, it is recommended to use namespaces as the naming scope for memory entities to avoid naming conflicts and improve model scalability.
Common Usage Patterns
The following patterns are recommended practices, not mandatory rules.
Using Agent ID as the NamespaceApplicable Scenarios:
- B2C products
- Multi-agent systems
- Each agent has independent long-term memory This pattern is ideal for providing the system as an agent memory platform to external users.
Using User ID as the NamespaceApplicable Scenarios:
- Users have private memory spaces
- Users create multiple memory entities
Composite NamespaceApplicable Scenarios:
- Multiple agents exist under the same user
- Need to distinguish memories for different roles or contexts
Concurrency Level Calculation Rules
- Users can upgrade their personal concurrency level by accumulating recharge points. The user's personal concurrency level is a long-term entitlement and will not expire over time.
- Each concurrency level corresponds to a heat threshold. The higher the concurrency level, the higher the available heat threshold.
- Different packages provided by the platform also include corresponding package concurrency levels to boost the available heat threshold during the package validity period.
- Package concurrency levels are only effective during the package validity period; after the package expires, the concurrency level and heat threshold brought by the package become invalid accordingly.
- Users can purchase multiple packages simultaneously; the current effective package concurrency level takes the highest level among all unexpired packages.
- The platform's final effective concurrency level takes the maximum value of the following two:
- User's personal concurrency level
- Current effective package concurrency level
That is: Effective Concurrency Level = max(User's Personal Concurrency Level, Current Effective Package Concurrency Level)
Cumulative Point Pricing
When you recharge, you will receive corresponding points. When the accumulated recharge points reach a certain threshold, the heat threshold will increase.
Memory Active Status
- The Memory Active Status is used to describe whether a specific memory entity is allowed, at the current stage, to continue performing background behaviors such as automatic thinking and automatic dreaming.
- The purpose of this status is to prevent a memory entity from continuously consuming user point resources through autonomous thinking or automatic dreaming when it has not been actively used by the user for an extended period of time.
- During periods in which the user does not explicitly trigger thinking, dreaming, memorization, or recall operations through manual API calls, the system allows the memory entity, within a controlled scope, to perform a limited number of automatic thinking or automatic dreaming actions; however, all such automatic behaviors are subject to execution count limits (including the maximum number of autonomous thinking actions and the maximum number of automatic dreaming actions permitted while in the active state). When the cumulative number of automatic thinking and/or dreaming actions reaches the system-defined upper limit, and no new user-initiated calls occur during that period, the memory entity will be determined to no longer be in an active state.
- After a memory entity enters the inactive state, the system will suspend its automatic thinking and automatic dreaming behaviors to avoid continued and unnecessary consumption of user point resources.
- When the user again explicitly triggers thinking, dreaming, memorization, or recall operations via the API, the memory entity will re-enter the active state and restore its ability to perform automatic behaviors within the defined rules and limits.