Files
mem0/mem0-ts
Soumil Rathi 59880a6f8f feat: TS SDK v3 port, graph store removal, client v3 API migration
TypeScript SDK v3 pipeline (full parity with Python):
- Single-pass additive extraction with ADDITIVE_EXTRACTION_PROMPT
- Hybrid search (semantic + BM25 + entity boost) with additive scoring
- 8-phase batch pipeline (batch embed, persist, entity linking)
- New utils: scoring.ts, lemmatization.ts (natural), entity_extraction.ts (compromise)
- keywordSearch() on 8 vector stores (3 full: PGVector, Memory, Azure AI Search)
- Message persistence in SQLiteManager (rolling window of 10)
- Entity store as second vector collection
- MAX_BATCH=100 chunking guard on OpenAI/Azure embedBatch
- Updated default LLM model to gpt-4.1-nano-2025-04-14
- compromise + natural added as peer dependencies

Graph store removal (Python + TypeScript):
- Removed Neo4j, Memgraph, Kuzu, Neptune, Apache AGE integrations
- Deleted 18 graph-related files across both SDKs
- Removed GraphStoreFactory, GraphStoreConfig, graph_store config field
- Removed "relations" key from all API responses
- Removed graph optional dependency group from pyproject.toml
- Removed neo4j-driver from TS peerDependencies
- Simplified add/search/delete/reset (no more parallel graph operations)

Client SDK v3 API migration:
- add() endpoint: /v1/memories/ -> /v3/memories/ (async response)
- search() endpoint: /v2/memories/search/ -> /v3/memories/search/
- Removed output_format injection and v1.1 unwrapping logic
- Applied to both Python (sync + async) and TypeScript clients

Review feedback fixes:
- Removed deprecated custom_update_memory_prompt from MemoryConfig
- Added MAX_BATCH=100 chunking to Python + TS embed_batch
- Moved all inline imports to top level in main.py
- Cleaned up GraphStoreError dead code from exceptions.py

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 10:45:40 -07:00
..
2025-02-27 15:19:17 -08:00
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: