mem0-integrate

Integrates Mem0 memory into existing repositories using a test-first, feature-flagged pipeline.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding long-term memory to an existing codebase is risky: integrations often break existing behavior, touch too many files, or lack tests. This Skill wires Mem0 into a repository through a goal-driven, TDD pipeline that keeps all changes additive, feature-flagged, and verifiable. ## Core Features & Use Cases - Automatic stack detection: Detects Python or Node/TypeScript repos, locates backend integration surfaces, and asks the user to choose between Mem0 Platform (managed) and Mem0 Open Source (self-hosted). - Test-first implementation: Writes failing tests against canonical Mem0 SDK signatures before any code, then delegates implementation to a subagent constrained by an approved plan. - Non-invasive guarantees: Gates all new code behind a feature flag (e.g., MEM0_ENABLED), forbids changes to existing exports or tests, and produces separable commits on a mem0-integrate/<slug> branch. - Self-healing verification loop: Runs the companion mem0-test-integration skill and spawns remediation subagents for failing checks, with bounded retries and regression rollback. - Use Case: A developer with an Express backend wants the assistant to remember user preferences across sessions. Invoking this Skill produces a gated Mem0 integration with tests, a feature branch, and a verification scorecard. ## Quick Start Ask your assistant to integrate Mem0 into this repository and confirm whether to use Mem0 Platform or Open Source when prompted.

Frequently Asked Questions about mem0-integrate

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

FAQPage Schema
How do I integrate Mem0 into an existing repository?

Invoke the mem0-integrate skill in a clean git repo with a detectable backend. It detects the language, asks you to choose Mem0 Platform or Open Source, writes failing tests first, then implements a feature-flagged integration on a mem0-integrate/<slug> branch.

What is the difference between Mem0 Platform and Mem0 Open Source?

Mem0 Platform is the managed service requiring a MEM0_API_KEY, while Open Source is self-hosted and needs an LLM key such as OPENAI_API_KEY plus your own vector store. The skill recommends Platform when the repo already uses multiple managed services and OSS when local infrastructure signals are present.

Does mem0-integrate work with frontend-only repositories?

No. The skill rejects frontend-only repos at its precondition gate because Mem0 integration must live in server-side code where API keys and user identity resolution are safe. It requires a detectable backend such as FastAPI, Express, or an agent framework.

Will adding Mem0 break my existing tests or behavior?

No. All new Mem0 code is gated behind a feature flag that defaults to off, so the repo behaves exactly like before when the flag is unset. The skill forbids modifying existing tests, exports, or signatures, and treats any pre-existing test failure as a non-invasiveness violation.

What happens if the Mem0 integration verification fails?

The self-healing loop categorizes the failing check from the scorecard and spawns a remediation subagent with a minimal-diff constraint. It retries up to 3 attempts per category by default, reverts regressing commits, and exits with code 6 if it cannot converge.