The Problem: Short-Term Memory in AI Agents
If you’ve built an AI agent that maintains context across multiple conversations or tasks, you’ve hit the memory wall. Most agent frameworks either skip persistence entirely or bolt on in-memory storage that dies with the process. Even retrieval-augmented generation (RAG) only gets you so far — it’s great for factual lookup but terrible for tracking sequence, intent, or evolving state like a chat history.
I wanted something that works like a database for agentic memory: persistent, structured, and decoupled from any specific framework. Not another widget in LangChain, not an Amundsen derivative. A plain, runnable sidecar that any agent can talk to over HTTP.
Why a Sidecar?
Running memory as a sidecar means you can test it standalone, swap it between agents written in different languages, and even use it in non‑agent workflows like event logging or feature stores. The key design goals were:
- Agent‑agnostic — call it from Python, Node.js, Go, or via cURL.
- Stateful by default — no config needed to enable persistence; data survives restarts.
- Hardened for real workloads — the latest release (v3.5.1) focuses on error recovery, concurrent access handling, and predictable resource usage.
What It Looks Like in Action
After installing the sidecar (a single binary or Docker container), you interact with a clean REST API:
# Store a memory entry
curl -X POST http://localhost:8080/memories \
-H 'Content-Type: application/json' \
-d '{"session": "user-42", "key": "last-topic", "value": "discussing deployment"}'
# Retrieve latest memory for a session
curl http://localhost:8080/memories/user-42
The response returns ordered entries, and you can optionally filter by key prefix or time range. No SDK, no ORM, just JSON over HTTP.
v3.5.1: What Changed
This release isn’t about new features — it’s about making the sidecar boring in the right way. The changelog includes:
- Graceful degradation — if the storage backend hiccups, the sidecar returns a 503 and retries internally instead of crashing.
- Connection pooling — memory‑hogging agents that fire hundreds of concurrent writes no longer exhaust file handles.
- Idle‑timeout default — the service now cleans up stale sessions after 24 hours, keeping the data set manageable without manual maintenance.
These changes came from running it alongside a production agent that processes ~50k sessions/day. The previous version worked, but required periodic restarts. v3.5.1 runs weeks without intervention.
When (Not) to Use a Memory Sidecar
It fits neatly when:
- You need persistent agent memory but don’t want to rewrite your core logic to accommodate a specific framework’s memory module.
- You’re prototyping in a notebook or script and want to keep context between runs without serialising to a file yourself.
- You operate multiple agents (different stacks) that share the same memory store — the sidecar acts as a centralised backend.
It’s overkill if:
- Your agent only processes single‑turn requests (stateless chat).
- You already have a mature Redis/Postgres setup and are comfortable managing connections from each agent instance.
- You need sub‑millisecond latency for every memory operation; the sidecar adds ~2–5 ms per call over localhost.
Deploying in 30 Seconds
docker run -d -p 8080:8080 mage0535/hermes-memory-installer:3.5.1
Or grab the binary from the release page and run it directly. No external database required — it uses SQLite by default, with optional PostgreSQL support.
The Bottom Line
Building agent memory correctly is harder than most people expect. A sidecar approach lets you separate concerns, iterate on memory logic independently, and keep your agent code clean. The v3.5.1 hardening release brings that pattern one step closer to being a production staple.
If you’re tired of memory implementations that melt under load or force you into a specific framework, give the sidecar a spin. The GitHub repo has the full docs and the sibling project Knowledge & Memory Management if you want to explore structured knowledge bases too.
Top comments (0)