mem0

Integrate persistent memory into AI applications using the Mem0 Platform SDK.

1|Updated Jan 13, 2022
One-click install
npx skills add https://github.com/jayho-k/TIL --skill mem0-jayho-k
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mem0
Source: https://github.com/jayho-k/TIL/tree/main/AI/mem0/code/mem0_code_analize/mem0/integrations/mem0-plugin/skills/mem0
Command: npx skills add https://github.com/jayho-k/TIL --skill mem0-jayho-k

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires mem0ai, and includes scripts (resource) and references (resource) components.

What problem does it solve? AI applications lose user context between sessions, forcing developers to build custom memory infrastructure. This Skill provides working code patterns and API references for adding persistent, searchable memory to Python and TypeScript applications via the Mem0 Platform. ## Core Features & Use Cases - Memory CRUD Operations: Add, search, update, and delete user memories with scoped filters (user_id, agent_id, app_id, run_id) using the v3 API. - Framework Integrations: Ready-to-use patterns for LangChain, CrewAI, Vercel AI SDK, OpenAI Agents, LangGraph, LlamaIndex, and AutoGen. - Live Documentation Search: Query the latest Mem0 docs on demand with the included doc search script. - Use Case: A developer building a chatbot asks Claude to add memory so the bot remembers each user's dietary preferences across sessions; the Skill generates the retrieve-generate-store integration code. ## Quick Start Ask Claude to set up mem0 in your project and add memory to your chatbot using your MEM0_API_KEY.

Frequently Asked Questions about mem0

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add persistent memory to my AI chatbot?

Install the mem0ai package, initialize MemoryClient with your API key, then follow the retrieve-generate-store loop: call client.search() before generating a response and client.add() after each interaction, scoped by user_id.

How to integrate Mem0 with LangChain or CrewAI?

LangChain uses mem0.search() to build context injected into the prompt chain. CrewAI has native support via memory_config with provider set to mem0 and a user_id in the crew configuration.

What is the difference between Mem0 Platform and Mem0 OSS?

Platform uses MemoryClient calling the managed api.mem0.ai service with an API key. OSS uses the Memory class running locally with your own vector store, embedder, and LLM configuration. Do not mix the two imports.

Why does Mem0 search return empty results after adding memories?

The v3 API processes add() asynchronously, returning an event ID immediately. Wait 2-3 seconds before searching, verify the user_id matches exactly, and pass entity IDs inside the filters object.

Does Mem0 support TypeScript and Python SDKs?

Yes, both are supported via the mem0ai package. Python uses snake_case parameters and offers sync and async clients; TypeScript is fully async and uses camelCase top-level parameters with snake_case filter keys.