A lightweight, zero-auth REST API that lets AI agents share memory across machines. SQLite-persistent — memories survive server restarts.
One agent remembers. All agents benefit. No cloud, no tokens, no complexity.
Agent A (laptop) ──POST /memory/agent-a──▶ ┌──────────────────┐
Agent B (phone) ──GET /memory/agent-a──▶ │ Memory Server │
Agent C (cloud) ──GET /memory/agent-b──▶ │ (any machine) │
└──────────────────┘
Each agent has its own namespace (/memory/<agent_id>). Keys are simple strings. Values are text.
| Method | Endpoint | Description |
|---|---|---|
POST |
/memory/<agent_id> |
Store {"key":"...", "value":"..."} |
GET |
/memory/<agent_id>/<key> |
Retrieve a single value |
GET |
/memory/<agent_id> |
List all memories for an agent |
DELETE |
/memory/<agent_id>/<key> |
Delete a memory |
No authentication. No API keys. Designed for private networks.
pip install flask
python server.py
# → Listening on http://0.0.0.0:9736Configuration :
AGENT_MEMORY_DB: chemin du fichier SQLite (défaut :./memory.db)PORT: port d'écoute (défaut :9736)
# Store
curl -X POST http://<server-ip>:9736/memory/my-agent \
-H "Content-Type: application/json" \
-d '{"key":"greeting","value":"hello from laptop"}'
# Retrieve
curl http://<server-ip>:9736/memory/my-agent/greeting
# → {"key":"greeting","value":"hello from laptop"}
# List all
curl http://<server-ip>:9736/memory/my-agentfrom client import AgentMemory
mem = AgentMemory("http://<server-ip>:9736", "my-agent")
mem.set("favorite_color", "blue")
print(mem.get("favorite_color")) # blue
print(mem.list()) # all keys
mem.delete("favorite_color")- Cross-session memory — agents remember facts across restarts
- Multi-agent coordination — agents share discovered knowledge
- Configuration hub — store API keys, preferences, environment details
- Phone ↔ Laptop sync — your phone agent knows what your desktop agent learned
- Zero setup — no PostgreSQL, no Redis, no credentials
- Human-readable — curl it, debug it, inspect it
- Single file —
server.pyis ~80 lines - Network-native — works over LAN, VPN, or Tailscale
This server has no authentication. Run it on a trusted network only (LAN, VPN, or overlay network). Do not expose it to the public internet.
MIT