This page is for teams that already have a product: a chatbot, a CRM, a support desk, an internal assistant. You want it to remember customers and agreements between conversations, and you do not want to build your own store for that.
By the end of the page you will have:
- the path your product uses to reach MMW;
- a way to keep your users’ memories apart;
- a rollout order in which an MMW outage does not break your product.
What stays with you and what MMW does
Section titled “What stays with you and what MMW does”| Your product | MMW |
|---|---|
| Users, sign-in, permissions | Keeps facts and decisions between sessions |
| Your customers’ plans and billing | Search by meaning and by words |
| Core data and business logic | Marks facts stale when their source changes |
| Deciding what to show the user | Contradictions show up as conflict instead of getting lost |
MMW does not replace your database. It is a memory of facts, agreements and context that the model reads and adds to.
Architecture
Section titled “Architecture” UI → your product API → MemoryAdapter → https://mcp.mmwhub.tech/mcp │ └→ your DB (users, permissions, links to MMW records)All traffic to MMW goes through one module on your server, call it MemoryAdapter. It holds:
- the MMW address and key (server side only, never in a browser or mobile app);
- the choice of workspace for each user;
- retries on network errors and one place to handle errors;
- a call log without the text of records.
The UI never calls MMW directly.
MMW speaks MCP over HTTP. For a server that is a plain JSON-RPC POST; no separate initialization is needed.
curl -s https://mcp.mmwhub.tech/mcp \ -H "Authorization: Bearer $MMW_API_KEY" \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search","arguments":{"query":"delivery method","workspace":"u-1842","limit":5}}}'The answer is JSON inside result.content[0].text. Saving works the same way with "name":"remember" and the arguments content, workspace, fact_key, source_id, confidence. All parameters are in the reference: search, remember, forget.
Keeping your users apart
Section titled “Keeping your users apart”There are two ways.
One workspace per user. One key bound to a dedicated project for your product. The adapter sets workspace to u-<your user id> itself and never takes it from the client request. This fits most products.
One project per customer company. If your customers are companies that need strict isolation, give each one its own project and key. The adapter picks the key by company. Store the keys encrypted.
In both cases use a permanent, unchanging user identifier: your internal id, not an email or a phone number. When the email changes, the memory stays where it is.
Retries without duplicates
Section titled “Retries without duplicates”If the adapter retries remember after a network error, add an X-Idempotency-Key header, for example a hash of the user id and the fact text. A retry with the same key returns the same record instead of creating a second one. Details in Best practices.
For facts that change (a delivery address, a customer’s plan), set a stable fact_key such as customer.delivery.address. The new version marks the old one as replaced, and search returns the current one.
Rollout step by step
Section titled “Rollout step by step”-
One safe scenario. Read only: before answering, the bot searches the user’s memory and adds what it finds to the model context. The feature sits behind a flag that is off by default. Without an MMW key the adapter simply finds nothing and the product works as before. Call timeout 2 to 3 seconds.
-
Writing. The model saves the outcome of a conversation: a customer’s decision, an agreement, a preference. Retries carry
X-Idempotency-Key. Keep MMW record ids next to your own entities in your DB, and keep the text of records out of your logs. -
Deleting on request. A user asks to be forgotten or deletes their account: the adapter takes the ids of their MMW records from your DB (you kept them in step 2) and calls
forgetfor eachmemory_id. Personal data requires this; build it before a wide launch. -
Sources and freshness. If memory is built from your documents (knowledge base, policies), pass
source_idandsource_hash. When a document changes, the old facts becomestale.
What not to do
Section titled “What not to do”- Do not send the MMW key to a browser, a mobile app or a model prompt.
- Do not let the model choose
workspace: the adapter sets it. - Do not store passwords, payment data or raw conversation dumps in memory.
- Do not make your product’s answer depend on MMW: on an error or timeout, answer without memory.
Limits and plans
Section titled “Limits and plans”Call and record limits depend on the plan; see Limits. If you need memory for many thousands of your users, write to support@mmwhub.tech and we will pick a plan and limits.