# GBrain

> GBrain (v0.60.640.0, 10 Nov 2026, ~32k stars) is Garry Tan's memory layer for AI agents. It indexes Markdown notes and remembered facts in PGLite (local, default) or Postgres with pgvector, links people, companies and pages into a typed graph, and serves it over MCP or a CLI. It needs Bun 1.4.4+. Keyword search works with no API key; semantic search, cited answers and overnight enrichment need embedding or chat API keys (Voyage by default, or local Ollama). MIT. gbrain.io is optional paid hosting. It changes very fast, and Windows has extra rough edges.

- Repository: https://github.com/garrytan/gbrain
- Official docs: https://github.com/garrytan/gbrain#readme
- Checked: 2026-11-10

## What it replaces
- Mem0 Platform: Long-term memory for chat assistants, Memory for coding agents, Knowledge graph memory (partial). You run and maintain it yourself, and it is built around a Markdown "brain" plus explicit remembering; automatic fact capture and enrichment are opt-in and need your own model API keys.
  - Use it instead of paying for Mem0 Platform? Personal use: Yes. Business: Yes.

## Facts, with sources

| Question | Status | Answer | Source | Checked |
|---|---|---|---|---|
| Runs on my machine? | Confirmed | Yes; a local PGLite database by default, or your own Postgres server for shared or large brains | https://github.com/garrytan/gbrain#architecture | 2026-11-10 |
| Code licence | Confirmed | MIT | https://github.com/garrytan/gbrain/blob/master/LICENSE | 2026-11-10 |
| Model weights licence | Confirmed | No model weights; it calls embedding and chat models you choose (Voyage by default, OpenAI, Anthropic, or local Ollama and llama.cpp) | https://github.com/garrytan/gbrain#integrations | 2026-11-10 |
| Commercial use | Confirmed | Yes, the MIT licence allows commercial use | https://github.com/garrytan/gbrain/blob/master/LICENSE | 2026-11-10 |
| Paid services needed? | Confirmed | None required; keyword search works without keys. Semantic search, cited answers and enrichment need paid model APIs unless you run local models | https://github.com/garrytan/gbrain#two-ways-to-query-your-brain | 2026-11-10 |
| Hardware | Partial | No minimum for a personal brain; the always-on 24/7 setup asks for a server with 8GB+ RAM | https://github.com/garrytan/gbrain#optional-a-new-personal-agent | 2026-11-10 |
| Operating systems | Partial | Runs wherever Bun runs; macOS and Linux are the main targets, and Windows works but has its own known issues (socket path limits, Supabase DNS) | https://github.com/garrytan/gbrain/blob/master/docs/guides/troubleshooting.md | 2026-11-10 |
| Setup effort | Confirmed | Medium; install Bun, then a global install from GitHub and one setup command per agent. Postgres, API keys and the background daemon add more steps | https://github.com/garrytan/gbrain#heres-how-to-self-host-it | 2026-11-10 |

GitHub: 33766 stars, 5062 forks, last push 2026-12-01, archived: no.

## Agent skills

GBrain publishes 92 agent skills for coding agents such as Claude Code, Cursor and Codex, about 15482 installs in total (skills.sh, checked 2026-11-26). Some may be for the project's own developers. Installs show popularity, not quality or safety.

- brain-ops: about 440 installs, security scans 3 pass. https://www.skills.sh/garrytan/gbrain/brain-ops
- maintain: about 364 installs, security scans 2 pass, 1 fail. https://www.skills.sh/garrytan/gbrain/maintain
- query: about 359 installs, security scans 2 pass, 1 warn. https://www.skills.sh/garrytan/gbrain/query
- Install: `npx skills add garrytan/gbrain`

## Alternatives to GBrain
- [Hindsight](https://repoquarry.dev/projects/hindsight.md): Self-hostable agent memory server that extracts facts, entities and relationships from conversations and recalls them for AI agents.
- [AI Memory](https://repoquarry.dev/projects/ai-memory.md): Self-hosted long-term memory for coding agents: one shared, git-backed Markdown memory and handoffs across Claude Code, Codex, Cursor and 20+ others.
- [Basic Memory](https://repoquarry.dev/projects/basic-memory.md): Local-first MCP memory server that stores what you and your AI write as linked Markdown files with full-text and semantic search.
- [Claude-Mem](https://repoquarry.dev/projects/claude-mem.md): Memory plugin for Claude Code and other coding agents that captures tool use, summarises sessions and injects context into new sessions.
- [Mem0 (open source)](https://repoquarry.dev/projects/mem0.md): Open-source memory layer for AI assistants and agents, as a Python/Node library or a self-hosted server with dashboard.
---
Source: RepoQuarry (https://repoquarry.dev/projects/gbrain). Data licence: CC BY 4.0. Quotes are from project documentation and belong to their authors.
