Add
Send what already happened: a message array, a document, a tool result or a single sentence. Nothing has to be rewritten for the memory layer.
- messages[], text or JSON
- Sync or batched writes
- Attach user, agent, session and tenant ids
Your model forgets everything the moment the context window closes. AI Memory sits between the model and your data: each event is extracted into durable memories, merged and compressed, then retrieved in milliseconds so the agent that met this user last month still knows them today.
memory.add(
messages=[{"role":"user","content":"we moved to the Scale plan"}],
user_id="dana",
)
memory.search("how does Northwind like to be contacted?")Add an event, search it back, and see the graph it belongs to. The console below runs entirely in your browser on a seeded memory store, so nothing here leaves the page.
Reads like a real messages[] payload: facts are extracted, merged with what is already known, then written with the scope you passed in.
01memory store ready - 6 memories, 3 scopes, 1 agent
Escalations for Northwind go to the on-call engineer, not the shared inbox.
Sam from Northwind already tried the CSV import path and hit duplicated rows.
The migration to the EU region must finish before the audit window opens.
Northwind renewed on the Scale plan, billed annually, after the seat limit was raised.
Prefers weekly summaries on Friday afternoon, and never wants a call before 10:00 local time.
Dana is the operations lead for the Northwind account and signs off on anything above $20k.
Write what happened, read what matters. The rest of your stack stays exactly as it is.
from aimemory import Memory
memory = Memory(api_key="aim_live_...")
# what happened
memory.add(
messages=[{"role": "user", "content": "we moved to the Scale plan"}],
user_id="dana",
agent_id="support-bot",
)
# what to do next time
context = memory.search(
"how does Northwind like to be contacted?",
user_id="dana",
limit=5,
)Four moves cover the whole life of a memory, from the first event to the delete request.
Send what already happened: a message array, a document, a tool result or a single sentence. Nothing has to be rewritten for the memory layer.
The extraction pass pulls out facts, preferences, decisions and constraints, merges them with what is already known, then compresses the episode down to its signal.
Ask in natural language. Semantic search, recency and the memory graph are scored together, then reranked, so the prompt receives a handful of lines instead of a transcript.
Expiry, redaction and deletion are first class. Remove a user, a tenant or a single wrong line and the rest of the graph stays coherent.
Long histories are the most expensive part of an agent. The compression pass keeps the decision, the number, the preference and the constraint, and discards the small talk around them.
Extraction, merge, graph relations, scoping and retrieval controls are part of the layer, not something you assemble from three services.
Facts, preferences, decisions and constraints persist across sessions, channels and model upgrades, so a returning user is not a stranger again.
New information is reconciled with what is already stored: updated, superseded or discarded. Your agent reads one truth instead of five notes.
Entities, people, projects and the relations between them are stored next to the vectors, so a question about one thing can surface the thing next to it.
Every read and write carries user, agent, session and tenant scope. Isolation is enforced at query time, not by prompt discipline.
A support bot, a voice agent and an internal copilot can read the same memory graph while keeping their own working context separate.
Filters, time decay, graph expansion, reranking and a per-request token budget. Tune the recall you need instead of accepting a black box.
Run the managed layer with tenant isolation, or self-host the same API against your own Postgres, pgvector or object store. Your data is never training data.
Export the whole graph as JSON, replay it into another store, and inspect the source and history behind any single memory.
The same layer, scoped differently: a support desk, a classroom, a care routine, a pipeline or a repository.
The agent opens every conversation already knowing the plan, the open ticket, the workaround that failed and who signs off.
Remember what the learner already mastered, which explanation landed, and where they keep getting stuck.
Routines, preferences and constraints stay in one place, so the assistant does not ask the same onboarding questions twice.
Every account arrives with its objections, commitments, budget cycle and the last thing that was promised.
Repository conventions, past decisions and review feedback survive between branches, tools and sessions.
Sources, hypotheses and the paths already ruled out stay attached to the project instead of the thread.
The same 40 turn conversation, answered by the same model with no memory, with the full history in the prompt, and with AI Memory retrieval.
| Measure | No memory | Full history | AI Memory |
|---|---|---|---|
| Recall of earlier turns | 41% | 72% | 79% |
| Context tokens per turn | 0 | 12,800 | 1,240 |
| p50 retrieval latency | - | - | 10 ms |
| Contradiction rate | 18% | 6% | 2% |
Our own reference evaluation on a long conversation set with a 2026.09 build. It is published as a comparison, not as a promise about your workload.
Memory is only useful if you can inspect it, move it and remove it.
Export or import the whole memory graph as JSON, or stream it to your own store.
Every memory keeps its source, its scope, its timestamps and the history of changes.
Retention windows, redaction and delete by user or tenant, with no hidden copies.
Managed multi-tenant service, or the same API self-hosted next to your own database.
Every plan runs the same memory layer. Pro covers a product in production; Scale adds tenant isolation, your own vector store and priority support.
$19per month
For products in production with real users.
Choose Pro$99per month
For teams running memory across many products.
Choose ScaleAnnual billing saves 17%. Plans renew automatically and can be cancelled from your billing settings at any time.
Short answers on scope, storage, retrieval and how this differs from stuffing history into the prompt.
A memory layer that sits between your application and your model. You send it the events you already have, it extracts durable memories, merges them with what it already knows, and returns the relevant context on later turns.
No. There is a REST API plus SDKs for Python and TypeScript, and adapters for common agent frameworks. If you can make an HTTP call, you can add memory.
A longer prompt still runs out, still costs tokens on every turn, and still lets an old line contradict a new one. AI Memory extracts and merges memories, resolves contradictions to the newest truth, and returns a small ranked set instead of the transcript.
Vectors are one part of it. Retrieval also scores recency, memory kind and the entity graph, then reranks, which is why a question about one project can surface the decision stored next to it.
Each memory carries user, agent, session and tenant scope. Queries filter on that scope at read time, so one tenant never sees another tenant memory even in the same collection.
Update it, delete it, or let the next event supersede it. Superseded memories are versioned rather than silently dropped, so you can see what the agent believed and when.
Managed plans run with per-tenant isolation, and the self-hosted deployment runs the same API against your own Postgres, pgvector or object store. Your content is never used as training data.
Yes. The full graph exports as JSON and imports into another deployment, so you are never locked into this service.
Sign in with Google, choose a plan, and open the console to see memories being built from real events.