LibreAI / AI Agents / GBrain
// agents · garrytan/gbrain

GBrain

GBrain is an open-source ai agents project by garrytan (garrytan/gbrain on GitHub). It has 31,948 GitHub stars and 4,759 forks, is released under the MIT license, and was last updated on GitHub on 9 November 2026.

Garry Tan's agent memory — a self-hosted brain your agents share, with sourced facts, corrections and synthesis, MIT

★ 31.9k stars⑂ 4.8k forksMITupdated 2026-11
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

Repository
garrytan/gbrain
GitHub stars
31,948
Forks
4,759
License
MIT
Last updated on GitHub
9 November 2026
Category
AI Agents
Listing
Full install guide
Official site
Hosted GBrain
// how it works

How it works

  1. Install Bun

    GBrain needs Bun 1.4.4 or newer; skip this if you already have it.

  2. Install the GBrain CLI

    Install from GitHub — never from npm, where the gbrain package is an unrelated project.

  3. Wire it to your agent

    Run the setup for your harness (Claude Code or Codex shown); it writes a brain-first block into the agent’s instruction file, wires MCP and smoke-tests the connection.

// features

Why people love it

Sourced facts, with corrections

Explicit facts carry their sources, and you can correct or withdraw them — memory you control, not a black box.

Synthesis, not search results

Answers written as cited prose, with an explicit note on what the brain does not know yet.

Typed knowledge graph

People, companies and deals linked as a graph; relationship retrieval measurably improves recall.

One brain, many agents

The same memory serves OpenClaw, Claude Code, Codex, Grok Bot, Muse, ChatGPT and Cursor.

24/7 dream cycle

A daemon ingests meetings, emails, tweets and calls, enriches people and companies, and consolidates memory overnight.

Keyless start

Begin with keyless memory and keyword retrieval; cloud embedding and synthesis providers are opt-in.

// run it

Run it yourself

  1. Step 1 — Check Bun

    Check Bun 1.4.4 or newer is installed; install it from the Bun website first if it is missing.

    bun --version
  2. Step 2 — Install GBrain

    Clone the stable branch, then install and link the CLI with Bun.

    git clone --branch stable https://github.com/garrytan/gbrain.git && cd gbrain && bun install && bun link
  3. Step 3 — Set up Claude Code

    Wire the brain into Claude Code (or use gbrain setup codex for Codex).

    gbrain setup claude-code
// use cases

What you can build

  • Give coding agents long-term memory across sessions
  • Prepare for meetings from everything your agent knows
  • Run a shared company brain across the team’s agents
  • Keep personal facts portable when you switch agents

For comparison, the same shelf also holds CoreCoder — Self-hosted ai agents and pentagi — Autonomous AI agents for penetration testing. The complete list is the AI Agents shelf. Before running a model locally, check how much VRAM you need for local LLMs — model size has to match your hardware.

// faq

Questions, answered

Is GBrain free?

Yes — MIT licensed and free to self-host. gbrain.io is optional paid hosting; your own model and API usage are separate costs.

Which agents does it work with?

Claude Code, Codex, OpenClaw, Hermes, Grok Bot, Muse, ChatGPT and Cursor, via MCP and per-harness setup guides.

What do I need to run it?

Bun 1.4.4 or newer, plus your own compute and model API configuration for always-on enrichment.

Is my data private?

It runs on your hardware, your database and your keys. Configured cloud embedding, reranking and synthesis providers can receive text — read the memory-boundaries guide before sharing a brain.

Why not npm install -g gbrain?

That package is unrelated and can shadow the real binary. Install only from the GitHub repo via the Bun route above.

// keep exploring

Similar tools

AI Agents

CoreCoder

Self-hosted ai agents: minimal ai coding agent (~1,000 lines of python) inspir.

★ 1.8k starsMIT
View guide →
AI Agents

pentagi

Autonomous AI agents for penetration testing — self-hosted, multi-agent, with a full web UI

★ 25.3k starsMIT
View guide →
AI Agents

nanobot

Ultra-lightweight, open-source, self-hosted personal AI agent framework in Python with WebUI, tools, memory, MCP, multi-agent workflows, automation, and chat…

★ 48.8k starsMIT
View guide →
AI Agents

khoj

Your self-hostable AI second brain for answers, agents, and automations.

★ 37.6k starsAGPL-3.0
View guide →
AI Agents

CyberVerse

Self hosted, live digital human agent system.

★ 1.7k starsGPL-3.0
View guide →
AI Agents

Memori

Agent-native memory infrastructure - structured, persistent memory for production agents

★ 17.1k starsNOASSERTION
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if GBrain is not the right fit.

  • openclaw★ 391.6k

    A personal AI that really does things — on any OS, with your data staying yours.

  • Skills For Real Engineers★ 322.7k

    Matt Pocock's engineering skills for coding agents — grill the spec first, then build it right, MIT

  • superpowers★ 294.9k

    An agentic skills framework & software development methodology that works.

  • ECC★ 275.2k

    Agent harness optimization system with skills, memory and security for Claude Code, Codex and more

  • hermes-agent★ 252.0k

    The agent that grows with you — a Python framework for adaptive AI agents.

// more in agents

More in AI Agents

Nearby AI Agents projects in the catalogue, closest in stars to GBrain — keep exploring the shelf either side of it.

  • agentscope★ 32.9k

    Build and run agents you can see, understand and trust — framework plus a visual agent service

  • cognee★ 31.6k

    Open-source AI memory that gives agents persistent long-term recall.

  • github-mcp-server★ 33.4k

    GitHub's official MCP server — let AI tools work with repos, issues and pull requests

  • graphiti★ 31.5k

    Real-time knowledge graphs that give agents a memory with structure.

  • openclaude★ 33.7k

    A Claude Code-style coding agent that runs anywhere and works with almost any model provider

  • supermemory★ 31.2k

    The memory API that gives AI apps instant, lasting context.

Get GBrain

Free and open — grab the source, star the repo, and start creating.