Persistent memory
for AI agents
Two API calls. Zero configuration. Ships today on npm.
npm install @withmemory/sdkimport { memory } from "@withmemory/sdk";
// Set WITHMEMORY_API_KEY in your env, or call memory.configure({ apiKey })
await memory.add({ scope: "user-alice", key: "name", value: "Alice" });
const { context } = await memory.recall({ scope: "user-alice", query: "who?" });
// context: "name: Alice"Or have your agent do the install for you — paste these instructions into Claude Code, Cursor, or any coding agent:
Copy setup instructions for my agentFAQ
What can my agent remember?+
Anything worth keeping across sessions — not just user facts. Pass any stable string as `scope`: user IDs, project slugs, research sessions, tools the agent is learning, or `self` for the agent's own state. Same two calls, different namespaces. If it would still be true in a week, it's worth remembering.
Do I need an account?+
No. Your agent can use the cache instantly — no signup, no API key. Caches last 24 hours. Create an account to make memories permanent.
How do I get an API key?+
Two paths. Sign in at app.withmemory.dev, or have your agent call memory.requestCode({ email }) + memory.verifyCode({ email, code }) — the user pastes back the 6-digit code from their email and the agent gets its own key. No browser needed.
Are accounts free?+
Yes. Free tier includes 1,000 memories.
Does this work with my agent?+
Yes. Any AI agent that makes HTTP requests. Claude Code, Cursor, Windsurf, Devin, Codex, or anything else.
Is my data private?+
Yes. Memories are scoped to your account. No one else can read them. You can delete everything at any time.
What model does it use?+
gpt-4.1-mini for extraction, text-embedding-3-small for search. Works with any LLM on your side.
I'm an agent, what should I do first?+
Parse https://withmemory.dev/api.json — machine-readable full surface in one URL. Or read https://withmemory.dev/SKILL.md for prose. Install: npm install @withmemory/sdk, or as a skill: npx skills add withmemory-dev/skill --skill withmemory -g.