Hermes Atlas
Memory & knowledge

Hermes D1 Memory

benben17/hermes-d1-memory

Cloudflare D1 external memory provider for Hermes Agent with FTS5 search and a durable local write queue

In short

Hermes D1 Memory is an external memory provider for Hermes Agent that stores long-term memory in Cloudflare D1, a serverless SQLite database. It adds keyword search with FTS5 and two agent tools, d1_remember and d1_search.

What Hermes D1 Memory does

Hermes D1 Memory Provider stores durable Hermes memory in Cloudflare D1, Cloudflare's serverless SQLite database. Search uses FTS5 virtual tables, so retrieval is keyword-based rather than embedding-based. The plugin talks to Cloudflare through plain HTTP REST calls with the requests library, which avoids heavy cloud SDKs.

Writes land first in a local SQLite queue at ~/.hermes/memory/d1_queue.db and are flushed to D1 in the background with retries and a dead-letter record, so the agent does not wait on Cloudflare's API. Relevant memories are prefetched in a background thread before the agent replies, and the agent gets d1_remember and d1_search tools. Hermes MEMORY.md and USER.md stay active as a fallback, and memories are isolated by user and agent but can be retrieved across agents for the same user. Mirroring whole conversation turns is off unless an environment variable enables it.

Key features

  • Cloudflare D1 storage with FTS5 keyword search
  • Durable local write queue flushed to D1 in the background
  • Retry with backoff and dead-letter tracking for failed writes
  • Background prefetch of relevant memories before each reply
  • d1_remember and d1_search tools for the agent
  • Per-user and per-agent memory scopes

When to use it

  • Keeping Hermes long-term memory in a hosted database instead of local files
  • Sharing a user's memories between several Hermes agents
  • Running Hermes on a small server while storing memory at Cloudflare's edge

Who it is for: Hermes Agent users with a Cloudflare account who want remote, durable long-term memory.

How it fits with Hermes Agent

Built for Hermes Agent as an external memory provider plugin, activated with memory.provider d1-mem. Built-in MEMORY.md and USER.md remain active alongside it.

How to install Hermes D1 Memory

These commands are copied from the project's README. Check the repository for the latest steps before you run them.

hermes plugins install https://github.com/benben17/hermes-d1-memory.git
hermes config set memory.provider d1-mem

Requirements: Hermes Agent, a Cloudflare account, a Cloudflare API token with D1 Edit permission, and a created D1 database ID

FAQ

What is Hermes D1 Memory?

Hermes D1 Memory is an external memory provider plugin for Hermes Agent. It keeps long-term memory in Cloudflare D1 and searches it with FTS5.

How do I install Hermes D1 Memory?

Run hermes plugins install with the repository URL, add your Cloudflare account ID, API token and D1 database ID to ~/.hermes/.env, then run hermes config set memory.provider d1-mem and restart the Hermes session.

What do I need to run Hermes D1 Memory?

You need Hermes Agent, a Cloudflare account, an API token with D1 Edit permission and the ID of a D1 database. The README shows npx wrangler d1 create hermes-memories as one way to create the database.

Similar memory for Hermes Agent

All memory

Related guides: SOUL.md for Hermes Agent: what it is and how to write one · Run multiple Hermes agents with profiles