# AI use cases for Deepmem (deepmemteam/deepmem)

Repo: [deepmemteam/deepmem](https://github.com/deepmemteam/deepmem) | Use cases: 3 | Page: https://dedupedai.com/use-cases/deepmemteam-deepmem/

DeepMem is a self-hostable long-term memory server for AI agents that speaks the Mem0 API, built on FastAPI and Qdrant with LLM fact extraction, hybrid retrieval and a built-in MCP server.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Switch an app from Mem0 to DeepMem by changing one import: https://dedupedai.com/use-cases/deepmemteam-deepmem/swap-mem0-for-deepmem-one-import/
- Self-host a long-term memory server for your agents: https://dedupedai.com/use-cases/deepmemteam-deepmem/self-host-agent-memory-server/
- Store and search memories with plain HTTP calls: https://dedupedai.com/use-cases/deepmemteam-deepmem/store-and-search-memories-over-http/

## How to switch an app from Mem0 to DeepMem by changing one import with Deepmem

Repo: [deepmemteam/deepmem](https://github.com/deepmemteam/deepmem) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Install deepmem-client and change the import; add and search calls stay identical.

**Who it is for:** A developer whose agent already uses Mem0 and wants a cheaper or self-hosted backend.

**The problem:** Rewriting memory calls to change vendors is risky.

**The outcome:** The same MemoryClient calls running against DeepMem.

### Steps

1. Install with `pip install deepmem-client`
2. Replace from mem0 import MemoryClient with from Deepmem import MemoryClient
3. Set the API key or point the base URL at your own server
4. Run your existing add and search calls

### Prompt to paste into your agent

```text
In <project>, replace the Mem0 import with deepmem's MemoryClient after `pip install deepmem-client`, run one add and one search for a test user, and confirm results come back with unchanged call signatures.
```

### Caveat

add with infer=True is asynchronous, so a search immediately after an add may not see the new memory yet.

Risk, credentials: A DeepMem Cloud key (dm_live_) grants access to all stored memories, so keep it server side.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/deepmemteam-deepmem/swap-mem0-for-deepmem-one-import/

## How to self-host a long-term memory server for your agents with Deepmem

Repo: [deepmemteam/deepmem](https://github.com/deepmemteam/deepmem) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Run the open-mode server with Qdrant so agents can store and recall facts per user_id.

**Who it is for:** A developer who cannot send user conversations to a third-party memory service.

**The problem:** Agents forget users between sessions without a memory store.

**The outcome:** A private memory API with hybrid retrieval and per-user isolation.

### Steps

1. Clone the repo and copy the example env file to .env
2. Configure your LLM provider in .env
3. Start the stack and call the memories endpoint
4. Search memories for a test user_id

### Prompt to paste into your agent

```text
Self-host deepmemteam/deepmem, store a message for user <id>, then search for a fact from it. Confirm the result is scoped to that user_id only.
```

### Caveat

Open mode has no API key or user registration, so do not expose the server to the internet without your own auth in front.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/deepmemteam-deepmem/self-host-agent-memory-server/

## How to store and search memories with plain HTTP calls with Deepmem

Repo: [deepmemteam/deepmem](https://github.com/deepmemteam/deepmem) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Use curl against the memories API to add facts and query them, from any language.

**Who it is for:** A developer prototyping memory for a bot written in a language without a client library.

**The problem:** SDKs are not available for every stack.

**The outcome:** Working add and search requests you can port to any HTTP client.

### Steps

1. Get a key or run your own server
2. POST a message to /v1/memories with a user_id
3. POST a query to /v1/memories/search
4. Port the requests into your bot

### Prompt to paste into your agent

```text
Using the DeepMem HTTP API, add the message <text> for user <id> with infer false, then search <question>. Return the matched memory and confirm it belongs to that user.
```

### Caveat

The README's benchmark claims come from the project itself; reproduce them before relying on the numbers.

Risk, credentials: The bearer token in these requests authorizes reads of stored memories.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/deepmemteam-deepmem/store-and-search-memories-over-http/
