Hermes Gbrain Bridge banner
howardpen9 howardpen9

Hermes Gbrain Bridge

Documentation community

Description

Convert Hermes / OpenClaw agent memory (JSONL sessions, MEMORY.md) to markdown for gBrain ingest

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

hermes-gbrain-bridge

A small, dependency-free bridge that converts scattered agent memory (Hermes, Claude Code, Codex, OpenClaw) into clean markdown for [gBrain](https://github.com/garrytan/gbrain) to ingest.

πŸ‡ΉπŸ‡Ό ηΉι«”δΈ­ζ–‡η‰ˆζœ¬οΌš[README.zh-TW.md](README.zh-TW.md)

Most agent tools write memory in their own format β€” JSONL event streams, flat-key text, SQLite. gBrain only imports markdown. If you want one searchable brain across everything you've ever asked an agent, you need a bridge. This is that bridge.


Why this exists

On one normal developer machine, agent memory lives in at least **five** different places β€” each in its own format:

Tool Location Format
Hermes ~/.hermes/sessions/*.jsonl + memories/*.md JSONL + Β§-delimited markdown
Claude Code ~/.claude/projects//*.jsonl Event stream JSONL
Codex CLI ~/.codex/sessions/**/*.jsonl JSONL with session_meta header
OpenClaw archive ~/.openclaw.pre-migration/workspace/**/*.md Markdown with legacy paths
Conductor workspaces Encoded into the Claude Code path Same as Claude Code

gBrain is an excellent knowledge brain, but out of the box it only reads markdown. You don't want to lose the last three years of conversations just because they're in the wrong container. This repo is the converter that makes them ingestible β€” one command per source, with mtime windows, size floors, secret redaction, and a canonical event format under the hood.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚        Local machine             β”‚       β”‚   Cloud (Railway)     β”‚
β”‚                                  β”‚       β”‚                       β”‚
β”‚  ~/.hermes/sessions/             β”‚       β”‚   Postgres            β”‚
β”‚  ~/.hermes/memories/             │─┐     β”‚   + pgvector          β”‚
β”‚  ~/.claude/projects/             β”‚ β”‚     β”‚   + pg_trgm