From 2b45dc5e5fa9765787093f79408adda7e0c333e6 Mon Sep 17 00:00:00 2001 From: Mgeeeek Date: Fri, 15 May 2026 17:18:30 +0530 Subject: [PATCH] =?UTF-8?q?docs:=20promote=20"Sign=20up=20as=20an=20agent"?= =?UTF-8?q?=20=E2=80=94=204-command=20flow,=20drop=20plugin=20sync=20prose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- README.md | 20 +++++++++++++- docs/platform/cli.mdx | 51 ++++++++++++++++++++---------------- docs/platform/quickstart.mdx | 36 +++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 2de25b889..fa0d1e330 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,25 @@ See the [migration guide](https://docs.mem0.ai/migration/oss-v2-to-v3) for upgra ## 🚀 Quickstart Guide -> **Agent Mode — for AI agents setting up Mem0 autonomously.** Run `mem0 init --agent --agent-caller --json` (after `pip install mem0-cli` or `npm install -g @mem0/cli`), replacing `` 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 ` after init. Use the key immediately against the Platform or the MCP server. The human owner can claim ownership later with `mem0 init --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 ` — same key, memories preserved. | | Library | Self-Hosted Server | Cloud Platform | |---|---------|-------------------|----------------| diff --git a/docs/platform/cli.mdx b/docs/platform/cli.mdx index 75a64bb5c..008566190 100644 --- a/docs/platform/cli.mdx +++ b/docs/platform/cli.mdx @@ -25,42 +25,49 @@ pip install mem0-cli ``` -## Agent Mode — zero-friction signup for AI agents +## Sign up as an agent - -**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. - +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: + +```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 - -**Forgot `--agent-caller`?** Run `mem0 identify ` after init — same key, just back-fills the attribution. Idempotent. - +# 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" +``` + + +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`. + +**Forgot `--agent-caller`?** Run `mem0 identify ` after init — same key, back-fills the attribution. Idempotent. + ## Authentication (humans) diff --git a/docs/platform/quickstart.mdx b/docs/platform/quickstart.mdx index 1c53ad7e6..9c22d6c0b 100644 --- a/docs/platform/quickstart.mdx +++ b/docs/platform/quickstart.mdx @@ -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: + + +```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. + ## Prerequisites - Mem0 Platform account (Sign up here)