Skip to main content
The General Engine is the default MemoryOS runtime. Use it when your product needs reliable long-term memory but does not require an industry-specific schema. It works for most AI products:
  • chatbots and assistants
  • coding agents
  • productivity copilots
  • SaaS personalization
  • internal knowledge helpers

What it stores

The General Engine extracts durable memory from conversations into these categories:
CategoryMeaningExample
preferenceHow the user likes things doneUser prefers concise answers with Python examples.
factStable user or account factsUser works in a B2B SaaS support team.
goalSomething the user wants to achieveUser is preparing to launch an AI product.
procedureA repeated workflow or instructionUser wants weekly summaries every Friday.
relationshipPeople, teams, or account relationshipsUser reports to the Head of Product.
expertiseSkills, tools, or areas of knowledgeUser is comfortable with FastAPI and PostgreSQL.

What it does not store

Keep these in your own product database:
  • billing records
  • official user profile fields
  • account permissions
  • source-of-truth ticket status
  • source-of-truth course enrollment
  • payroll, HRIS, or compliance records
MemoryOS stores memory extracted from interactions. Your product database remains the system of record.

Write path

When your backend calls add(), MemoryOS:
  1. authenticates the tenant API key
  2. resolves external_user_id inside that tenant
  3. runs the quality gate
  4. queues extraction
  5. extracts durable memory
  6. resolves conflicts against existing memory
  7. stores canonical records
  8. indexes vectors for retrieval
  9. records version history
The API returns quickly with a job result. Extraction runs asynchronously.
result = mem.add(
    messages=[
        {
            "role": "user",
            "content": "Remember that I prefer concise technical explanations with Python examples.",
        }
    ],
    external_user_id="user_123",
)

Read path

Call get() before your model call. MemoryOS retrieves relevant memories and returns system_prompt_addition, which is safe to prepend to your system prompt.
memories = mem.get(
    query="answer this user's integration question",
    external_user_id="user_123",
    limit=5,
    context_max_tokens=500,
)

system_prompt = "You are a helpful assistant."
if memories.has_context:
    system_prompt = f"{system_prompt}\n\n{memories.system_prompt_addition}"

Retrieval ranking

The General Engine ranks memories using:
  • semantic relevance to the current query
  • importance score
  • recency and lifecycle state
  • hot-tier cache signals
  • category filters when provided
Use a query that describes the current task. This produces better retrieval than a generic query like "memory" or "preferences".

Quality gate outcomes

add() may return:
StatusMeaningApplication behavior
queuedMemory extraction was queuedContinue normally
passthroughWrites are skipped in the current quota modeContinue without persistence
L1Per-user rate limitRetry later
L2Low-quality inputDo not retry the same message
L3Duplicate or near-duplicate inputAvoid repeated writes
L4Budget governance blockUpgrade or wait for reset
blockedFallback block stateLog and continue
The LLM call should not fail only because memory could not be written.

When to move to a domain schema

Stay on the General Engine if prompt-ready memory is sufficient. Move to a domain schema when your product needs structured domain memory, such as:
  • EdTech student profiles, weak topics, exams, and forgetting-stage context
  • Support customer issue history, support type, sentiment, and escalation risk