Memory Production

The Memory Production module transforms raw messages or events into storable and retrievable memory units, serving as the starting point of the entire MemOS workflow.

1. Capability Introduction: Why Process Raw Messages into Memory

In MemOS, what you submit is raw information (conversations between users and AI, user operation logs/action traces in the app, etc.), and the system will automatically complete the process of “memorization.”

Why process memory?

If you simply save all the raw conversations and directly feed them to the large model, several problems will occur:

  • Overlong context: Raw messages are often lengthy and repetitive. Feeding the entire context to the model is inefficient and wastes tokens.
  • Inaccurate retrieval: Unprocessed raw text makes it difficult to quickly locate key information, and retrieval often recalls large amounts of noise.
  • High invocation cost: Directly concatenating raw messages significantly increases model input length, leading to token costs and latency.

What’s different after processing?

MemOS transforms raw messages into structured memory units, automatically extracting:

  • Key facts: e.g., “The user usually travels with the whole family (children and parents).”
  • Task clues: Extracting the user’s goal intent, such as “planning a family trip,” rather than just “going out during summer vacation.”
  • User preferences:
    • Not only explicit expressions (“I like traveling with my family”), but also implicit reasoning patterns.
    • For example, if the user shows a preference for “clear logic in writing” while asking AI to rate 10 articles, MemOS will preserve this preference pattern for the next 20 article rating tasks, guiding the model to remain consistent.

As a result:

  • Faster and more accurate retrieval: Directly locate facts/preferences/tasks instead of parsing a whole raw conversation.
  • More efficient invocation: Only concise memory needs to be passed to the model, reducing token consumption.
  • More stable experience: The model can continuously maintain its understanding of user habits without drifting due to lost context.

Example:

User: I’ve planned to travel to Guangzhou this summer. What chain hotels are available for accommodation?
Assistant: You can consider options like 7 Days Inn, All Seasons, Hilton, etc.
User: I’ll choose 7 Days Inn.
Assistant: Alright, feel free to ask me if you have any other questions.
Fact Memory: The user has planned to travel to Guangzhou during the summer of 2024 and has chosen to stay at 7 Days Inn for accommodation.

Preference Memory: Preference for budget-friendly accommodations.
Reasoning: The user's choice of 7 Days Inn over other options like Hilton suggests a potential preference for more budget-friendly accommodations. 7 Days Inn is known for being an economical option compared to Hilton, which is a higher-end hotel chain. This choice indicates that the user might prioritize cost-effectiveness in their accommodation decisions.

For you, this means: as long as you store raw conversations, you don’t need to write your own “keyword extraction” or “intent recognition” logic—you can directly obtain reusable long-term user preferences.


2. Advanced: If You Want Deep Customization

In MemOS, memory production is the full process of converting raw input into schedulable and retrievable memory units. The specific pipeline details (such as extraction methods, embedding models, storage backends) evolve with versions and community practices—so this section does not provide a fixed unique workflow, but instead explains extensible components where you can make adjustments.

Extensible Component ExamplesDefault BehaviorCustomizable Options
Extraction & StructuringGenerates MemoryItem (including content, timestamp, source)Replace the extraction model or template, or add domain-specific fields to schema
Chunking & EmbeddingSystem chunks long text and feeds it into embedding modelsAdjust chunking granularity, or replace with better-suited embedding models (e.g., bge, e5)
Storage BackendDefaults to a vector database (e.g., Qdrant)Switch to a graph database, or use a hybrid of both
Merging & GovernanceAutomatically handles duplicates and conflictsAdd custom rules (e.g., time priority, source priority), or governance logic (deduplication, filtering, etc.)

3. Next Steps

Learn more about MemOS core capabilities:


4. Contact Us