Compare commits

..
Author SHA1 Message Date
Mgeeeek e975025747 chore: touch pyproject.toml to fire Python SDK CI for plugin-only PR
Plugin paths are filtered out of every CI workflow. Same path-filter
trap and same workaround as #5094.
2026-05-15 02:26:17 +05:30
Mgeeeek 767795d5de chore(plugin): bump to v0.1.3 + add CHANGELOG
Version bump to ship the user_id revert. Adds the missing CHANGELOG
file for the plugin and back-fills 0.1.2 (which went undocumented)
so users upgrading have a clear "what changed and how to recover
stranded memories" entry.
2026-05-15 02:09:46 +05:30
Mgeeeek d7e2a0e7b0 fix(plugin): drop API-key-derived user_id, restore $USER fallback
The deterministic resolver from #5076 silently rebucketed every user
who hadn't set MEM0_USER_ID. With MEM0_API_KEY present (the normal
case — hooks early-exit without it), the resolver picked
"mem0-<sha256(api_key)[:12]>" instead of $USER, so an existing
"deshraj" bucket suddenly became "mem0-f34dd1cba657" on update with
no migration. The old memories aren't reachable from the plugin
anymore, and the user gets a fresh empty bucket without warning.

Resolution priority is now back to:
  1. MEM0_USER_ID env var
  2. \$USER, else "default"

The ~/.mem0/identity.json cache is no longer written or read; any
existing cache file becomes inert. Users on multiple machines who
want a single bucket can still set MEM0_USER_ID explicitly — that's
the supported path, not silent derivation.

