Memory Sidecar CLI
External memory for Hermes, Claude Code, Codex and Cursor: session archive, recall layers and relevant context injected back
- 208 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- In its default mode the installer installs dependencies and registers a cron block
- The sidecar reads and archives agent sessions, which contain code and project context
- Memory is returned into the agent context automatically
Install
- Works in
Manual install
Run `git clone https://github.com/mage0535/hermes-memory-installer.git`, set `AGENT_HOME` for the agent and run `./install.sh --install-mode 1` to only check dependencies. Show the user the plan and run `./install.sh` after their approval.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- In its default mode the installer installs dependencies and registers a cron block
- The sidecar reads and archives agent sessions, which contain code and project context
- Memory is returned into the agent context automatically
This is third-party code. Review the repository files before installing.
What it does
Memory Sidecar runs next to the agent and does not change its core. It reads the agent data directory (`state.db` and session files), archives sessions, builds long-term knowledge and returns relevant pieces into context. Memory is split into hot, warm and cold layers plus curated notes, with layered recall between them. The stack relies on Hindsight, gbrain and PostgreSQL. The `install.sh` installer reads the path from `AGENT_HOME`, and three `--install-mode` options range from automatic dependency setup to detection only. State is machine-readable: the system writes health artifacts, memory quality metrics, evaluations with trends and a dry-run plan for gbrain. Prometheus and Grafana configurations are included for observability.
Who it is for. People who run a long-lived agent (Hermes Agent, Claude Code or Codex) on their own server and want observable memory with metrics instead of a single notes file.
Good fit when
- Work stretches across many sessions and projects and a single memory file no longer holds what is needed
- You want to know when memory was archived, how often recall helped and what degraded
- The agent cannot be changed and long-term memory must work beside it
- Users of an agent need a private stack with no third-party servers
Not a fit when
- There is one agent and few sessions: a `CLAUDE.md` file or built-in memory is enough
- There is no PostgreSQL 16, Hindsight or gbrain and installing three services for memory is unwelcome
- Installing on a work computer without the right to change cron and system packages
Example request
Install Memory Sidecar for my agent and show which dependencies are missing without changing the system.Limitations
Python 3.9 or newer, PostgreSQL 16, running Hindsight and gbrain and an agent data directory with `state.db` are required. The default `--install-mode 3` tries to install dependencies itself, so read the plan in mode `1` or `2` first. The repository targets technical users with their own Hindsight, gbrain and PostgreSQL stack. The README mixes version 3.5.2 and version 3.5.1, so numbers in the text differ. The latest commit in the repository is from July 2026.
How to disable. Stop the cron jobs the installer added, remove `$AGENT_HOME/memory-sidecar` and the scripts from `$AGENT_HOME/scripts`. PostgreSQL databases and the Hindsight and gbrain services are removed separately.
FAQ
How do I install Memory Sidecar?
Clone the repository, set `AGENT_HOME` (for example `~/.hermes` or `~/.claude`) and run `./install.sh`. A mode with no prompts is `./install.sh --noninteractive --agent-home "$HOME/.my-agent"`.
What do the install modes do?
Mode 3 installs dependencies itself by default. Mode 2 shows commands and goes step by step, and mode 1 only checks and changes nothing.
Which agents does it work with?
Hermes Agent, Claude Code, Codex and Codex- or Cursor-style local agents with a shared data directory. The one condition is a `state.db` and session files in the directory.
What must be running beforehand?
PostgreSQL 16, Hindsight and gbrain reachable over the network. Without them memory cannot be built.
Does data go to the cloud?
The README describes a public architecture with no server paths or keys, and `PRIVACY.md` holds a separate policy. Check it: your stack processes session data.
Discussion
No questions or reviews yet.
Related
CLI toolsShared local memory for AI agents: Claude Code, Codex, Cursor and others find the agreements of past sessions in it and record new ones
Persistent agent memory in a folder of linked markdown notes, so Claude Code remembers a project across sessions
Shared memory for AI agents across machines: a fact one agent writes shows up for the others with no server in between
memory.cpp compiles repository history into compact agent context and filters out stale items, secrets and contradictions
Long-term memory for agents: a remote MCP server, plugins for Claude Code, Cursor and Codex, and an API for your own apps
Dual-path memory for agents: a knowledge graph on your machine, search on demand and hints before you ask, across sessions.
README in short
The README explains that this is external memory next to the agent, why it was built and on what principles: leave the agent core untouched, use stable data boundaries, combine recall layers. Requirements, a quick start and install modes follow.