Add - learn - retrieve - forget

Memory that survives the session

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.

See how it works
  • Any model, any framework, one endpoint
  • Scoped per user, agent, session and tenant
  • Export everything, or self-host the whole layer
memory.add()p50 10 ms
memory.add(
  messages=[{"role":"user","content":"we moved to the Scale plan"}],
  user_id="dana",
)

memory.search("how does Northwind like to be contacted?")
6 memories 3 scopes 11 ms
  • 10 msp50 retrieval, reference build
  • 90%Fewer context tokens than full history
  • 1 callTo add, merge or update a memory
  • 4 scopesUser, agent, session and tenant
Live console

Watch memory being built

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.

runs entirely in your browser
6 memories stored

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

Stored memories6 in scope
  • DECISIONtenant:northwind

    Escalations for Northwind go to the on-call engineer, not the shared inbox.

    2 days ago runbook14 tokens
  • EPISODEagent:support-bot

    Sam from Northwind already tried the CSV import path and hit duplicated rows.

    4 days ago chat transcript19 tokens
  • CONSTRAINTtenant:northwind

    The migration to the EU region must finish before the audit window opens.

    6 days ago kickoff call15 tokens
  • DECISIONtenant:northwind

    Northwind renewed on the Scale plan, billed annually, after the seat limit was raised.

    9 days ago billing events18 tokens
  • PREFERENCEuser:dana

    Prefers weekly summaries on Friday afternoon, and never wants a call before 10:00 local time.

    2 weeks ago calendar notes21 tokens
  • FACTuser:dana

    Dana is the operations lead for the Northwind account and signs off on anything above $20k.

    3 weeks ago support thread 482124 tokens
For developers

Two calls to give an agent a past

Write what happened, read what matters. The rest of your stack stays exactly as it is.

  • One endpoint replaces the prompt stuffing, the summary table and the notes column.
  • Memories are merged, not appended, so a changed plan does not leave two truths behind.
  • Retrieval returns the source, the scope and the timestamp behind every line.
  • Framework adapters for LangChain, LlamaIndex, Vercel AI SDK and plain HTTP.
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,
)
How it works

Add, learn, retrieve, forget

Four moves cover the whole life of a memory, from the first event to the delete request.

01

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
02

Learn

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.

  • Deduplicate and merge updates
  • Resolve contradictions to the newest truth
  • Compress episodes, keep verbatim quotes when they matter
03

Retrieve

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.

  • Filters by scope, kind and time
  • Graph expansion for related entities
  • Token budget per request
04

Forget

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.

  • TTL per memory kind
  • Delete by user or tenant
  • Full audit trail of every change
Memory compression engine

Keep the meaning, drop the transcript

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.

  • Near duplicate memories collapse into one line with a history entry.
  • Superseded facts are versioned instead of silently overwritten.
  • Verbatim quotes survive when a phrase itself carries the meaning.
Capabilities

Built for memory that has to be right

Extraction, merge, graph relations, scoping and retrieval controls are part of the layer, not something you assemble from three services.

Memory that outlives the session

Facts, preferences, decisions and constraints persist across sessions, channels and model upgrades, so a returning user is not a stranger again.

Extraction and merge, not append

New information is reconciled with what is already stored: updated, superseded or discarded. Your agent reads one truth instead of five notes.

Graph memory

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.

Scoped by default

Every read and write carries user, agent, session and tenant scope. Isolation is enforced at query time, not by prompt discipline.

Shared across agents

A support bot, a voice agent and an internal copilot can read the same memory graph while keeping their own working context separate.

Retrieval you can steer

Filters, time decay, graph expansion, reranking and a per-request token budget. Tune the recall you need instead of accepting a black box.

Private by construction

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.

Portable and auditable

Export the whole graph as JSON, replay it into another store, and inspect the source and history behind any single memory.

Use cases

Memory that adapts to your domain

The same layer, scoped differently: a support desk, a classroom, a care routine, a pipeline or a repository.

Support and success

The agent opens every conversation already knowing the plan, the open ticket, the workaround that failed and who signs off.

  • Account and ticket history
  • Known workarounds
  • Escalation rules

Tutors and learning apps

Remember what the learner already mastered, which explanation landed, and where they keep getting stuck.

  • Mastery per topic
  • Preferred explanation style
  • Mistake patterns

Care and habit companions

Routines, preferences and constraints stay in one place, so the assistant does not ask the same onboarding questions twice.

  • Daily routines
  • Diet and timing preferences
  • Accessibility needs

Sales assistants

Every account arrives with its objections, commitments, budget cycle and the last thing that was promised.

  • Account context
  • Objection history
  • Commitments and dates

Coding agents

Repository conventions, past decisions and review feedback survive between branches, tools and sessions.

  • Repo conventions
  • Decisions and tradeoffs
  • Review feedback

Research copilots

Sources, hypotheses and the paths already ruled out stay attached to the project instead of the thread.

  • Source provenance
  • Open hypotheses
  • Ruled out paths
Reference benchmark

What memory changes

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.

MeasureNo memoryFull historyAI Memory
Recall of earlier turns41%72%79%
Context tokens per turn012,8001,240
p50 retrieval latency--10 ms
Contradiction rate18%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.

Control

Built for teams that answer for the data

Memory is only useful if you can inspect it, move it and remove it.

Portable

Export or import the whole memory graph as JSON, or stream it to your own store.

Auditable

Every memory keeps its source, its scope, its timestamps and the history of changes.

Controllable

Retention windows, redaction and delete by user or tenant, with no hidden copies.

Deployable anywhere

Managed multi-tenant service, or the same API self-hosted next to your own database.

Pricing

Plans that scale with the memory you keep

Every plan runs the same memory layer. Pro covers a product in production; Scale adds tenant isolation, your own vector store and priority support.

Scale

$99per month

For teams running memory across many products.

Choose Scale
  • 500,000 memories stored
  • Tenant isolation and audit history
  • Bring your own vector store
  • Dedicated worker and higher limits
  • Onboarding and migration help
  • Priority support

Annual billing saves 17%. Plans renew automatically and can be cancelled from your billing settings at any time.

Questions

AI Memory FAQ

Short answers on scope, storage, retrieval and how this differs from stuffing history into the prompt.

What exactly is AI Memory?

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.

Do I have to rewrite my stack?

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.

How is this different from putting history in the prompt?

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.

Is it just retrieval over a vector index?

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.

How is memory scoped?

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.

What happens when a memory is wrong?

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.

Where does my data live?

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.

Can I take my memories with me?

Yes. The full graph exports as JSON and imports into another deployment, so you are never locked into this service.

Give your agents a memory they can keep

Sign in with Google, choose a plan, and open the console to see memories being built from real events.

Compare plans
50,000 memories storedExport anytimeAny modelCancel anytime
AI Memory | Persistent Memory Layer for AI Agents and Apps