Skip to content

Conversational Agent Memory

Your chatbot forgets users between sessions. Mnemoverse fixes that.

The Problem

Every conversation starts from zero. Your agent asks "What's your name?" for the 10th time. Users hate it.

The Solution

Store user insights during conversation. Load them at the start of the next one. Per-user isolation via domains.

How It Works

python
from mnemoverse import MnemoClient

client = MnemoClient(api_key="mk_live_YOUR_KEY")

# During conversation — agent learns something about the user
client.write(
    "Alice prefers email notifications over Slack",
    concepts=["alice", "notifications", "email"],
    domain="user:alice"
)

client.write(
    "Alice is on the Pro plan, working on a trading bot",
    concepts=["alice", "plan", "trading"],
    domain="user:alice"
)
python
# Next session — agent loads context before responding
memories = client.read(
    "What do I know about Alice?",
    domain="user:alice",
    top_k=10
)

# Feed memories into LLM prompt as context
context = "\n".join([m.content for m in memories.items])

Architecture

User message → Agent

         memory_read("user context", domain="user:{id}")

         LLM generates response (with memory context)

         memory_write(insights learned, domain="user:{id}")

         Response → User

Per-User Isolation

Each user gets their own memory domain. Alice's memories never leak to Bob.

python
# Alice's conversation
client.write("Prefers dark mode", domain="user:alice")

# Bob's conversation  
client.write("Uses light mode, large fonts", domain="user:bob")

# Reading Alice's context — only gets Alice's memories
client.read("user preferences", domain="user:alice")
# → "Prefers dark mode"

Feedback Loop

When a memory helps the agent give a better answer, reinforce it:

python
memories = client.read("Alice's notification preferences")

# Agent used this memory and user was happy
client.feedback(
    atom_ids=[memories.items[0].atom_id],
    outcome=1.0  # Very helpful
)

Over time, useful memories surface first. Stale ones fade.

Use Cases

ScenarioWhat to Remember
Customer supportUser's plan, past issues, preferred contact method
Personal assistantSchedule preferences, dietary restrictions, travel habits
Tutoring botStudent's level, topics covered, learning pace
Sales agentProspect's company, pain points, decision timeline
Health advisorConditions, medications, goals, doctor preferences

Compared to RAG

RAG retrieves from a static knowledge base. Mnemoverse remembers from conversations. RAG answers "what does the docs say?" — Mnemoverse answers "what did we discuss last time?"

They complement each other:

  • RAG = product knowledge (docs, FAQ)
  • Mnemoverse = user knowledge (preferences, history, context)

Common questions

How do I give my chatbot per-user memory? Store user insights during the conversation with memory_write under a per-user domain (for example domain="user:alice"), then load them with memory_read at the start of the next session and feed them into the prompt as context.

How does my agent remember a user between sessions? Memories live server-side keyed by the user's domain, so each new conversation can load everything known about that user before responding — no more asking for the same details every time.

How do I keep one user's memory from leaking to another? Give each user their own domain (domain="user:{id}"). Reads filtered by domain only return that user's memories, so Alice's context never surfaces in Bob's conversation.

How is per-user memory different from RAG? RAG retrieves from a static knowledge base (product docs, FAQs); Mnemoverse remembers from conversations (a user's preferences, past issues, and history). Use RAG for product knowledge and Mnemoverse for user knowledge — they complement each other.

How do I give each user of my SaaS chatbot their own memory? Use one API key with a separate domain per end-user (domain="user:{id}"). Every read and write is filtered by that domain, so thousands of users stay isolated under a single account — no per-user keys to manage.

Get Started

  1. Get an API key (free, 30 seconds)
  2. pip install mnemoverse
  3. Add write() after conversations, read() before them
  4. That's it — your agent now remembers users