mem0-test-integration

Verify Mem0 integrations by running native tests, smoke flows, and E2E checks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After generating a Mem0 memory integration with /mem0-integrate, you need proof that it compiles, passes the repo's existing test suite, and actually stores and retrieves memories against a real API key. This Skill automates that verification and produces a pass/fail scorecard. ## Core Features & Use Cases - Precondition gating: Refuses to run unless .mem0-integration/ artifacts exist, the branch starts with mem0-integrate/, the working tree is clean, and the correct API key (MEM0_API_KEY or OPENAI_API_KEY) is present. - Two-pass test execution: Runs the repo's native suite with the feature flag unset (must behave like main) and set (new tests run), catching non-invasiveness violations as hard fails. - Real smoke and E2E tests: Exercises a live add/search/delete flow against Mem0 Platform or OSS with a disposable user_id, then runs the app end-to-end using the E2E recipe from plan.md and asserts memory appears in user-visible output. - Use Case: After running /mem0-integrate on a Python or TypeScript repo, invoke this Skill to install dependencies, run pytest or npm test in both flag modes, execute a live smoke call, and receive scorecard.md and scorecard.json with per-check results and exit codes for CI. ## Quick Start Ask your assistant to run /mem0-test-integration to verify the Mem0 integration on the current branch.

Frequently Asked Questions about mem0-test-integration

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

FAQPage Schema
How do I verify a Mem0 integration after running /mem0-integrate?

Invoke /mem0-test-integration on the same branch and workspace. It installs dependencies, runs the repo's native test suite with the feature flag off and on, executes a live smoke test against the Mem0 API, and writes a pass/fail scorecard to .mem0-integration/.

What are the preconditions for running mem0-test-integration?

The skill refuses to start unless .mem0-integration/ exists with product.json, goal.md, and plan.md, the branch starts with mem0-integrate/, the working tree is clean, and the same API key used during integration (MEM0_API_KEY or OPENAI_API_KEY) is in the environment.

Does mem0-test-integration work with both Python and TypeScript projects?

Yes. It routes by the language field in product.json, using pip and pytest for Python and npm/pnpm/yarn with npm test, vitest, or jest for TypeScript. It also supports both Mem0 Platform and OSS configurations.

Can I run mem0-test-integration in CI without prompts?

Yes. Set MEM0_TEST_CI=1 or pass --ci for non-interactive mode where keys must be in the environment and any failure exits non-zero. Flags like --skip-smoke, --skip-e2e, --only-smoke, and --only-e2e control which steps run.

What kinds of bugs does mem0-test-integration not catch?

It only catches compile and runtime bugs by design. Logical errors such as wrong data stored, incorrect user_id scoping, or retrieval at the wrong moment are explicitly out of scope and require human review, as noted in the scorecard's NOT checked section.

Why does the smoke test use a random user_id?

The smoke test uses a disposable user_id prefixed with mem0-test-integration- so a failed cleanup never pollutes real user data. It deletes its memories after the run, and a tidy step removes prefix-matching entries older than 24 hours on subsequent runs.