garrytan/gbrain

Garry's Opinionated OpenClaw/Hermes Agent Brain

What it solves

GBrain is a persistent memory layer for AI agents, designed to prevent them from being "amnesiac" by providing a durable, structured knowledge base. It moves beyond simple keyword search or vector retrieval by synthesizing answers across multiple sources and performing gap analysis to tell the user what the brain actually doesn't know.

How it works

GBrain operates as a daemon that can run locally (using PGLite) or on a server. It ingests data from various sources—including emails, calendars, contacts, and markdown files—and organizes this information into a self-wiring knowledge graph. This graph extracts entity references and creates typed edges (e.g., works_at, invested_in) without requiring LLM calls for every write. When queried, it uses a synthesis layer to produce well-cited prose instead of just returning a list of document chunks.

Who it’s for

It is built for users of AI coding agents (like Claude Code, Codex, or Cursor) and developers building autonomous agents (via OpenClaw or Hermes) who need their agents to have long-term, cross-session institutional or personal memory.

Highlights

  • Synthesis & Gap Analysis: Provides actual answers with citations and explicitly notes missing information.
  • Self-Wiring Knowledge Graph: Uses typed edges for complex relationship queries that vector search alone cannot handle.
  • Multi-Harness Integration: Deeply integrates with MCP (Model Context Protocol) to work with Claude Code, Codex, Cursor, and other AI clients.
  • Autonomous Maintenance: Supports a "dream cycle" where a server-hosted agent can enrich and consolidate memory overnight.
  • Privacy-First: Supports local-only storage (PGLite) and scoped access for "company brain" deployments where users only see authorized data.

Related

  • Project
  • Project
  • Project
  • Project
  • Project