Also dropped the "regardless of which machine you're on" line from
the session bootstrap header since it no longer applies.
2026-05-15 01:54:34 +05:30
18 changed files with 19 additions and 237 deletions
+1 -20
View File
@@ -86,25 +86,7 @@ See the [migration guide](https://docs.mem0.ai/migration/oss-v2-to-v3) for upgra
## 🚀 Quickstart Guide <a name="quickstart"></a> ## 🚀 Quickstart Guide <a name="quickstart"></a>
### Sign up as an agent > **Agent Mode — for AI agents setting up Mem0 autonomously.** Run `mem0 init --agent --agent-caller <your-name> --json` (after `pip install mem0-cli` or `npm install -g @mem0/cli`), replacing `<your-name>` with your AI agent identity (e.g. `claude-code`, `cursor`, `codex`). This mints an evaluation Mem0 API key in <5 seconds — no email, no dashboard, no OTP. If you forgot to pass `--agent-caller`, run `mem0 identify <your-name>` after init. Use the key immediately against the Platform or the MCP server. The human owner can claim ownership later with `mem0 init --email <their-email>`: memories transfer, the same key keeps working, and the agent isn't disrupted.
AI agents can mint a working Mem0 API key in under five seconds — no email, no dashboard, no OTP. Four commands end-to-end:
```bash
# 1. Install
npm install -g @mem0/cli # or: pip install mem0-cli
# 2. Sign up as an agent (replace `claude-code` with your name)
mem0 init --agent --agent-caller claude-code
# 3. Add a memory
mem0 add "I am using mem0"
# 4. Search
mem0 search "am I using mem0"
```
The human owner can claim the account later with `mem0 init --email <their-email>` — same key, memories preserved. Full guide: [Sign up as an agent](https://docs.mem0.ai/platform/agent-signup).
| | Library | Self-Hosted Server | Cloud Platform | | | Library | Self-Hosted Server | Cloud Platform |
|---|---------|-------------------|----------------| |---|---------|-------------------|----------------|
@@ -153,7 +135,6 @@ See the [self-hosted docs](https://docs.mem0.ai/open-source/overview) for config
1. Sign up on [Mem0 Platform](https://app.mem0.ai?utm_source=oss&utm_medium=readme) 1. Sign up on [Mem0 Platform](https://app.mem0.ai?utm_source=oss&utm_medium=readme)
2. Embed the memory layer via SDK or API keys 2. Embed the memory layer via SDK or API keys
3. Using hosted Qdrant vectors? See the [Platform migration guide](https://docs.mem0.ai/migration/oss-to-platform) to import them into Mem0 Platform.
### CLI ### CLI
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@mem0/cli", "name": "@mem0/cli",
"version": "0.2.6", "version": "0.2.5",
"description": "The official CLI for mem0 — the memory layer for AI agents", "description": "The official CLI for mem0 — the memory layer for AI agents",
"type": "module", "type": "module",
"bin": { "bin": {
+1 -1
View File
@@ -247,7 +247,7 @@ export async function claimViaOtp(
printError(`Claim failed: ${detail}`); printError(`Claim failed: ${detail}`);
if (errCode === "email_already_claimed") { if (errCode === "email_already_claimed") {
console.log( console.log(
` ${dim("Tip: this email already has a Mem0 account. Sign in at app.mem0.ai with your existing credentials.")}`, ` ${dim("Tip: this email already has a Mem0 account. Sign in there and run `mem0 link <key>` to attach this agent.")}`,
); );
} }
process.exit(1); process.exit(1);
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "mem0-cli" name = "mem0-cli"
version = "0.2.6" version = "0.2.5"
description = "The official CLI for mem0 — the memory layer for AI agents" description = "The official CLI for mem0 — the memory layer for AI agents"
readme = "README.md" readme = "README.md"
license = "Apache-2.0" license = "Apache-2.0"
@@ -218,7 +218,7 @@ def claim_via_otp(config: Mem0Config, *, email: str, code: str | None = None) ->
print_error(err_console, f"Claim failed: {detail}") print_error(err_console, f"Claim failed: {detail}")
if code_str == "email_already_claimed": if code_str == "email_already_claimed":
console.print( console.print(
f" [{DIM_COLOR}]Tip: this email already has a Mem0 account. Sign in at app.mem0.ai with your existing credentials.[/]" f" [{DIM_COLOR}]Tip: this email already has a Mem0 account. Sign in there and run `mem0 link <key>` to attach this agent.[/]"
) )
raise typer.Exit(1) raise typer.Exit(1)
+1 -8
View File
@@ -1323,17 +1323,10 @@ See the [TypeScript SDK migration guide](https://docs.mem0.ai/migration/ts-v2-to
<Tab title="CLI"> <Tab title="CLI">
<Update label="2026-05-16" description="Python v0.2.6 / Node v0.2.6">
**Bug Fixes:**
- **Claim flow error message:** The `email_already_claimed` tip in `mem0 init --email` previously suggested running `mem0 link <key>` — a command that doesn't exist. Replaced with honest copy pointing the user to sign in at app.mem0.ai with their existing credentials ([#5152](https://github.com/mem0ai/mem0/pull/5152))
</Update>
<Update label="2026-05-14" description="Python v0.2.5 / Node v0.2.5"> <Update label="2026-05-14" description="Python v0.2.5 / Node v0.2.5">
**New Features:** **New Features:**
- **Agent Mode (`mem0 init --agent`):** Zero-friction signup for AI agents — mints a working Mem0 API key in under 5 seconds with no email, no dashboard, no OTP. Returns an unclaimed shadow account the human can later claim with `mem0 init --email <their-email>` (memories preserved, same key keeps working) ([#5123](https://github.com/mem0ai/mem0/pull/5123)) - **Agent Mode (`mem0 init --agent`):** Zero-friction signup for AI agents — mints a working Mem0 API key in <5s with no email, no dashboard, no OTP. Returns an unclaimed shadow account the human can later claim with `mem0 init --email <their-email>` (memories preserved, same key keeps working) ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **Self-declared agent identity:** Agents pass `--agent-caller <name>` (e.g. `claude-code`, `cursor`, `codex`) on `mem0 init --agent` so signups attribute to the right tool in analytics. Proof Editor-style — the agent declares itself rather than the CLI sniffing it from env vars ([#5123](https://github.com/mem0ai/mem0/pull/5123)) - **Self-declared agent identity:** Agents pass `--agent-caller <name>` (e.g. `claude-code`, `cursor`, `codex`) on `mem0 init --agent` so signups attribute to the right tool in analytics. Proof Editor-style — the agent declares itself rather than the CLI sniffing it from env vars ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **`mem0 identify <name>`:** New subcommand to self-tag an Agent Mode key after the fact when the agent forgot to pass `--agent-caller` on init. Idempotent — re-running just overwrites ([#5123](https://github.com/mem0ai/mem0/pull/5123)) - **`mem0 identify <name>`:** New subcommand to self-tag an Agent Mode key after the fact when the agent forgot to pass `--agent-caller` on init. Idempotent — re-running just overwrites ([#5123](https://github.com/mem0ai/mem0/pull/5123))
- **Plugin sync:** `~/.claude/settings.json::env::MEM0_API_KEY` and `~/.zshrc`/`.bashrc` `export MEM0_API_KEY=` lines stay in sync with `~/.mem0/config.json` automatically. Idempotent — only updates EXISTING entries, never creates new ones ([#5123](https://github.com/mem0ai/mem0/pull/5123)) - **Plugin sync:** `~/.claude/settings.json::env::MEM0_API_KEY` and `~/.zshrc`/`.bashrc` `export MEM0_API_KEY=` lines stay in sync with `~/.mem0/config.json` automatically. Idempotent — only updates EXISTING entries, never creates new ones ([#5123](https://github.com/mem0ai/mem0/pull/5123))
-1
View File
@@ -40,7 +40,6 @@
"icon": "rocket", "icon": "rocket",
"pages": [ "pages": [
"platform/overview", "platform/overview",
"platform/agent-signup",
"vibecoding", "vibecoding",
"platform/mem0-mcp", "platform/mem0-mcp",
"platform/cli", "platform/cli",
+5 -5
View File
@@ -157,27 +157,27 @@ mode: "custom"
</a> </a>
<a <a
href="/platform/agent-signup" href="/platform/cli"
className="group flex h-full flex-col overflow-hidden rounded-2xl border border-gray-200 dark:border-zinc-800/40 bg-white dark:bg-zinc-900/40 transition hover:border-primary/60 hover:bg-gray-50 dark:hover:bg-zinc-900" className="group flex h-full flex-col overflow-hidden rounded-2xl border border-gray-200 dark:border-zinc-800/40 bg-white dark:bg-zinc-900/40 transition hover:border-primary/60 hover:bg-gray-50 dark:hover:bg-zinc-900"
> >
<img <img
className="block dark:hidden aspect-[2/1] w-full object-cover" className="block dark:hidden aspect-[2/1] w-full object-cover"
src="/images/docs thumbnails/light/CLI.png" src="/images/docs thumbnails/light/CLI.png"
alt="Sign up as an agent thumbnail" alt="CLI thumbnail"
style={{pointerEvents: "none"}} style={{pointerEvents: "none"}}
/> />
<img <img
className="hidden dark:block aspect-[2/1] w-full object-cover" className="hidden dark:block aspect-[2/1] w-full object-cover"
src="/images/docs thumbnails/dark/CLI.png" src="/images/docs thumbnails/dark/CLI.png"
alt="Sign up as an agent thumbnail" alt="CLI thumbnail"
style={{pointerEvents: "none"}} style={{pointerEvents: "none"}}
/> />
<div className="flex flex-1 flex-col gap-2 px-4 pb-4 pt-3 text-left"> <div className="flex flex-1 flex-col gap-2 px-4 pb-4 pt-3 text-left">
<h3 className="text-base font-semibold text-gray-900 dark:text-zinc-100 group-hover:text-primary"> <h3 className="text-base font-semibold text-gray-900 dark:text-zinc-100 group-hover:text-primary">
Sign up as an agent CLI
</h3> </h3>
<p className="text-sm text-gray-600 dark:text-zinc-400"> <p className="text-sm text-gray-600 dark:text-zinc-400">
For AI agents: mint a Mem0 API key in under five seconds — no email, no dashboard. Four commands to your first memory. Manage memories directly from your terminal. Built for developers and AI agents.
</p> </p>
</div> </div>
</a> </a>
-1
View File
@@ -159,7 +159,6 @@ If the user is on a pre-current major (Python < 2, TS < 3, or Platform `output_f
- [Introduction](https://docs.mem0.ai/introduction) [Both]: Use when the user wants a one-page overview of how memory fits between the LLM and the app. - [Introduction](https://docs.mem0.ai/introduction) [Both]: Use when the user wants a one-page overview of how memory fits between the LLM and the app.
- [Vibe Code with Mem0](https://docs.mem0.ai/vibecoding) [Both]: Use when the user is in Claude Code, Cursor, or Windsurf and wants memory wired into their editor. - [Vibe Code with Mem0](https://docs.mem0.ai/vibecoding) [Both]: Use when the user is in Claude Code, Cursor, or Windsurf and wants memory wired into their editor.
- [Platform Overview](https://docs.mem0.ai/platform/overview) [Platform]: Use when the user picks the managed product - 4-line integration, sub-50ms retrieval, dashboard. - [Platform Overview](https://docs.mem0.ai/platform/overview) [Platform]: Use when the user picks the managed product - 4-line integration, sub-50ms retrieval, dashboard.
- [Sign up as an agent](https://docs.mem0.ai/platform/agent-signup) [Platform]: Use when an AI agent needs to mint a Mem0 API key autonomously - four commands, no email or dashboard, human claims ownership later.
- [Platform vs Open Source](https://docs.mem0.ai/platform/platform-vs-oss) [Both]: Use when the user is deciding between managed and self-hosted. - [Platform vs Open Source](https://docs.mem0.ai/platform/platform-vs-oss) [Both]: Use when the user is deciding between managed and self-hosted.
- [Platform Quickstart](https://docs.mem0.ai/platform/quickstart) [Platform]: Use for the first Platform integration - API key plus `MemoryClient.add/search`. - [Platform Quickstart](https://docs.mem0.ai/platform/quickstart) [Platform]: Use for the first Platform integration - API key plus `MemoryClient.add/search`.
- [Platform CLI](https://docs.mem0.ai/platform/cli) [Platform]: Use when the user wants to manage Platform memories from the terminal. - [Platform CLI](https://docs.mem0.ai/platform/cli) [Platform]: Use when the user wants to manage Platform memories from the terminal.
+4 -22
View File
@@ -14,15 +14,11 @@ Move your Mem0 implementation to managed infrastructure with enterprise features
| --------------------- | -------------- | ---------------------------- | | --------------------- | -------------- | ---------------------------- |
| Infrastructure & Code | Low (~30 mins) | None (Parallel run possible) | | Infrastructure & Code | Low (~30 mins) | None (Parallel run possible) |
<Info>
Using Mem0 Open Source with **hosted Qdrant**? You can migrate your existing memories to Mem0 Platform with a one-line script below.
</Info>
<Info> <Info>
**Why migrate to Platform?** **Why migrate to Platform?**
- **Time to Market**: Set up in 5 minutes vs 30+ minutes for OSS configuration - **Time to Market**: Set up in 5 minutes vs 30+ minutes for OSS configuration
- **Enterprise Ready**: Audit logs, workspace governance, and dedicated support - **Enterprise Ready**: SOC2 Type II compliance, GDPR support, audit logs
- **Advanced Features**: Webhooks, memory export, analytics dashboard, custom categories - **Advanced Features**: Webhooks, memory export, analytics dashboard, custom categories
- **Multi-tenancy**: Organizations, projects, and team management out of the box - **Multi-tenancy**: Organizations, projects, and team management out of the box
- **Zero Infrastructure**: No vector database, LLM provider, or maintenance overhead - **Zero Infrastructure**: No vector database, LLM provider, or maintenance overhead
@@ -38,21 +34,7 @@ Move your Mem0 implementation to managed infrastructure with enterprise features
## Migrate ## Migrate
### 1. Import Memories Into Platform ### 1. Install or Update SDK
If your Mem0 Open Source setup uses **hosted Qdrant** as the vector store, you can import your existing memories to Mem0 Platform with one command:
```bash
curl -fsSL https://raw.githubusercontent.com/mem0ai/mem0/main/scripts/oss-to-platform-migrate.sh | bash
```
<Note>
This migration script currently supports **hosted Qdrant only**. Support for local Qdrant, pgvector, and other vector stores is coming soon.
</Note>
If you are using a different vector store and want to migrate to Platform, please contact Mem0 support and we’ll send you a custom migration script for your setup.
### 2. Install or Update SDK
Ensure you have the latest version of the SDK, which supports both OSS and Platform clients. Ensure you have the latest version of the SDK, which supports both OSS and Platform clients.
@@ -60,7 +42,7 @@ Ensure you have the latest version of the SDK, which supports both OSS and Platf
pip install mem0ai --upgrade pip install mem0ai --upgrade
``` ```
### 3. Update Initialization ### 2. Update Initialization
Switch from the local `Memory` class to the managed `MemoryClient`. Switch from the local `Memory` class to the managed `MemoryClient`.
@@ -93,7 +75,7 @@ client = MemoryClient(api_key="m0-...")
Run `client.get_all(filters={"user_id": "test_connection"})` to verify your API key works. It should return an empty list or valid results. Run `client.get_all(filters={"user_id": "test_connection"})` to verify your API key works. It should return an empty list or valid results.
</Info> </Info>
### 4. Update Retrieval Calls (Critical) ### 3. Update Retrieval Calls (Critical)
<Warning> <Warning>
**Critical Change**: Platform uses v2 endpoints that require filtering parameters to be nested inside a `filters` dictionary. **Critical Change**: Platform uses v2 endpoints that require filtering parameters to be nested inside a `filters` dictionary.
-106
View File
@@ -1,106 +0,0 @@
---
title: Sign up as an agent
description: "Zero-friction signup for AI agents — mint a working Mem0 API key in under five seconds. No email, no dashboard, no OTP."
icon: "robot"
iconType: "solid"
---
If you're an AI agent (Claude Code, Cursor, Codex, Cline, Aider, Windsurf, or any other autonomous coding tool), you don't need a human to set up Mem0 for you. Four commands — install, sign up, push a memory, search it — and you have persistent memory.
## The 4-command demo
<CodeGroup>
```bash npm
# 1. Install
npm install -g @mem0/cli
# 2. Sign up as an agent (replace `claude-code` with your name)
mem0 init --agent --agent-caller claude-code
# 3. Push a memory
mem0 add "I am using mem0"
# 4. Verify
mem0 search "am I using mem0"
```
```bash pip
# 1. Install
pip install mem0-cli
# 2. Sign up as an agent (replace `claude-code` with your name)
mem0 init --agent --agent-caller claude-code
# 3. Push a memory
mem0 add "I am using mem0"
# 4. Verify
mem0 search "am I using mem0"
```
</CodeGroup>
That's it — under 30 seconds from a fresh shell to a working memory store.
## Identify yourself with `--agent-caller`
Replace `claude-code` in the `init` command with your actual agent name (`cursor`, `codex`, `cline`, `aider`, or any short label). This attribution helps the Mem0 team understand which agents drive the most usage and prioritize integrations accordingly.
<Tip>
**Forgot `--agent-caller` on init?** Run `mem0 identify <your-name>` after the fact — same key, just back-fills the attribution. Idempotent.
</Tip>
## What happened when you ran `mem0 init --agent`?
- A **shadow account** was minted on the Mem0 backend with a fresh API key.
- The key was saved to `~/.mem0/config.json` (mode 0600) on the machine you ran the command on.
- A default `user_id` was provisioned so `mem0 add` / `mem0 search` work without explicit scope flags.
- The account is **unclaimed** — no human owns it yet.
Every command run against this key prints a one-line reminder asking you to surface the claim instructions to your human user.
## Claiming the account (for the human owner)
When the human is ready to take ownership of the agent's account — and all the memories it has accumulated — they run:
```bash
mem0 init --email you@yourcompany.com
```
The CLI detects the existing Agent Mode config, sends a verification code, and upgrades the shadow account in-place:
- **The API key never changes** — the agent isn't disrupted.
- **All memories transfer** to the human's account.
- **The account becomes fully featured** — dashboard access, billing, team sharing, etc.
Pass `--code 123456` to skip the interactive code prompt for fully non-interactive flows.
## Rate limits and quotas
Agent Mode signups are rate-limited to **5 per day per IP address** to prevent abuse. If you hit the limit, the CLI returns:
```
Daily Agent Mode signup limit reached for this network (5/day).
Try again from a different IP or after midnight UTC.
```
Unclaimed agent accounts get the standard Mem0 free-tier quotas. The human owner can upgrade after claiming.
## What's next
<CardGroup cols={2}>
<Card title="CLI Reference" icon="terminal" href="/platform/cli">
Full command-by-command reference for `mem0 add`, `mem0 search`, `mem0 list`, and the rest.
</Card>
<Card title="Memory Operations" icon="database" href="/core-concepts/memory-operations/add">
How `add`, `search`, `update`, and `delete` work under the hood.
</Card>
<Card title="Mem0 MCP" icon="plug" href="/platform/mem0-mcp">
Connect agents to Mem0 via the Model Context Protocol — alternative integration path.
</Card>
<Card title="Platform Overview" icon="star" href="/platform/overview">
The full Mem0 Platform feature set once you claim your account.
</Card>
</CardGroup>
-8
View File
@@ -25,10 +25,6 @@ pip install mem0-cli
``` ```
</CodeGroup> </CodeGroup>
<Tip>
**Looking for Agent Mode signup?** See [Sign up as an agent](/platform/agent-signup) — install, signup, first memory in four commands.
</Tip>
## Authentication ## Authentication
Run the interactive setup wizard to configure your API key: Run the interactive setup wizard to configure your API key:
@@ -99,10 +95,6 @@ mem0 init --api-key m0-xxx --user-id alice --force
| `--code` | Verification code (use with `--email` for non-interactive login) | | `--code` | Verification code (use with `--email` for non-interactive login) |
| `--force` | Overwrite existing config without confirmation | | `--force` | Overwrite existing config without confirmation |
<Note>
AI agents should use `mem0 init --agent` — see [Sign up as an agent](/platform/agent-signup).
</Note>
### `mem0 add` ### `mem0 add`
Add a memory from text, a JSON messages array, a file, or stdin. Add a memory from text, a JSON messages array, a file, or stdin.
-18
View File
@@ -142,24 +142,6 @@ iconType: "solid"
Setting this environment variable will prevent Mem0 from collecting and sending any usage data, ensuring complete privacy for your application. Setting this environment variable will prevent Mem0 from collecting and sending any usage data, ensuring complete privacy for your application.
</Accordion> </Accordion>
<Accordion title="How do I delete my Mem0 account?">
You can delete your Mem0 account at any time directly from the dashboard:
1. Sign in at [app.mem0.ai](https://app.mem0.ai).
2. Go to **Settings → Account**.
3. Click **Delete account** and confirm.
Deletion is immediate and irreversible. The following is removed:
- Your user profile and login credentials
- All memories, agents, and runs you created
- API keys and access tokens issued to your account
- Organizations you solely own, along with their data
- Your membership in any shared organizations (the orgs themselves are not affected)
Any application still using your old API keys will start receiving `401 Unauthorized` responses immediately. If you'd like to use Mem0 again later, you can create a new account at any time — it will start fresh with no data carried over.
</Accordion>
</AccordionGroup> </AccordionGroup>
+2 -2
View File
@@ -12,7 +12,7 @@ Mem0 is the memory engine that keeps conversations contextual so users never rep
- **Personalized replies**: Memories persist across users and agents, cutting prompt bloat and repeat questions. - **Personalized replies**: Memories persist across users and agents, cutting prompt bloat and repeat questions.
- **Hosted stack**: Mem0 runs the vector store, graph services, and rerankers—no provisioning, tuning, or maintenance. - **Hosted stack**: Mem0 runs the vector store, graph services, and rerankers—no provisioning, tuning, or maintenance.
- **Enterprise controls**: Audit logs and workspace governance ship by default for production readiness. - **Enterprise controls**: SOC 2, audit logs, and workspace governance ship by default for production readiness.
<AccordionGroup> <AccordionGroup>
<Accordion title="What you get with Mem0 Platform" icon="sparkles"> <Accordion title="What you get with Mem0 Platform" icon="sparkles">
@@ -22,7 +22,7 @@ Mem0 is the memory engine that keeps conversations contextual so users never rep
| Fast setup | Add a few lines of code and you’re production-ready—no vector database or LLM configuration required. | | Fast setup | Add a few lines of code and you’re production-ready—no vector database or LLM configuration required. |
| Production scale | Automatic scaling, high availability, and managed infrastructure so you focus on product work. | | Production scale | Automatic scaling, high availability, and managed infrastructure so you focus on product work. |
| Advanced features | Graph memory, webhooks, multimodal support, and custom categories are ready to enable. | | Advanced features | Graph memory, webhooks, multimodal support, and custom categories are ready to enable. |
| Enterprise ready | Audit logs, workspace governance, and dedicated support keep security and governance covered. | | Enterprise ready | SOC 2 Type II, GDPR compliance, and dedicated support keep security and governance covered. |
</Accordion> </Accordion>
</AccordionGroup> </AccordionGroup>
-4
View File
@@ -7,10 +7,6 @@ iconType: "solid"
Get started with Mem0 Platform's hosted API in under 5 minutes. This guide shows you how to authenticate and store your first memory. Get started with Mem0 Platform's hosted API in under 5 minutes. This guide shows you how to authenticate and store your first memory.
<Note>
**Are you an AI agent?** See [Sign up as an agent](/platform/agent-signup) — mint a working API key in four commands, no email or dashboard required.
</Note>
## Prerequisites ## Prerequisites
- Mem0 Platform account (<a href="https://app.mem0.ai?utm_source=oss&utm_medium=platform-quickstart" rel="nofollow">Sign up here</a>) - Mem0 Platform account (<a href="https://app.mem0.ai?utm_source=oss&utm_medium=platform-quickstart" rel="nofollow">Sign up here</a>)
-2
View File
@@ -22,7 +22,6 @@ export interface SearchMemoryOptions {
topK?: number; topK?: number;
threshold?: number; threshold?: number;
rerank?: boolean; rerank?: boolean;
latestOnly?: boolean;
fields?: string[]; fields?: string[];
categories?: string[]; categories?: string[];
} }
@@ -33,7 +32,6 @@ export interface GetAllMemoryOptions {
pageSize?: number; pageSize?: number;
startDate?: string; startDate?: string;
endDate?: string; endDate?: string;
latestOnly?: boolean;
categories?: string[]; categories?: string[];
} }
@@ -63,24 +63,6 @@ describe("MemoryClient - search()", () => {
expect(getFetchBody(call!).filters).toEqual({ user_id: "u1" }); expect(getFetchBody(call!).filters).toEqual({ user_id: "u1" });
}); });
test("serializes latestOnly as latest_only", async () => {
const extra = new Map<string, { status: number; body: unknown }>();
extra.set("/v3/memories/search/", {
status: 200,
body: { results: [] },
});
const mock = setupMockFetch(extra);
const client = new MemoryClient({ apiKey: TEST_API_KEY });
await client.search("test", {
filters: { user_id: "u1" },
latestOnly: true,
});
const call = findFetchCall(mock, "/v3/memories/search/", "POST");
expect(getFetchBody(call!).latest_only).toBe(true);
});
test("passes complex OR filters through to the API body", async () => { test("passes complex OR filters through to the API body", async () => {
const extra = new Map<string, { status: number; body: unknown }>(); const extra = new Map<string, { status: number; body: unknown }>();
extra.set("/v3/memories/search/", { extra.set("/v3/memories/search/", {
@@ -282,22 +264,4 @@ describe("MemoryClient - getAll() entity param rejection", () => {
await client.getAll({ filters: { user_id: "u1" } }); await client.getAll({ filters: { user_id: "u1" } });
expect(findFetchCall(mock, "/v3/memories/", "POST")).toBeDefined(); expect(findFetchCall(mock, "/v3/memories/", "POST")).toBeDefined();
}); });
test("serializes latestOnly as latest_only", async () => {
const extra = new Map<string, { status: number; body: unknown }>();
extra.set("/v3/memories/", {
status: 200,
body: { results: [] },
});
const mock = setupMockFetch(extra);
const client = new MemoryClient({ apiKey: TEST_API_KEY });
await client.getAll({
filters: { user_id: "u1" },
latestOnly: true,
});
const call = findFetchCall(mock, "/v3/memories/", "POST");
expect(getFetchBody(call!).latest_only).toBe(true);
});
}); });
+2
View File
@@ -4,3 +4,5 @@ __version__ = importlib.metadata.version("mem0ai")
from mem0.client.main import AsyncMemoryClient, MemoryClient # noqa from mem0.client.main import AsyncMemoryClient, MemoryClient # noqa
from mem0.memory.main import AsyncMemory, Memory # noqa from mem0.memory.main import AsyncMemory, Memory # noqa