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).

Install
npx skills add 'https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdk'
Download bundle ↓
main · 0df3e4bScanned 2026-09-17

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗
View on GitHub
← Back to SKILL.md

Mem0 Vercel AI SDK Skill for Claude

Add persistent memory to any Vercel AI SDK application using @mem0/vercel-ai-provider.

What This Skill Does

When installed, Claude can:

  • Set up @mem0/vercel-ai-provider in your TypeScript or Next.js project
  • Generate working code using the wrapped model (createMem0) or standalone utilities (retrieveMemories, addMemories, etc.)
  • Configure multi-provider setups (OpenAI, Anthropic, Google, Groq, Cohere)
  • Integrate memory into streaming responses, structured output, and API routes

Installation

CLI (Claude Code, OpenCode, OpenClaw, or any tool that supports skills)

npx skills add https://github.com/mem0ai/mem0 --skill mem0-vercel-ai-sdk

Claude.ai

  1. Download this skills/mem0-vercel-ai-sdk folder as a ZIP
  2. Go to Settings > Capabilities > Skills
  3. Click Upload skill and select the ZIP

Claude API (Skills API)

curl -X POST https://api.anthropic.com/v1/skills \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "mem0-vercel-ai-sdk", "source": "https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdk"}'

Prerequisites

  • Node.js 18+

  • Vercel AI SDK v5 (ai package version 5.x)

  • A Mem0 Platform API key (Get one here)

  • An LLM provider API key (OpenAI, Anthropic, Google, Groq, or Cohere)

  • Set environment variables:

    export MEM0_API_KEY="m0-xxx"
    export OPENAI_API_KEY="sk-xxx"  # or your chosen provider's key

Quick Start

After installing, just ask Claude:

  • "Add memory to my Vercel AI SDK app"
  • "Set up mem0 with streamText in my Next.js API route"
  • "Use retrieveMemories with Anthropic instead of the wrapped model"
  • "Show me how to use graph memories with the Vercel AI provider"
  • "Help me store conversation history with addMemories"

What's Inside

skills/mem0-vercel-ai-sdk/
├── SKILL.md                          # Skill definition and instructions
├── README.md                         # This file
├── LICENSE                           # Apache-2.0
└── references/                       # Documentation (loaded on demand)
    ├── provider-api.md               # createMem0, Mem0Provider, types, config
    ├── memory-utilities.md           # addMemories, retrieveMemories, getMemories, searchMemories
    └── usage-patterns.md             # Working examples: streaming, Next.js, multi-provider, graph

Skill Graph

This skill is part of the Mem0 skill graph. The three Mem0 skills (mem0, mem0-cli, mem0-vercel-ai-sdk) each cover a different interface to the same Mem0 Platform API.

License

Apache-2.0