Files
mem0/mem0-ts
kartik-mem0 227c02da9f fix(ts-tests): stop integration runs from deleting each other's data
The integration suite claimed exclusive ownership of a shared project. Its
globalSetup and globalTeardown each ran a project-wide wipe:

    deleteAll({userId: '*', agentId: '*', appId: '*', runId: '*'})
    deleteUsers()

CI runs this suite concurrently across PRs against one MEM0_API_KEY, so each
job's wipe deleted the memories its neighbours had just seeded. maxWorkers: 1
and max-parallel: 1 only serialize within a run, not across them.

Evidence from three jobs that overlapped on 2026-08-12:

  6903 crud  seeded 13:53:24-13:54:15, hit by 6928's wipe (13:53:20-30)  FAIL
  6928 crud  seeded 13:53:30-13:54:19, hit by 6902's wipe (13:53:31-43)  FAIL
  6902 crud  seeded 13:53:43-13:54:21, no overlapping wipe               PASS
  6902 batch ran    13:55:31-13:56:20, hit by 6928's teardown (13:55:59) FAIL

Every failure surfaced as waitForMemories timing out with zero memories, which
reads as pipeline latency but was deletion: probing the live API shows a seeded
user settling in 17s, well inside the 45s budget.

- drop globalSetup/globalTeardown; every suite already cleans up its own
  UUID-scoped user in afterAll
- remove the fullProjectCleanup helper so the wipe cannot come back
- give updateWebhook a per-run URL; the project enforces uniqueness on
  (project, url), so concurrent runs collided on the hardcoded constant

Verified: two suites run concurrently against the same key go from 3 failures
to 1. The remainder is updateProject() mutating project-level
custom_instructions, a singleton two runs cannot both own.
2026-08-12 19:47:08 +05:30
..
2025-02-27 15:19:17 -08:00
2025-02-27 15:19:17 -08:00

Mem0 - The Memory Layer for Your AI Apps

Mem0 is a self-improving memory layer for LLM applications, enabling personalized AI experiences that save costs and delight users. We offer both cloud and open-source solutions to cater to different needs.

See the complete OSS Docs. See the complete Platform API Reference.

1. Installation

For the open-source version, you can install the Mem0 package using npm:

npm i mem0ai

2. API Key Setup

For the cloud offering, sign in to Mem0 Platform to obtain your API Key.

3. Client Features

Cloud Offering

The cloud version provides a comprehensive set of features, including:

  • Memory Operations: Perform CRUD operations on memories.
  • Search Capabilities: Search for relevant memories using advanced filters.
  • Memory History: Track changes to memories over time.
  • Error Handling: Robust error handling for API-related issues.
  • Async/Await Support: All methods return promises for easy integration.

Open-Source Offering

The open-source version includes the following top features:

  • Memory Management: Add, update, delete, and retrieve memories.
  • Vector Store Integration: Supports various vector store providers for efficient memory retrieval.
  • LLM Support: Integrates with multiple LLM providers for generating responses.
  • Customizable Configuration: Easily configure memory settings and providers.
  • SQLite Storage: Use SQLite for memory history management.

4. Memory Operations

Mem0 provides a simple and customizable interface for performing memory operations. You can create long-term and short-term memories, search for relevant memories, and manage memory history.

5. Error Handling

The MemoryClient throws errors for any API-related issues. You can catch and handle these errors effectively.

6. Using with async/await

All methods of the MemoryClient return promises, allowing for seamless integration with async/await syntax.

7. Testing the Client

To test the MemoryClient in a Node.js environment, you can create a simple script to verify the functionality of memory operations.

Getting Help

If you have any questions or need assistance, please reach out to us: