Files
mem0/skills/mem0-integrate
Mgeeeek a2516269cc Surface mem0_notice for unclaimed Agent Mode keys + docs
CLI now consumes the unified mem0_notice surface that the platform side
emits for unclaimed Agent Mode keys. The notice is a directive to the
LLM agent reading the output, with a verbatim sentence to relay to the
human owner. Two presentation paths:

- Human/text output: yellow stderr banner after the primary output,
  once per command. Skipped in agent mode (the JSON envelope carries
  it instead, so no duplication).
- JSON/agent output (--json/--agent): folded into the envelope as
  "mem0_notice" so an agent parsing the output sees it without
  inspecting HTTP headers.

CLI changes (Python + Node, kept in lockstep):
- state.{ts,py}: captureNotice / takeNotice helpers — last-write-wins
  stash so multi-request commands fire the notice exactly once.
- backend/platform.{ts,py}: _request extracts notice from response
  bodies (top-level dict or list[0]) with header fallback, strips
  from downstream payload, captures for end-of-command surfacing.
- output.{ts,py}: JSON envelope formatters fold in any pending notice.
- index.ts / app.py: entrypoint surfaces notice on exit when not in
  agent mode.
- commands/agent-mode.{ts,py}: init success path prints the platform's
  notice verbatim (fallback to dim claim-command line if a stale
  backend doesn't return it).

Init-flag handling fix: the Python argv preprocessor was stripping
--agent from sys.argv unconditionally as the global JSON-output alias.
That swallowed `mem0 init --agent` (where --agent is a subcommand flag
for unattended bootstrap). Now preserved when "init" is in argv.

Parity tests: cli/python/tests/test_agent_mode.py and
cli/node/tests/agent-mode.test.ts — 7 tests each, kept in sync.

cli-spec.json updated: init now lists --agent and --source.

Docs:
- README.md: Agent Mode promo at top of Quickstart.
- docs/llms.txt: fast-path block for AI agents reading the docs.
- skills/mem0/SKILL.md, skills/mem0-cli/SKILL.md,
  skills/mem0-integrate/SKILL.md, mem0-plugin/skills/mem0/SKILL.md:
  autonomous-setup section + fallback hints.
- mem0-plugin/README.md, openclaw/README.md: "Quick path for agents"
  blocks above the human Quick Start.
2026-05-14 02:11:39 +05:30
..

mem0-integrate — Pipeline Skill

Wire Mem0 into an existing repository end-to-end, using a goal-driven, test-first pipeline.

This is a pipeline skill, not a reference skill. Invoke it as /mem0-integrate when you want your assistant to do the work of integrating Mem0 into a target repo. For day-to-day SDK coding help, install mem0 instead.

Part of the Mem0 Skill Graph:

What This Skill Does

When invoked, your assistant will:

  • Detect the target repo's language and stack automatically
  • Ask whether to integrate with Mem0 Platform (managed) or Mem0 Open Source (self-hosted)
  • Write failing tests first — no implementation until tests exist
  • Keep the integration additive and feature-flagged — existing behavior stays byte-for-byte identical when the flag is unset
  • Produce a local feature branch (mem0-integrate/...) and a .mem0-integration/ directory of artifacts (goal.md, plan.md, product.json) consumed by the companion verification skill

When to Use

Trigger phrases:

  • "Integrate Mem0 into this repo"
  • "Add Mem0 to my project"
  • "Wire Mem0 into <repo>"
  • "How do I add memory to an existing project?"

Do not use this skill for general SDK usage (install mem0), terminal workflows (install mem0-cli), or Vercel AI SDK integration (install mem0-vercel-ai-sdk).

Installation

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

npx skills add https://github.com/mem0ai/mem0 --skill mem0-integrate

For verification on the same branch, also install the companion skill:

npx skills add https://github.com/mem0ai/mem0 --skill mem0-test-integration

Claude.ai

  1. Download this skills/mem0-integrate 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-integrate", "source": "https://github.com/mem0ai/mem0/tree/main/skills/mem0-integrate"}'

Prerequisites

  • A Mem0 Platform API key (get one) or a working OSS setup (LLM + vector store)
  • Python 3.10+ or Node.js 18+ in the target repo
  • A clean working tree on the target repo's default branch

Workflow

/mem0-integrate          →  creates mem0-integrate/<slug> branch,
                            writes .mem0-integration/ artifacts,
                            implements against failing tests
/mem0-test-integration   →  runs the repo's native test suite,
                            executes a real end-to-end smoke flow,
                            produces a scorecard

The two skills are loosely coupled — they share the same workspace and branch via .mem0-integration/, but the verifier never modifies source.

License

Apache-2.0