Built for the June 15 Agent SDK launch

Anthropic just gave you $200 a month. Spend it on memory that lasts.

CogmemAi is the persistent memory layer for the Claude Agent SDK and claude -p. Survives compaction, session end, and model handoff. Top published score on LongMemEval. Free tier ships today.

60-second install
$ npm install -g cogmemai-mcp
$ npx cogmemai-mcp setup
# wizard registers your MCP config + writes the autonomous-capture hooks
Get free API key → View on GitHub 500 memories + 500 extractions/mo on the free tier. No card.
Want to see it work end-to-end before installing? Run the two-script Agent SDK quickstart.
The $200 problem

Anthropic gave Max 20x users a use-it-or-lose-it monthly budget for SDK tools. The credit doesn't roll over.

Power users will spend it on tools that actually solve a pain. The single deepest pain in Agent SDK and claude -p workflows is the same thing every Claude Code user runs into: the assistant forgets.

Without persistent memory

  • Compaction wipes context mid-session. Architecture decisions you walked through 30 minutes ago are summarized into one fuzzy paragraph.
  • Every new session starts cold. Re-explain the codebase. Re-state the conventions. Re-litigate the same decisions.
  • No memory of past bugfixes. The same Stripe webhook bug gets debugged from scratch every time it bites.
  • Preferences forgotten. "Use Bun, never npm" lasts until the context window fills.

With CogmemAi

  • Memory survives compaction. The assistant reloads top project memories on the next message. Work resumes instantly.
  • Cross-session continuity. Open a new session, three pending tasks and an active reminder from yesterday surface immediately.
  • Bugfix recall. Save every fix once. Find it in seconds the next time the symptom appears, even from a teammate's session.
  • Preferences persist globally. State a preference once. It carries to every session, every project, forever.
How it works

Add persistent memory to your Agent SDK in three steps.

CogmemAi runs as an MCP server. The Agent SDK speaks MCP natively. No custom integration code, no glue, no hand-rolled storage layer.

1

Install the MCP server

One npm install. Setup wizard registers the MCP config in your Claude Code settings, prompts for your free API key, and writes the autonomous-capture hooks so memory builds itself as you work.

$ npm install -g cogmemai-mcp
$ npx cogmemai-mcp setup
2

Use the Agent SDK normally

CogmemAi exposes its tools to any Agent SDK script the same way it exposes them to Claude Code. Memory operations are first-class MCP tools: save, recall, extract, update, link, consolidate.

import { query } from "@anthropic-ai/claude-agent-sdk";

const result = await query({
  prompt: "Pick up where we left off on the auth refactor.",
  mcpServers: { cogmemai: { command: "cogmemai-mcp" } },
});
3

Watch memory compound

Every session adds to a searchable, scoped memory store. Project memories stay with the project. Global memories (preferences, identity, tool choices) carry everywhere. Health score and analytics included.

// next session, anywhere
await query({
  prompt: "What were the three constraints we settled on yesterday?",
  mcpServers: { cogmemai: { command: "cogmemai-mcp" } },
});
// → answers from saved memory, no re-discovery

Six ready-to-use skills, indexed in the Skills Marketplace.

Each skill teaches the assistant a specific memory workflow. Install the MCP server and they activate automatically based on conversation triggers.

cogmemai-memory
Full reference for memory management. Importance scoring, type taxonomy, scoping, lifecycle.
session-start
Loads top project memories before the assistant responds to the first message of every session.
save-context
Captures live conversation state so it survives compaction, session end, or model handoff.
remember-this
Persists explicit user-stated preferences globally the moment you say them.
save-bugfix
After every verified fix, saves symptom, root cause, fix, and why-it-works.
search-before-debugging
Before debugging anything new, recalls existing fixes from this or any past session.
Integration surfaces

Four ways to wire CogmemAi into your stack.

MCP is the easiest path for Claude Code, the Agent SDK, and other MCP-native editors. If MCP isn't an option, the same memory engine is available three other ways.

MCP server
Native for Claude Code, Claude Agent SDK, claude -p, Cursor, Windsurf, Cline, and Continue. Install with npm install -g cogmemai-mcp. The recommended path for almost everyone.
Install guide
HTTPS REST API
Language-agnostic. Every memory operation (save, recall, extract, link, consolidate) is a single HTTPS call. Drop it into any agent framework, any runtime, any stack.
REST reference
Direct API / SDK
Lower-latency, deeper integration. For teams embedding memory into a multi-agent platform, autonomy stack, or proprietary product surface where round-trip overhead matters.
Talk to engineering
On-prem dedicated
For defense, government, and regulated customers. Runs entirely inside your environment with no data crossing your network boundary. US citizen and clearance-ready engineering.
Schedule a pilot

Reference docs for every integration path live at hifriendbot.com/developer. Need help picking the right one? Tell us about your stack.

Receipts

Numbers, not promises.

Long-term memory in Ai agents is a real benchmark category. We publish our scores, our methodology, and the dates we ran them.

95.1%
LongMemEval
Apr 19, 2026 · top published
91%
LoCoMo
Apr 2, 2026 · above human baseline
60s
Install to first save
npm + setup wizard
$0
Free tier
500 memories + 500 extractions/mo
Frequently asked

The questions Max 20x users keep asking.

What's the easiest thing to spend the new $200 Agent SDK credit on?

Memory. The deepest pain in Agent SDK and claude -p workflows is context loss across sessions and compaction. CogmemAi solves that with a single npm install. Free tier covers most personal use; paid tiers unlock higher limits and team features.

Does CogmemAi work with the Claude Agent SDK?

Yes. CogmemAi is an MCP server. The Agent SDK supports MCP servers natively. Add cogmemai-mcp to your mcpServers config and memory tools are available to the agent immediately.

Does CogmemAi work with claude -p?

Yes. The setup wizard registers the MCP config that claude -p uses. Run any one-shot prompt and the agent has full memory tooling available.

How do I add memory to Claude Code?

Run npm install -g cogmemai-mcp followed by npx cogmemai-mcp setup. The wizard registers the MCP server, writes the autonomous-capture hooks, and prompts for your free API key. Sixty seconds end-to-end.

What is the best Ai memory benchmark score?

CogmemAi holds the top published score on LongMemEval at 95.1%, measured April 19, 2026. On LoCoMo, CogmemAi scored 91% on April 2, 2026, above the 87.9% human baseline.

Does CogmemAi work with Cursor, Windsurf, Cline, and Continue?

Yes. All four support MCP servers. Install cogmemai-mcp the same way and point the editor's MCP config at it. Per-editor guides at hifriendbot.com/developer.

Is CogmemAi free?

Yes. The free tier includes 500 memories and 500 extractions per month across 5 projects. No credit card required.

Is CogmemAi secure?

Yes. CogmemAi uses quantum-safe encryption on stored memories and supports scoped API keys, team isolation, and per-project access control. Full technical details at hifriendbot.com/tech.

Does CogmemAi offer on-prem deployment?

Yes. For defense, government, and regulated customers, CogmemAi ships as a dedicated on-prem deployment with no data crossing your network boundary. Contact us through the developer page to discuss a pilot.

Don't waste the credit.

Install CogmemAi today. Watch your Agent SDK sessions remember everything by next week. Free tier, 60-second setup, no card required.