DEV Community

Cover image for How to add persistent memory to any AI agent in 2 API calls
Truvem
Truvem

Posted on

How to add persistent memory to any AI agent in 2 API calls

AI agents are powerful. But they forget everything between sessions.
I built Truvem to fix this. Here's how in under 5 minutes.
Step 1 — Get your free API key
curl -X POST https://truvem.onrender.com/v1/register -H "Content-Type: application/json" -d '{"email": "you@example.com"}'
Step 2 — Write a memory
curl -X POST https://truvem.onrender.com/v1/memory/write -H "X-API-Key: your_key" -d '{"agent_id": "agent1", "content": "User prefers dark mode"}'
Step 3 — Read it back
curl -X POST https://truvem.onrender.com/v1/memory/read -H "X-API-Key: your_key" -d '{"agent_id": "agent1"}'
Works with GPT, Claude, Gemini, Mistral, Llama. Free.
🔗(https://truvem.github.io/truvem)_

Top comments (0)