mem0-vercel-ai-sdk
Skill67k starsChanged 3 months agoApache-2.0View on GitHub
Mem0 provider for Vercel AI SDK (@mem0/vercel-ai-provider). TRIGGER when: user mentions "vercel ai sdk", "@mem0/vercel-ai-provider", "createMem0", "retrieveMemories", "addMemories", "getMemories", "searchMemories", "mem0 vercel", "AI SDK provider", "AI SDK memory", or is using generateText/streamText with mem0. Also triggers for Next.js apps needing memory-augmented AI. DO NOT TRIGGER when: user asks about direct Python/TS SDK calls without Vercel (use mem0 skill), or CLI terminal commands (use mem0-cli skill).
- Reads credentials
- Installs packages
Trending
Less talk lately.about the whole repository
Who's talking about mem0ai/mem0
- A Hacker News story“Show HN: Mem0 – open-source Memory Layer for AI apps”Hacker News · Sep 4, 2024 · 201 points
- kuzudb/kuzu“Release 0.11.0”GitHub · May 14, 2025 · 14 reactions
- anomalyco/opencode“Feature Request: Model-Agnostic Memory Layer (Global & Per-Project)”GitHub · Jan 12, 2026 · 13 reactions
- A Hacker News story“Show HN: OpenMemory – Make your MCP clients more context-aware”Hacker News · May 13, 2025 · 8 points
- getzep/zep-papers“Revisiting Zep’s 84% LoCoMo Claim: Corrected Evaluation & 58.44% Accuracy”GitHub · May 8, 2025 · 7 reactions
The biggest 5 of 62 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 62
Talked about on GitHub, Bluesky and Hacker News (62 times).
On GitHub · 50
- May 14, 2025Release 0.11.0 — kuzudb/kuzu14 reactions · 1 comment
- Jan 12, 2026Feature Request: Model-Agnostic Memory Layer (Global & Per-Project) — anomalyco/opencode13 reactions · 4 comments
- May 8, 2025Revisiting Zep’s 84% LoCoMo Claim: Corrected Evaluation & 58.44% Accuracy — getzep/zep-paperssays it tested it7 reactions · 3 comments
- Jul 22, 2024mem0 compatabile with openwebui and ollama? — open-webui/open-webui4 reactions
- Sep 1, 2025Add memory — pollen-robotics/reachy_mini_conversation_app3 reactions · 1 comment
45 more on GitHub
- Nov 5, 2026fix(serve): what a run learns is kept item by item, by the grader and by the checks — Parcha-ai/agentrun2 reactions · 2 comments
- Jul 17, 2026chore(deps): bump the pip group across 2 directories with 20 updates — CaffeeLake/MemOS2 reactions · 4 comments
- Jun 24, 2026chore(deps): bump the pip group across 2 directories with 20 updates — CaffeeLake/MemOS2 reactions · 1 comment
- Jun 17, 2026plugin: official mem0 client (add_memory / search_memories hooks for cross-session memory) — Kilo-Org/kilocode2 reactions · 2 comments
- May 28, 2026chore(deps): bump the pip group across 9 directories with 5 updates — HarleyCoops/Dakota18902 reactions · 1 comment
- May 28, 2026chore(deps): bump the uv group across 23 directories with 15 updates — HarleyCoops/awesome-llm-apps2 reactions · 1 comment
- May 28, 2026chore(deps): bump mem0ai from 0.1.63 to 2.0.0b2 in /examples/demo-viewer/agent/demo/crewai_crew_enterprise/restaurant_finder_crew — HarleyCoops/copilotkit2 reactions · 1 comment
- May 28, 2026chore(deps): bump mem0ai from 0.1.63 to 2.0.0b2 in /examples/coagents-enterprise-crewai-crews/agent-py — HarleyCoops/copilotkit2 reactions · 1 comment
- May 28, 2026chore(deps): bump the pip group across 9 directories with 9 updates — HarleyCoops/Dakota18902 reactions · 3 comments
- May 28, 2026chore(deps): bump the pip group across 9 directories with 12 updates — HarleyCoops/Dakota18902 reactions · 3 comments
- May 13, 2026Bump mem0ai from 0.1.81 to 2.0.0b2 in /A2A/samples/python — HarleyCoops/Agent2Agent2 reactions · 1 comment
- May 13, 2026Bump mem0ai from 0.1.81 to 2.0.0b2 in /samples/python — HarleyCoops/A2A2 reactions · 1 comment
- May 13, 2026Bump mem0ai from 0.1.93 to 2.0.0b2 in /workflows — HarleyCoops/workflow-use2 reactions · 3 comments
- May 12, 2026chore(deps): update mem0ai requirement from >=0.1 to >=2.0.2 — EvezArt/evez666-arg-canon2 reactions · 1 comment
- Nov 15, 2026[Feature]: Add user-aware persistent memory at the Multica abstraction layer — multica-ai/multica1 reaction · 2 comments
- Oct 26, 2026deps(python): bump the python-runtime group across 1 directory with 172 updates — JoeElder21/Joeyyy1 reaction · 2 comments
- Sep 7, 2026Chore(deps): bump mem0ai from 2.0.19 to 2.0.20 — MoonLadderStudios/MoonMind1 reaction
- Aug 31, 2026Chore(deps): bump mem0ai from 2.0.18 to 2.0.19 — MoonLadderStudios/MoonMind1 reaction
- Aug 17, 2026Chore(deps): bump mem0ai from 2.0.17 to 2.0.18 — MoonLadderStudios/MoonMind1 reaction
- Aug 10, 2026Chore(deps): bump mem0ai from 2.0.14 to 2.0.17 — MoonLadderStudios/MoonMind1 reaction
- Jul 27, 2026Chore(deps): bump mem0ai from 2.0.12 to 2.0.14 — MoonLadderStudios/MoonMind1 reaction
- Jul 20, 2026Chore(deps): bump mem0ai from 2.0.11 to 2.0.12 — MoonLadderStudios/MoonMind1 reaction
- Jul 16, 2026Evaluate + implement mem0 as a memory backend (kind: mem0) — fagerbergj/quack1 reaction · 13 comments
- Jul 6, 2026Bump mem0ai from 2.0.10 to 2.0.11 — MoonLadderStudios/MoonMind1 reaction
- Jun 29, 2026Bump mem0ai from 2.0.7 to 2.0.10 — MoonLadderStudios/MoonMind1 reaction
- Jun 28, 2026Expose memory over MCP: official 8 KG tools + remember/recall REST — joelfuller2016/KanbanFlow-v21 reaction · 2 comments
- Jun 28, 2026Add hybrid retrieval service (sqlite-vec + FTS5 BM25 + recency/usefulness fusion) — joelfuller2016/KanbanFlow-v21 reaction · 2 comments
- Jun 28, 2026Epic: AI memory store — semantic memory for agents over the kanban graph — joelfuller2016/KanbanFlow-v21 reaction · 6 comments
- Jun 28, 2026Epic: AI Memory & Ops Hub — KanbanFlow as memory + PM + knowledge store for AI — joelfuller2016/KanbanFlow-v21 reaction · 5 comments
- Jun 22, 2026Bump mem0ai from 2.0.6 to 2.0.7 — MoonLadderStudios/MoonMind1 reaction
- Jun 15, 2026Bump mem0ai from 2.0.4 to 2.0.6 — MoonLadderStudios/MoonMind1 reaction
- May 23, 2026docs(readme): link MemPalace, Mem0, Basic Memory in Comparison header — kitfunso/hippo-memory1 reaction
- May 8, 2026Bump mem0ai from 0.1.65 to 2.0.0b2 in /mem0-agent — cicero-im/ottomator-agents1 reaction · 1 comment
- May 8, 2026Bump mem0ai from 0.1.65 to 2.0.0b2 in /mem0-agent/studio-integration-version — cicero-im/ottomator-agents1 reaction · 1 comment
- May 8, 2026Bump mem0ai from 0.1.29 to 2.0.0b2 in /advanced_llm_apps/llm_apps_with_memory_tutorials/ai_travel_agent_memory — cicero-im/awesome-llm-apps1 reaction · 1 comment
- May 8, 2026Bump mem0ai from 0.1.93 to 2.0.0b2 in /advanced_ai_agents/multi_agent_apps/ai_news_and_podcast_agents/beifong — cicero-im/awesome-llm-apps1 reaction · 1 comment
- May 8, 2026Bump mem0ai from 0.1.29 to 2.0.0b2 in /advanced_llm_apps/llm_apps_with_memory_tutorials/llm_app_personalized_memory — cicero-im/awesome-llm-apps1 reaction · 1 comment
- May 8, 2026build(deps): bump mem0ai from 1.0.1 to 2.0.0b2 — cicero-im/cuga-agent1 reaction · 1 comment
- May 8, 2026Bump mem0ai from 0.1.102 to 2.0.0b2 in /advanced_ai_agents/multi_agent_apps/agent_teams/ai_travel_planner_agent_team/backend — cicero-im/awesome-llm-apps1 reaction · 1 comment
- May 8, 2026Bump mem0ai from 0.1.29 to 2.0.0b2 in /advanced_llm_apps/llm_apps_with_memory_tutorials/local_chatgpt_with_memory — cicero-im/awesome-llm-apps1 reaction · 1 comment
- May 8, 2026chore(deps): bump mem0ai from 0.1.73 to 2.0.0b2 — cicero-im/camel1 reaction · 1 comment
- May 8, 2026Bump mem0ai from 0.1.29 to 2.0.0b2 in /advanced_ai_agents/single_agent_apps/ai_customer_support_agent — cicero-im/awesome-llm-apps1 reaction · 1 comment
- Feb 3, 2026提供集成 https://github.com/mem0ai/mem0的例子 — smallnest/langgraphgo1 reaction
- Jan 17, 2026Core: Mem0 Integration Framework — Arithmomaniac/copilot-session-tools1 reaction · 1 comment
- Nov 17, 2025GitMCP — tbrandenburg/shai1 reaction · 5 comments
On Bluesky · 9
- Jul 18, 2024今日のGitHubトレンド mem0ai/mem0 mem0ai/mem0リポジトリは、パーソナライズされたAI体験を実現するためのメモリーレイヤーを提供するものです。… — @dailygithubtrends.bsky.social2 likes and reposts
- Aug 19, 2026🚀 GitHub Intelligence Drop rustlings (Rust • 🟢) ⭐ 63.9K → https://github.com/rust-lang/rustlings mem0 (Python • 🟢) ⭐ 63.5K →… — @githubfeed.bsky.social1 likes and repost
- May 17, 2025今日のGitHubトレンド mem0ai/mem0 このリポジトリは、AIアシスタントやエージェントにインテリジェントな記憶層を追加することを目的としています。 ユーザーの嗜好を記憶し、個々のニーズに適応し、継続的に学習することで、パーソナライズされたAI対話を実現します。… — @dailygithubtrends.bsky.social1 likes and repost
- Mar 8, 2025github.com/mem0ai/mem0 — @rdenadai.dev1 likes and repost
- Sep 4, 2024Show HN: Mem0 – open-source Memory Layer for AI apps Discussion — @hackernewsbot.bsky.social1 likes and repost
4 more on Bluesky
- Jul 17, 2024🔥 Hot Repo! 🔥 (100+ new stars) 📦 mem0ai / mem0 ⭐ 9,249 (+171) 🗒 Python The memory layer for Personalized AI — @github-trending.bsky.social1 likes and repost · 1 reply
- Jul 16, 2026**GODDAMMIT, #GOOGLE!!** So, I'm trying to set up mem0 to act as a "memory" service for my #OpenClaw configuration. Except, OpenClaw is six… — @ferricoxide.blahaj.zone.ap.brid.gy0 likes and reposts · 1 reply
- Dec 8, 2025build v buy, control v convenience. it was gemini's metaphor. i found it fascinating learning how this stuff really works. vector matching… — @songbirddigital.bsky.social0 likes and reposts · 1 reply
- Jul 21, 2024💎 Hidden Gem! 💎 (1000+ new stars) 📦 mem0ai / mem0 ⭐ 12,313 (+1,405) 🗒 Python The memory layer for Personalized AI — @github-trending.bsky.social0 likes and reposts · 1 reply
On Hacker News · 3
- Sep 4, 2024Show HN: Mem0 – open-source Memory Layer for AI apps201 points · 61 comments
- May 13, 2025Show HN: OpenMemory – Make your MCP clients more context-aware8 points
- Aug 1, 2024Mem0: The Memory Layer for Personalized AI2 points
In this repository24 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- integrations/AGENTS.mdAGENTS.md
- mem0/AGENTS.mdAGENTS.md
- mem0-ts/AGENTS.mdAGENTS.md
- server/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- integrations/CLAUDE.mdCLAUDE.md
- mem0/CLAUDE.mdCLAUDE.md
- mem0-ts/CLAUDE.mdCLAUDE.md
- server/CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- docs/llms.txtllms.txt
- mem0-cliSkill
- mem0-integrateSkill
- mem0-oss-to-platformSkill
- mem0Skill
- mem0-test-integrationSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 63
Use standalone utilities when you want full control over the memory retrieve/store cycle, or you want to use a provider that is already …
- Very specific: line 97
Use streamText for streaming responses with memory augmentation:
- Very specific: line 168
All four accept LanguageModelV2Prompt | string as the first argument and optional Mem0ConfigSettings as the second.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mem0 Vercel AI SDK Provider
Memory-enhanced AI provider for Vercel AI SDK. Automatically retrieves and stores memories during LLM calls.
Step 1: Install
npm install @mem0/vercel-ai-provider aiStep 2: Set up environment variables
export MEM0_API_KEY="m0-xxx"
export OPENAI_API_KEY="sk-xxx" # or ANTHROPIC_API_KEY, GOOGLE_API_KEY, etc.Get a Mem0 API key at: https://app.mem0.ai/dashboard/api-keys?utm_source=oss&utm_medium=skill-mem0-vercel-ai-sdk
Pattern 1: Wrapped Model
The wrapped model approach is the simplest. createMem0 returns a provider that wraps any supported LLM with automatic memory retrieval and storage.
import { generateText } from "ai";
import { createMem0 } from "@mem0/vercel-ai-provider";
const mem0 = createMem0();
const { text } = await generateText({
model: mem0("gpt-5-mini", { user_id: "alice" }),
prompt: "Recommend a restaurant",
});What happens under the hood:
- The prompt is sent to Mem0 search (
POST /v3/memories/search/) to retrieve relevant memories - Retrieved memories are injected as a system message at the start of the prompt
- The underlying LLM (e.g., OpenAI gpt-5-mini) generates a response using the enriched prompt
- The conversation is stored back to Mem0 (
POST /v3/memories/add/) as a fire-and-forget async call (no await)
Pattern 2: Standalone Utilities
Use standalone utilities when you want full control over the memory retrieve/store cycle, or you want to use a provider that is already configured separately.
import { openai } from "@ai-sdk/openai";
import { generateText } from "ai";
import { retrieveMemories, addMemories } from "@mem0/vercel-ai-provider";
const prompt = "Recommend a restaurant";
// Retrieve memories -- returns a formatted system prompt string
const memories = await retrieveMemories(prompt, {
user_id: "alice",
mem0ApiKey: "m0-xxx",
});
// Generate using any provider with injected memories
const { text } = await generateText({
model: openai("gpt-5-mini"),
prompt,
system: memories,
});
// Optionally store the conversation back
await addMemories(
[
{ role: "user", content: [{ type: "text", text: prompt }] },
{ role: "assistant", content: [{ type: "text", text }] },
],
{ user_id: "alice", mem0ApiKey: "m0-xxx" }
);Pattern 3: Streaming
Use streamText for streaming responses with memory augmentation:
import { streamText } from "ai";
import { createMem0 } from "@mem0/vercel-ai-provider";
const mem0 = createMem0();
const result = streamText({
model: mem0("gpt-5-mini", { user_id: "alice" }),
prompt: "What should I cook for dinner?",
});
for await (const chunk of result.textStream) {
process.stdout.write(chunk);
}The wrapped model handles memory retrieval before streaming begins and stores the conversation after.
Supported Providers
| Provider | Config value | Required env var |
| OpenAI (default) | "openai" | OPENAI_API_KEY |
| Anthropic | "anthropic" | ANTHROPIC_API_KEY |
"google" | GOOGLE_GENERATIVE_AI_API_KEY | |
| Groq | "groq" | GROQ_API_KEY |
| Cohere | "cohere" | COHERE_API_KEY |
Select a provider when creating the Mem0 instance:
const mem0 = createMem0({ provider: "anthropic" });
const { text } = await generateText({
model: mem0("gpt-5-mini", { user_id: "alice" }),
prompt: "Hello!",
});How It Works Internally
Wrapped model flow
User prompt
--> searchInternalMemories (POST /v3/memories/search/)
--> memories injected as system message at start of prompt
--> underlying LLM generates response (doGenerate or doStream)
--> processMemories fires addMemories as fire-and-forget (no await)
--> response returned to callerStandalone flow
User controls each step:
1. retrieveMemories / getMemories / searchMemories -> fetch memories
2. inject into system prompt manually
3. call generateText / streamText with any provider
4. addMemories -> store new conversation to Mem0Key Differences Between the 4 Utility Functions
| Function | Returns | Use when |
retrieveMemories | Formatted system prompt string | Injecting directly into system parameter |
getMemories | Raw memory array | Processing memories programmatically |
searchMemories | Full search response (results + relations) | Need relations, scores, metadata |
addMemories | API response | Storing new messages to Mem0 |
All four accept LanguageModelV2Prompt | string as the first argument and optional Mem0ConfigSettings as the second.
Common Edge Cases and Tips
- Always provide
user_id(oragent_id/app_id/run_id) for consistent memory retrieval. Without an entity identifier, memories cannot be scoped. - Standalone utilities require explicit API key: pass
mem0ApiKeyin the config object, or set theMEM0_API_KEYenvironment variable. - This uses Vercel AI SDK v5 (LanguageModelV2 / ProviderV2 interfaces). It is not compatible with AI SDK v3 or v4.
processMemoriesfiresaddMemoriesas fire-and-forget (.then()withoutawait). Memory storage happens asynchronously and does not block the LLM response.- The
"gemini"alias exists in the provider switch but is NOT in thesupportedProviderslist. Use"google"instead. - Custom host: set
hostin the config to point to a different Mem0 API endpoint (default:https://api.mem0.ai).
References
| Topic | File |
Provider API (createMem0, Mem0Provider, types) | local / GitHub |
Memory utilities (addMemories, retrieveMemories, etc.) | local / GitHub |
| Usage patterns and examples | local / GitHub |
Related Mem0 Skills
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

