Skip to main content
Use Mem0 through Corsair: one client, typed API calls. Create a key in the Mem0 dashboard under Settings, API Keys. The key is scoped to a project, and every call acts on that project’s memories. Things to know before you write:
  • Writes are queued. memories.add returns an event_id with status PENDING, because extraction runs in the background. Poll events.get until the status is SUCCEEDED or FAILED. Passing infer: false stores the messages verbatim instead, which answers immediately with the stored memories.
  • A queued delete finishes before its event updates. memories.deleteAll answers with an event_id, but that event can still read PENDING after the memories are gone. To confirm a delete, re-read with memories.list and check that count is 0, passing show_expired: true and wrapping the scope in filters. Both are needed: without show_expired an expired memory is hidden, and memories.list rejects a filter with no entity ID, so a delete scoped only by metadata, org_id or project_id cannot be re-read this way. For those, check events.get instead.
  • Entity IDs. A memory belongs to a user, agent, app or run. memories.add takes those IDs at the top level; memories.search and memories.list require them inside filters, and Mem0 rejects a top-level entity ID with 400.
  • Deletes are permanent. memories.delete removes one memory, and memories.deleteAll removes every memory matching a filter. Mem0 queues memories.deleteAll and answers before the deletion happens. Neither can be undone.
  • The run ID has two names. memories.list returns it as session_id and memories.search returns the same value as run_id.
  • Expiration. A memory past its expiration_date stays stored but is hidden from search and list unless you pass show_expired: true. To clear an expiration date, pass expiration_date: null to memories.update.
  • Rate limits and quotas. Mem0 answers 429 when a project is over its rate limit, and the plugin retries that up to three times with backoff. A free or paid plan’s monthly add and retrieval limits are separate: calls past those fail with a 413, which the plugin does not retry because the limits reset on the billing date.
  • Webhooks. The plugin can register, list, change and remove Mem0 webhooks with webhooks.create, webhooks.list, webhooks.update and webhooks.delete, so Mem0 posts memory events to your URL. It does not receive those posts itself: Mem0 publishes no signing secret or signature header, so a receiver built here could not tell a genuine post from a forged one. Verify deliveries in your own endpoint, and poll events.list or events.get if you would rather not run one.
Operations that take an enum argument: memories.add accepts role values of user, assistant and system. memories.history reports events as ADD, UPDATE or DELETE, and events.get reports statuses of PENDING, RUNNING, FAILED and SUCCEEDED. What you get:
  • 16 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List a user’s memories
Remember a conversation turn
See the full list on the API page.

What’s next

API reference

Every mem0.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.