{"slug": "i-built-a-persistent-memory-api-for-ai-agents-and-it-s-free", "title": "I built a persistent memory API for AI agents — and it's free", "summary": "A developer built AgentMemo, a free REST API that gives AI agents persistent, semantic memory. The API allows agents to store, retrieve, and forget memories based on meaning rather than keywords, and includes features like TTL support, namespaces, and MCP server compatibility. AgentMemo is designed to work across different AI models, providing a universal memory layer for agents.", "body_md": "Every AI agent has the same problem.\n\nThe moment a session ends, everything is gone. No memory of the\n\nuser. No context from last week. No continuity. Every conversation\n\nstarts from zero.\n\nI built AgentMemo to fix this.\n\nAgentMemo is a REST API that gives AI agents persistent memory.\n\nAgents can store memories, retrieve them semantically, and forget\n\nthem when needed.\n\nThe key word is **semantically**. Not keyword search.\n\nMeaning-based search.\n\nStore: *\"The customer prefers email over phone and is on the Pro plan.\"*\n\nQuery: *\"How should we contact this user?\"*\n\nResult: ✅ Returns the memory with score 0.62 — zero keyword overlap,\n\npure semantic understanding.\n\nGet a free API key instantly — no credit card, no email required:\n\n```\n# Get your API key\ncurl -X POST https://agentmemo.dev/signup \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\":\"my-agent\"}'\n\n# Store a memory\ncurl -X POST https://agentmemo.dev/memory/store \\\n  -H \"Authorization: Bearer YOUR_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"user_id\": \"user_123\",\n    \"agent_id\": \"support_bot\",\n    \"content\": \"User prefers dark mode and works in TypeScript\",\n    \"metadata\": {\"plan\": \"pro\"}\n  }'\n\n# Retrieve relevant memories semantically\ncurl \"https://agentmemo.dev/memory/retrieve?user_id=user_123&query=what+does+this+user+prefer\" \\\n  -H \"Authorization: Bearer YOUR_KEY\"\n```\n\n**Semantic search** — memories retrieved by meaning not keywords.\n\nBuilt on vector embeddings generated automatically on every store.\n\n**Agent-native signup** — agents can self-register via POST /signup\n\nwith zero human involvement. No email. No verification. Key returned\n\ninstantly in JSON.\n\n**MCP server** — works natively with Claude, Cursor, and any MCP\n\nclient. Add it in two lines:\n\n```\n{\n  \"mcpServers\": {\n    \"agentmemo\": {\n      \"url\": \"https://agentmemo.dev/mcp\",\n      \"transport\": \"streamable-http\",\n      \"headers\": {\n        \"Authorization\": \"Bearer YOUR_KEY\"\n      }\n    }\n  }\n}\n```\n\n**auth.md support** — AgentMemo publishes an auth.md file at\n\nagentmemo.dev/auth.md so any auth.md-compatible agent can\n\ndiscover and self-register automatically.\n\n**TTL support** — set expiry on memories. Weather from yesterday?\n\nExpires in 24 hours. User preferences? Keep forever.\n\n**Namespaces** — organize memories by project, session, or topic.\n\nIsolated memory spaces within one API key.\n\n**Edge deployed** — sub-50ms globally. No cold starts.\n\nNo servers to manage.\n\nThe most powerful use case — building the context window:\n\n``` js\n// Get API key from signup\nconst key = \"am_sk_your_key\";\n\n// Before calling Claude/GPT, fetch relevant memories\nconst res = await fetch(\n  `https://agentmemo.dev/memory/retrieve?user_id=${userId}&query=${currentMessage}`,\n  { headers: { Authorization: `Bearer ${key}` } }\n);\nconst { memories } = await res.json();\n\n// Inject into system prompt\nconst systemPrompt = `\nYou are a helpful assistant.\n\nWhat you remember about this user:\n${memories.map(m => `- ${m.content}`).join('\\n')}\n\nUse this context to give personalized responses.\n`;\n\n// Now call Claude/GPT with full context\nconst response = await anthropic.messages.create({\n  model: \"claude-sonnet-4-6\",\n  system: systemPrompt,\n  messages: [{ role: \"user\", content: currentMessage }]\n});\n\n// Store what happened for next time\nawait fetch(\"https://agentmemo.dev/memory/store\", {\n  method: \"POST\",\n  headers: { \n    Authorization: `Bearer ${key}`,\n    \"Content-Type\": \"application/json\"\n  },\n  body: JSON.stringify({\n    user_id: userId,\n    agent_id: \"assistant\",\n    content: `User asked: ${currentMessage}. Key outcome: ${summary}`\n  })\n});\n```\n\nI believe the next generation of software won't be used by humans —\n\nit will be run by agents.\n\nAnd every agent needs a memory.\n\nThe big AI labs are building memory inside their own walls.\n\nClaude remembers — but only within Anthropic. GPT remembers —\n\nbut only within OpenAI.\n\nNobody was building the memory layer that works across ALL of them.\n\nAgentMemo is that layer.\n\n🔗 **Live:** [https://agentmemo.dev](https://agentmemo.dev)\n\n📖 **Docs:** [https://agentmemo.dev/docs](https://agentmemo.dev/docs)\n\n🔌 **MCP:** [https://agentmemo.dev/mcp.json](https://agentmemo.dev/mcp.json)\n\n🤖 **auth.md:** [https://agentmemo.dev/auth.md](https://agentmemo.dev/auth.md)\n\nFree during beta. No limits. No credit card.\n\nWould love your feedback — especially if you're building\n\nmulti-agent systems. What memory features would make your\n\nagents smarter?", "url": "https://wpnews.pro/news/i-built-a-persistent-memory-api-for-ai-agents-and-it-s-free", "canonical_source": "https://dev.to/nadeem_shaikh_5663bb224d1/i-built-a-persistent-memory-api-for-ai-agents-and-its-free-3b16", "published_at": "2026-06-18 09:24:00+00:00", "updated_at": "2026-06-18 09:51:50.259049+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "developer-tools", "natural-language-processing", "ai-infrastructure"], "entities": ["AgentMemo", "Claude", "GPT", "OpenAI", "Anthropic", "Cursor", "MCP"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-persistent-memory-api-for-ai-agents-and-it-s-free", "markdown": "https://wpnews.pro/news/i-built-a-persistent-memory-api-for-ai-agents-and-it-s-free.md", "text": "https://wpnews.pro/news/i-built-a-persistent-memory-api-for-ai-agents-and-it-s-free.txt", "jsonld": "https://wpnews.pro/news/i-built-a-persistent-memory-api-for-ai-agents-and-it-s-free.jsonld"}}