Routerbase API Integration
aiskillstore/marketplace
Integrate applications with RouterBase, the OpenAI-compatible model gateway at https://routerbase.com/v1.
Adds persistent memory to Vercel AI SDK apps with the Mem0 provider, using a wrapped model or standalone retrieve and store utilities.
$ npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mem0ai/mem0 mem0-vercel-ai-sdk --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/mem0-vercel-ai-sdk .claude/skills/mem0-vercel-ai-sdk && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "mem0-vercel-ai-sdk" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdk into .claude/skills/mem0-vercel-ai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-vercel-ai-sdk", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdkType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mem0ai/mem0 mem0-vercel-ai-sdk --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/mem0-vercel-ai-sdk .agents/skills/mem0-vercel-ai-sdk && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "mem0-vercel-ai-sdk" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdk into .agents/skills/mem0-vercel-ai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-vercel-ai-sdk", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mem0ai/mem0 mem0-vercel-ai-sdk --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/mem0-vercel-ai-sdk .cursor/skills/mem0-vercel-ai-sdk && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "mem0-vercel-ai-sdk" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdk into .cursor/skills/mem0-vercel-ai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-vercel-ai-sdk", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mem0ai/mem0.git --path skills/mem0-vercel-ai-sdk--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mem0ai/mem0 mem0-vercel-ai-sdk --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/mem0-vercel-ai-sdk .gemini/skills/mem0-vercel-ai-sdk && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "mem0-vercel-ai-sdk" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdk into .gemini/skills/mem0-vercel-ai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-vercel-ai-sdk", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mem0ai/mem0 mem0-vercel-ai-sdkInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/mem0-vercel-ai-sdk .github/skills/mem0-vercel-ai-sdk && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "mem0-vercel-ai-sdk" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdk into .github/skills/mem0-vercel-ai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-vercel-ai-sdk", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mem0ai/mem0 mem0-vercel-ai-sdk --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mem0ai/mem0.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/mem0-vercel-ai-sdk .opencode/skills/mem0-vercel-ai-sdk && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "mem0-vercel-ai-sdk" agent skill from https://github.com/mem0ai/mem0/tree/main/skills/mem0-vercel-ai-sdk into .opencode/skills/mem0-vercel-ai-sdk/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "mem0-vercel-ai-sdk", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
mem0-vercel-ai-sdkAdds persistent memory to Vercel AI SDK apps with the Mem0 provider, using a wrapped model or standalone retrieve and store utilities.
The skill shows how to install @mem0/vercel-ai-provider alongside the ai package, set MEM0_API_KEY plus a key for the underlying LLM provider, and then use one of three patterns. The wrapped model, created with createMem0, searches Mem0 for relevant memories, injects them as a system message, calls the underlying LLM and stores the conversation back as a fire-and-forget call. Standalone utilities such as retrieveMemories and addMemories give full control of the cycle, and streamText works with the wrapped model for streaming.
Supported providers are OpenAI (the default), Anthropic, Google, Groq and Cohere, selected when the Mem0 instance is created, each with its own API key variable. Reference files cover the provider API, the memory utilities and usage patterns.
The skill is scoped to Vercel AI SDK use, including Next.js apps. Direct SDK calls and terminal commands belong to other Mem0 skills. The compatibility notes list Node.js 18+ and Vercel AI SDK v5.
2 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit b7ad69a. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
api.mem0.aiFrom URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
OPENAI_API_KEYANTHROPIC_API_KEYMEM0_API_KEYGOOGLE_GENERATIVE_AI_API_KEYGROQ_API_KEYCOHERE_API_KEYGOOGLE_API_KEYFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Node.js 18+, npm install @mem0/vercel-ai-provider, Vercel AI SDK v6 (ai package ^6), MEM0_API_KEY + LLM provider API key
From compatibility in the SKILL.md frontmatter.
Mem0 Provider for Vercel AI SDK loads about 2.3k tokens when it runs, and up to ~10k if it reads all its reference files. Until then it costs about 134 tokens; SKILL.md has 625 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from mem0ai/mem0 at commit b7ad69a, republished under its Apache-2.0 licence (© mem0ai). 625 words, ~2,295 tokens.
.claude/skills/mem0-vercel-ai-sdk/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Memory-enhanced AI provider for Vercel AI SDK. Automatically retrieves and stores memories during LLM calls.
npm install @mem0/vercel-ai-provider ai@^6ai and the @ai-sdk/* provider packages ship as regular dependencies of @mem0/vercel-ai-provider, so nothing else needs installing. The only peer dependency is zod (optional, ^3.0.0).
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
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:
POST /v3/memories/add/), awaited before the LLM call (a failed write is logged and ignored)POST /v3/memories/search/) to retrieve relevant memoriesFor generateText, the retrieved memories are also attached to the result as a source:
const { text, sources } = await generateText({
model: mem0("gpt-5-mini", { user_id: "alice" }),
prompt: "Recommend a restaurant",
});
console.log(sources.find((s) => s.title === "Mem0 Memories")?.providerMetadata?.mem0);The source has title: "Mem0 Memories" and providerMetadata.mem0 holds memories (array of memory objects) and memoriesText. It is only present when at least one memory was retrieved.
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" }
);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 stores the conversation and retrieves memories before streaming begins.
| Provider | Config value | Required env var |
|---|---|---|
| OpenAI (default) | "openai" | OPENAI_API_KEY |
| Anthropic | "anthropic" | ANTHROPIC_API_KEY |
"google" (alias "gemini") | 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("claude-sonnet-4-20250514", { user_id: "alice" }),
prompt: "Hello!",
});User prompt
--> processMemories: addMemories (POST /v3/memories/add/, awaited)
--> processMemories: getMemories (POST /v3/memories/search/)
--> memories (if any) injected as system message at start of prompt
--> underlying LLM generates response (doGenerate or doStream)
--> response returned to caller (doGenerate also attaches a "Mem0 Memories" source)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 Mem0| Function | Returns | Use when |
|---|---|---|
retrieveMemories | Formatted system prompt string | Injecting directly into system parameter |
getMemories | Raw memory array | Processing memories programmatically |
searchMemories | Raw search response (as returned by the API) | Need scores and full metadata |
addMemories | API response | Storing new messages to Mem0 |
retrieveMemories, getMemories, and searchMemories accept LanguageModelV3Prompt | string as the first argument; addMemories is typed as LanguageModelV3Prompt (a string also works at runtime). All four take optional Mem0ConfigSettings as the second argument.
user_id (or agent_id/app_id/run_id) for consistent memory retrieval. The search endpoint requires at least one entity ID in filters; the provider places these IDs there for you.mem0ApiKey in the config object, or set the MEM0_API_KEY environment variable.@mem0/vercel-ai-provider 3.x). Provider 2.x targeted AI SDK v5. It is not compatible with AI SDK v4 or earlier.processMemories awaits addMemories before searching and calling the LLM, so each wrapped call includes one memory write and one memory search. If either request fails, the error is logged and the LLM call proceeds without memories."google" and "gemini" are both accepted and map to @ai-sdk/google.org_id, project_id, org_name, project_name, output_format, filter_memories, async_mode, enable_graph, version, api_version. Graph memory is now a Mem0 Platform project setting, not a provider option.top_k is 10. threshold and rerank are only sent when set (the API default for rerank is false; threshold is a server-side cutoff, not a floor on the returned score).host in the config to point to a different Mem0 API endpoint (default: https://api.mem0.ai).| Topic | File |
|---|---|
Provider API (createMem0, Mem0Provider, types) | local / GitHub |
Memory utilities (addMemories, retrieveMemories, etc.) | local / GitHub |
| Usage patterns and examples | local / GitHub |
© mem0ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in skills/mem0-vercel-ai-sdk of mem0ai/mem0.
Open the folder on GitHubat commit b7ad69a
Mem0 Provider for Vercel AI SDK next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Mem0 Provider for Vercel AI SDK this skillmem0ai/mem0 | 67k | — | ~2.3k | Automated safety check: Pass | Apache-2.0 | |
| Routerbase API Integrationaiskillstore/marketplace | 433 | — | ~964 | Automated safety check: Pass | None | |
| AI SDKvercel-labs/ai-facts | 168 | 20 repos | ~1.2k | Automated safety check: Pass | None | |
| Claude APIKocoro-lab/Kocoro | 414 | 7 repos | ~4.5k | Automated safety check: Pass | Apache-2.0 | |
| Genui Integrationopentiny/genui-sdk | 172 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Talking Avatar Voice Chat Appbuildfastwithai/gen-ai-experiments | 785 | — | ~1.7k | Automated safety check: Pass | MIT |
aiskillstore/marketplace
Integrate applications with RouterBase, the OpenAI-compatible model gateway at https://routerbase.com/v1.
vercel-labs/ai-facts
Answer questions about the AI SDK and help build AI-powered features.
Kocoro-lab/Kocoro
Build apps with the Claude API or Anthropic SDK. An agent skill from Kocoro-lab/Kocoro.
opentiny/genui-sdk
genui-sdk 全方位指南:安装、配置、集成、示例。用户提到 genui-sdk、genui-sdk-server,或想构建 AI 聊天界面、动态 UI 组件、Node.js 后端 LLM 代理(OpenAI 兼容 chat/completions API)时使用。涵盖 Vue/Angular 前端(主题、物料、GenuiChat/GenuiRenderer)与 Server…
buildfastwithai/gen-ai-experiments
Builds a realtime voice-chat app around a talking character portrait made from your photo or a text description, with mouth sprites driven by the audio.
neondatabase/agent-skills
One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks.
mem0ai/mem0
Adds persistent memory to AI apps with the Mem0 Python and TypeScript SDKs: store, search, update and delete user memories, with framework integrations.
mem0ai/mem0
Adds, searches, lists, updates and deletes memories on the Mem0 platform from the terminal with the mem0 command, including a JSON mode built for agents.
mem0ai/mem0
Finds and deletes specific mem0 memories by search query or ID, always asking for confirmation first, and can undo the most recent memories added this session.
mem0ai/mem0
Saves a fact, decision or preference the user states into mem0 as written, labeled with a memory type such as decision, convention or user_preference.
mem0ai/mem0
Shows or changes the default Mem0 memory scope, project, session or global, which decides where memories are saved and searched.
mem0ai/mem0
Looks up stored agent memories by keyword or ID and prints compact one-line results instead of full detail.
Works with
Categories
Adds persistent memory to Vercel AI SDK apps with the Mem0 provider, using a wrapped model or standalone retrieve and store utilities. The skill shows how to install @mem0/vercel-ai-provider alongside the ai package, set MEM0_API_KEY plus a key for the underlying LLM provider, and then use one of three patterns. The wrapped model, created with createMem0, searches Mem0 for relevant memories, injects them as a system message, calls the underlying LLM and stores the conversation back as a fire-and-forget call.
Mem0 Provider for Vercel AI SDK fits situations like: giving a Vercel AI SDK chatbot memory across conversations; wrapping generateText or streamText calls with automatic memory retrieval; controlling exactly when memories are retrieved and stored; adding memory-augmented AI to a Next.js app.
Run `npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a claude-code`. Or copy the skill folder (skills/mem0-vercel-ai-sdk in mem0ai/mem0) into .claude/skills/mem0-vercel-ai-sdk in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a codex`. Or copy the skill folder (skills/mem0-vercel-ai-sdk in mem0ai/mem0) into .agents/skills/mem0-vercel-ai-sdk in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mem0ai/mem0 --skill mem0-vercel-ai-sdk -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mem0-vercel-ai-sdk, .gemini/skills/mem0-vercel-ai-sdk, .github/skills/mem0-vercel-ai-sdk and .opencode/skills/mem0-vercel-ai-sdk in your project.
Going by SKILL.md and its folder, Mem0 Provider for Vercel AI SDK needs the command-line tools its instructions call (npm) and credentials named OPENAI_API_KEY, ANTHROPIC_API_KEY, MEM0_API_KEY and GOOGLE_GENERATIVE_AI_API_KEY. Our summary lists: Node.js 18 or newer; The @mem0/vercel-ai-provider and ai npm packages; MEM0_API_KEY and an API key for the LLM provider. Compatibility (from SKILL.md): Node.js 18+, npm install @mem0/vercel-ai-provider, Vercel AI SDK v6 (ai package ^6), MEM0_API_KEY + LLM provider API key.
SKILL.md names 1 domain. In commands or code: api.mem0.ai; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Mem0 Provider for Vercel AI SDK is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.1k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Mem0 Provider for Vercel AI SDK: Routerbase API Integration (aiskillstore/marketplace, 433 stars), AI SDK (vercel-labs/ai-facts, 168 stars), Claude API (Kocoro-lab/Kocoro, 414 stars) and Genui Integration (opentiny/genui-sdk, 172 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mem0ai (a GitHub organization) maintains it in mem0ai/mem0, which has 66,921 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 9, 2026.
Source: mem0ai/mem0 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.