Signing in
Signing in connects this machine to your shmem account. Memory stays on the machine, where it's still what answers; the account keeps a private copy, and every machine signed in to it stays in sync. With no LLM on the machine, shmem ask answers through the server's QA.
Sign in
shmem login
Opening your browser to sign in to shmem.secondmoment.ai.
If it didn't open: https://shmem.secondmoment.ai/auth/…
No account yet? shmem.secondmoment.ai is invite-only
for now. Request access: https://secondmoment.ai/shmem
Waiting for you to finish in the browser…
✓ signed in as you@example.com
This machine has 9,412 memories in 3 projects from before it synced with this account. Some may be past agent sessions shmem install imported.
1. default (memory saved outside a project) 8,950
2. acme-app 462
3. old-job 310
Choose which projects sync with your account on shmem.secondmoment.ai. A project that syncs uploads its memory and keeps syncing, so your other machines get it. One that doesn't stays on this machine only: nothing in it uploads, now or later. Projects you start using later sync.
a all of them sync
n none sync; keep them all on this machine
p pick the projects that sync
Sync? [a/N/p]: p
Projects that sync (numbers or names, separated by commas): 1, 2
✓ uploaded 9,412 memories from this machine
· kept on this machine only: old-job (310 memories). To sync one later: shmem admin project sync <name>
· nothing from the last 30 days; looking for older memories in the background. shmem status shows when it's done
Your memory now lives in your account as well as on this machine.
It's private to you, and it stays in sync from here on.
On another machine: install shmem, then shmem login.
In the Claude app: add the connector
https://shmem.secondmoment.ai/mcp
The lines about access and the Claude app come from the server, so a self-hosted server shows its own (or none). Check where you stand any time with shmem status:
Account: you@example.com on shmem.secondmoment.ai
synced 2 min ago
Running shmem login again while signed in just says so; shmem login --switch-account signs in as someone else.
Agents sign in the same way, through the login tool on shmem's local MCP server: ask yours to "sign me in to shmem", and it relays the link and waits for you to finish.
A new machine
Install shmem, then sign in with the same email:
curl -fsSL https://shmem.secondmoment.ai/docs/install.sh | sh
shmem login
✓ signed in as you@example.com
✓ downloaded 2,140 memories from the last 30 days, from your-laptop
· downloading older memories in the background; shmem status shows when it's done
Ready: shmem ask "what was I working on last week?"
The last 30 days arrive first, so shmem ask works within seconds; the rest of the account's history then downloads in the background, and shmem status shows older memories: downloading until it finishes. Or tell the new machine's agent: "set up shmem, I already use it on my laptop".
Signing in over SSH, or with no browser
Over SSH (or with --no-browser, or on Linux with no display), shmem doesn't open a browser. It prints a link to open on any computer; after you sign in there, the page shows a sign-in code with a Copy button. Paste it back into the terminal:
$ shmem login
(SSH session detected, so no browser is opened)
Open this link in a browser on any computer to sign in to shmem.secondmoment.ai:
https://shmem.secondmoment.ai/auth/…
Then paste the sign-in code it shows you.
Code: shm1.…
✓ signed in as you@example.com
The code works only on the machine that started the sign-in, once, for 10 minutes. An agent asks you for the code and passes it to the login tool.
A server without that page (an older or minimal self-hosted one) can't sign in a machine no browser can reach: sign in on one that has a browser, or use a token from the server's operator (shmem login --remote <url> --token <token>).
Other servers
shmem login signs in to the server this machine already syncs with; on a machine that has never signed in, it uses SHMEM_LOGIN_SERVER if set (for installers that point a company's machines at its own server), and the hosted server otherwise. --remote picks any other:
shmem login --remote https://memory.example.com
Moving a machine that already syncs with one server to another asks first, and then asks which projects sync there, as on a first sign-in; --switch-server answers yes. A server without sign-in needs a token from its operator: shmem login --remote https://memory.example.com/mcp --token sk-... (see Reference).
Signing out, and deletes
shmem logout signs this machine out. Its memory stays here and keeps saving; it just stops syncing, and anything not yet uploaded uploads if you sign in again. If the server ends the session (it expired, or your access was removed), shmem says signed out of <server> and keeps answering from this machine until you run shmem login again.
Deleting a memory (shmem delete, or an agent's delete_memory) removes it from your account, and your other signed-in machines drop their copies on their next sync.
Clients
Every machine with shmem installed uses local shmem, signed in with shmem login: capture hooks save every turn, and the agents' shmem MCP server is the local one. Surfaces without a local install reach the account directly:
| Client | How it reaches your account | Capture |
|---|---|---|
| Claude Code, Codex, Antigravity, OpenCode (shmem installed) | Local shmem, signed in with shmem login |
Guaranteed (every turn, by hooks) |
| Claude app (web, desktop, mobile), Cowork | The shmem connector | Model-dependent: what the model saves |
| Claude Code without shmem installed | claude mcp add --transport http shmem https://shmem.secondmoment.ai/mcp (OAuth) |
Model-dependent |
| ChatGPT | Developer Mode → add an MCP server with the URL | Model-dependent |
On a machine where shmem is installed and signed in, a claude.ai shmem connector is turned off in Claude Code automatically, since local shmem covers the same account. See The Claude app.
Without hooks, capture relies on the model saving what matters. The hosted server's instructions ask it to; for a client that ignores server instructions, add something like this to its system prompt:
When the user shares important decisions, preferences, or context that would be
useful in future conversations, use add_memory — one self-contained fact per
call, never several packed into one paragraph. Use ask_memory at the start of
conversations to check for relevant context.