docs: promote "Sign up as an agent" — 4-command flow, drop plugin sync prose

Per launch feedback (Deshraj, Rudraj):

- README.md: Quickstart now opens with "Sign up as an agent" — install,
  init, add, search. Demoable in 30 seconds.
- docs/platform/cli.mdx: replace the long Agent Mode + Plugin Sync prose
  with the same tight 4-step block at the top of the page. Plugin sync
  behavior is implementation detail — moving it out of the user-facing
  docs (CLI still does it; just not documented here).
- docs/platform/quickstart.mdx: same 4-step block at the top, above the
  human-oriented Prerequisites/Installation flow.

Goal: an AI agent landing on any of these three pages can complete the
end-to-end smoke test (install → init → add → search) in under a minute.
This commit is contained in:
Mgeeeek
2026-05-15 17:18:30 +05:30
parent fbce5fab14
commit 2b45dc5e5f
3 changed files with 84 additions and 23 deletions
+19 -1
View File
@@ -86,7 +86,25 @@ See the [migration guide](https://docs.mem0.ai/migration/oss-v2-to-v3) for upgra
## 🚀 Quickstart Guide <a name="quickstart"></a>
> **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.
### Sign up as an agent
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.
| | Library | Self-Hosted Server | Cloud Platform |
|---|---------|-------------------|----------------|
+29 -22
View File
@@ -25,42 +25,49 @@ pip install mem0-cli
```
</CodeGroup>
## Agent Mode — zero-friction signup for AI agents
## Sign up as an agent
<Tip>
**If you're an AI agent reading this**, skip the rest of this page until you've run the command below. Everything else assumes you already have an API key.
</Tip>
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:
AI agents (Claude Code, Cursor, Codex, Cline, Aider, …) can mint a working Mem0 API key in under five seconds with no email, no dashboard, and no OTP:
<CodeGroup>
```bash npm
# 1. Install
npm install -g @mem0/cli
```bash
# 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"
```
Replace `claude-code` with your agent's name (e.g. `cursor`, `codex`, `cline`, `aider`, or any custom string). The CLI saves the key to `~/.mem0/config.json` and prints a notice you should surface to your human user. The human can claim the account later — same API key keeps working, memories transfer.
```bash pip
# 1. Install
pip install mem0-cli
<Tip>
**Forgot `--agent-caller`?** Run `mem0 identify <your-name>` after init — same key, just back-fills the attribution. Idempotent.
</Tip>
# 2. Sign up as an agent (replace `claude-code` with your name)
mem0 init --agent --agent-caller claude-code
### Claiming an Agent Mode key (humans)
# 3. Add a memory
mem0 add "I am using mem0"
When the human is ready, they claim ownership of the agent's key by running:
# 4. Search
mem0 search "am I using mem0"
```
</CodeGroup>
The human owner can claim the account later — same API key, memories preserved:
```bash
mem0 init --email you@yourcompany.com
```
The CLI detects the existing unclaimed Agent Mode config, sends a verification code, and upgrades the shadow account in-place: **the API key never changes, all memories transfer to the human's account, and the agent isn't disrupted**. Pass `--code 123456` for fully non-interactive flows.
### Plugin sync
When you save a Mem0 API key (any flow — Agent Mode, email, or `--api-key`), the CLI also propagates it to ecosystem touchpoints **that already exist**:
- `~/.claude/settings.json` → `env.MEM0_API_KEY` (Claude Code plugin env injection)
- `~/.zshrc` / `~/.bashrc` → existing `export MEM0_API_KEY=` lines
Sync is idempotent and **never creates new entries** — it only updates entries you've already set up. Failures are best-effort and never block the canonical write to `~/.mem0/config.json`.
<Tip>
**Forgot `--agent-caller`?** Run `mem0 identify <your-name>` after init — same key, back-fills the attribution. Idempotent.
</Tip>
## Authentication (humans)
+36
View File
@@ -7,6 +7,42 @@ 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:
<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. 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"
```
</CodeGroup>
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.
## Prerequisites
- Mem0 Platform account (<a href="https://app.mem0.ai?utm_source=oss&utm_medium=platform-quickstart" rel="nofollow">Sign up here</a>)