Agent skill · software engineering · mem0ai
mem0-vercel-ai-sdk
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).
Why this skill is useful
Adds executable scripts and specific integration patterns for memory-augmented AI using the Vercel AI SDK that the AI wouldn't reliably generate on its own.
What it needs
Requires @mem0/vercel-ai-provider, ai installed locally. Requires mem0, openai account access. About 4k tokens when loaded. Last updated 2026-08-06. 62,725 stars on the source repository.
What this skill does
Mem0 Vercel AI SDK Provider Memory-enhanced AI provider for Vercel AI SDK. Automatically retrieves and stores memories during LLM calls. Step 1: Install Step 2: Set up environment variables Get a Mem0 API key at: https://app.mem0.ai/dashboard/api-keys?utmsource=oss&utmmedium=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. What happens under the hood: 1. The prompt is sent to Mem0 search (POST /v3/memories/search/) to retrieve relevant memories 2. Retrieved memories are injected as a system message at the start of the prompt 3. The underlying LLM (e.g., OpenAI gpt-5-mini) generates a response using the enriched prompt 4. 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. Pattern 3: Streaming Use streamText for streaming responses with memory augmentation: The wrapped model handles memory retrieval before streaming begins and stores the conversation after. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills mem0ai/mem0-vercel-ai-sdk