Integrations
Add FishMem memory to any agent framework via the REST API, the fishmem SDK, or a first-class adapter.
FishMem plugs into any agent framework two ways:
- Directly — call the mem0-compatible REST API or the
fishmemSDK from wherever your agent runs. This works with every framework, no adapter required. - A first-class adapter — a small package that wires FishMem into your framework's own memory or tool abstractions, so recall and persistence happen on the framework's lifecycle instead of by hand.
Because the API is mem0-compatible, many existing mem0 integrations can be
repointed at FishMem by changing the base URL to https://fishmem.com and the
key to fm_.... (mem0 compatibility is a migration convenience — it does not
imply any endorsement.)
Adapters
Vercel AI SDK
Retrieve-and-inject or expose memory as a tool with the ai package.
Mastra
Attach a FishMem-backed memory to a Mastra Agent.
OpenAI Agents SDK
Recall before each run, persist after, as session memory.
Cloudflare Agents SDK
Per-user memory inside an Agent Durable Object.
The integration pattern
Every adapter is a thin wrapper around the same four steps. If your framework isn't listed, implement these directly with the SDK:
- Search FishMem for memories relevant to the incoming message, scoped by
user_id(and optionallyagent_id/run_id). - Inject the results into the model's context or system prompt.
- Run the model.
- Add the new exchange back to FishMem so the next turn can recall it.
Reads (search and get) are free; an inferred add costs 2 credits. See
scoping for how user_id, agent_id, and
run_id isolate memories.