The short version: rent platform memory to ship fast and find out whether users want a remembering agent at all; own your memory store the moment memory becomes the product, you sell into a regulated market, or you need to switch models. The question that used to be about latency is now about custody — because on July 15, 2026, China's persona law forced ByteDance's Doubao and Alibaba's Qwen to switch off their companion agents, and the memory hundreds of millions of users had built became read-only on a countdown. "Who can erase this?" is now a design decision, not a footnote.
Here's how to make it deliberately.
The two homes#
Platform memory is the feature built into a model vendor's stack. OpenAI, Anthropic, and Google all now persist user facts and conversation context for you; a single flag on an API call gives your agent continuity with zero database of your own. It is the fastest possible path to a memory-having product.
Your own store is a table in a database you control — Postgres, SQLite, Turso — usually paired with a memory library like Mem0, Zep, or Statewave that handles retrieval and summarization. It costs about a day to stand up. In exchange you hold the only authoritative copy.
The trade isn't subtle:
| Dimension | Platform memory (rent) | Your own store (own) |
|---|---|---|
| Who can delete it | The vendor, or a regulator via the vendor | You |
| Portability | Export only if they build it | Yours to design (Art. 20) |
| Time to first value | Minutes | About a day |
| Model lock-in | High | Low |
| Compliance owner | Shared, unclear | You, cleanly |
When renting is the right answer#
Before product-market fit, memory is a convenience, not the product — and every hour spent building infrastructure is an hour not spent learning whether anyone wants what you're building. If you're still validating that users even value a remembering agent, rent. Ship the flag, watch the retention curve, and don't romanticize owning a database you might throw away in three weeks. The cost of renting is real but deferred; the cost of premature infrastructure is paid now, in the currency you have least of.
Renting is also fine forever for agents where memory is genuinely peripheral — a support bot that remembers a ticket thread, a coding assistant that recalls your repo conventions. If the memory disappearing would annoy users but not end the product, the platform's copy is good enough.
When you must own it#
Owning becomes non-negotiable the moment any one of three things is true:
- Memory is your differentiator. If the reason people pick you over a raw model is that your agent knows them, then the memory layer is the product — and you cannot let a vendor hold the only copy of your product. That is what Doubao and Qwen users discovered the hard way.
- You sell into a regulated or export-sensitive market. GDPR Article 20 requires you to hand users their data in a structured, machine-readable format within a month. You can only reliably promise that for data you actually hold. If the memory lives in a vendor's opaque store, your compliance posture is only as good as their export tooling — which may not exist.
- You need to survive a model switch. Gemini 3.6 Flash undercuts token prices one week; a new open-weight model wins your workload the next. If your memory is welded to one vendor's format, every model migration is also a memory migration — or a memory loss. Owned memory outlives the model underneath it.
If you own the store, ship the export endpoint alongside it — it's a hundred lines, and it's the difference between memory you hold and memory a user can actually take with them. We wrote that walkthrough in How to Give Your Users Exportable Agent Memory.
The hybrid most teams should reach#
The honest answer for a growing product is both: platform memory as a fast cache, your own store as the durable, exportable system of record. The only rule is to be explicit about which is authoritative. The authoritative copy is the one you can export — because it's the one that survives a regulator, an outage, or a pricing change. Treat the vendor's memory as disposable and your store as the truth, and a shutdown becomes an inconvenience instead of an extinction event.
The one line that decides it#
If losing the memory layer tomorrow would end your product, don't let someone else hold the only copy. Everything above is just the elaboration of that sentence — and the July 15 shutdowns are the proof that it isn't hypothetical. For the regulation that turned this from a preference into a risk, read China Regulated the AI Persona, Not the Model.



