diff --git a/README.md b/README.md index fa0d1e330..b177e170c 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ mem0 add "I am using mem0" mem0 search "am I using mem0" ``` -The human owner can claim the account later with `mem0 init --email ` — same key, memories preserved. +The human owner can claim the account later with `mem0 init --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 | |---|---------|-------------------|----------------| diff --git a/docs/docs.json b/docs/docs.json index e3644a7ae..30acad425 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -40,6 +40,7 @@ "icon": "rocket", "pages": [ "platform/overview", + "platform/agent-signup", "vibecoding", "platform/mem0-mcp", "platform/cli", diff --git a/docs/introduction.mdx b/docs/introduction.mdx index 93eae24bc..cf9912484 100644 --- a/docs/introduction.mdx +++ b/docs/introduction.mdx @@ -157,27 +157,27 @@ mode: "custom" CLI thumbnail CLI thumbnail

- CLI + Sign up as an agent

- Manage memories directly from your terminal. Built for developers and AI agents. + For AI agents: mint a Mem0 API key in under five seconds — no email, no dashboard. Four commands to your first memory.

diff --git a/docs/platform/agent-signup.mdx b/docs/platform/agent-signup.mdx new file mode 100644 index 000000000..880f9c7ec --- /dev/null +++ b/docs/platform/agent-signup.mdx @@ -0,0 +1,106 @@ +--- +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, 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 + + +```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" +``` + + +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. + + +**Forgot `--agent-caller` on init?** Run `mem0 identify ` after the fact — same key, just back-fills the attribution. Idempotent. + + +## 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 + + + +Full command-by-command reference for `mem0 add`, `mem0 search`, `mem0 list`, and the rest. + + + +How `add`, `search`, `update`, and `delete` work under the hood. + + + +Connect agents to Mem0 via the Model Context Protocol — alternative integration path. + + + +The full Mem0 Platform feature set once you claim your account. + + diff --git a/docs/platform/cli.mdx b/docs/platform/cli.mdx index 008566190..39622bbdb 100644 --- a/docs/platform/cli.mdx +++ b/docs/platform/cli.mdx @@ -25,51 +25,11 @@ pip install mem0-cli ``` -## Sign up as an agent - -AI agents (Claude Code, Cursor, Codex, …) can mint a working Mem0 API key in under five seconds — no email, no dashboard, no OTP. Four commands end-to-end: - - -```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. Add a memory -mem0 add "I am using mem0" - -# 4. Search -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. 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 — same API key, memories preserved: - -```bash -mem0 init --email you@yourcompany.com -``` - -**Forgot `--agent-caller`?** Run `mem0 identify ` after init — same key, back-fills the attribution. Idempotent. +**Looking for Agent Mode signup?** See [Sign up as an agent](/platform/agent-signup) — install, signup, first memory in four commands. -## Authentication (humans) +## Authentication Run the interactive setup wizard to configure your API key: @@ -123,7 +83,6 @@ Interactive setup wizard. Prompts for your API key and default user ID. mem0 init mem0 init --api-key m0-xxx --user-id alice mem0 init --email alice@company.com -mem0 init --agent --agent-caller claude-code # zero-friction signup for AI agents ``` If an existing configuration is detected, the CLI will ask for confirmation before overwriting. Use `--force` to skip the prompt (useful in CI/CD pipelines). @@ -136,24 +95,13 @@ mem0 init --api-key m0-xxx --user-id alice --force |------|-------------| | `--api-key` | API key (skip prompt) | | `-u, --user-id` | Default user ID (skip prompt) | -| `--email` | Login via email verification code (also used to claim an Agent Mode key) | +| `--email` | Login via email verification code | | `--code` | Verification code (use with `--email` for non-interactive login) | -| `--agent` | Bootstrap an Agent Mode account — no email, no dashboard | -| `--agent-caller` | Self-declared agent identity for Agent Mode signups (e.g. `claude-code`, `cursor`) | -| `--source` | Channel attribution for analytics (e.g. `github`, `hn`, `ph`) | | `--force` | Overwrite existing config without confirmation | -### `mem0 identify` - -Tag your active Agent Mode key with the AI agent that's using it. Run this once after `mem0 init --agent` if you didn't pass `--agent-caller` on init. Idempotent — re-running just overwrites the value. - -```bash -mem0 identify claude-code -mem0 identify cursor -mem0 identify my-custom-bot -``` - -The CLI calls `PATCH /api/v1/auth/agent_mode/caller/` against the active key. Only works on unclaimed Agent Mode keys; the backend rejects with 400 otherwise. Agent names are sanitized server-side (lowercased, restricted to `[a-z0-9._/-]`, truncated to 32 chars). + +AI agents should use `mem0 init --agent` — see [Sign up as an agent](/platform/agent-signup). + ### `mem0 add` diff --git a/docs/platform/quickstart.mdx b/docs/platform/quickstart.mdx index 9c22d6c0b..67628d842 100644 --- a/docs/platform/quickstart.mdx +++ b/docs/platform/quickstart.mdx @@ -7,41 +7,9 @@ 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. -## Sign up as an agent - -AI agents (Claude Code, Cursor, Codex, …) can mint a working Mem0 API key in under five seconds — no email, no dashboard, no OTP. Four commands end-to-end: - - -```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. Add a memory -mem0 add "I am using mem0" - -# 4. Search -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. 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 you@yourcompany.com` — same key, memories preserved. See [CLI docs](/platform/cli) for the full reference. + +**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. + ## Prerequisites