{
  "manifest_version": "1",
  "slug": "gbrain",
  "title": "GBrain",
  "headline": "Self-host GBrain, shared memory for your agents",
  "description": "Run GBrain on an exe.dev VM: one private MCP memory server that OpenClaw, Hermes, Claude Code and Codex share, with a key per agent and nightly backups.",
  "category": "ai-agents",
  "tags": [
    "gbrain",
    "shared agent memory",
    "mcp memory server",
    "openclaw memory",
    "hermes agent memory",
    "claude code memory",
    "codex memory",
    "remote mcp",
    "garry tan"
  ],
  "url": "https://exe.dev/deploy/gbrain",
  "markdown_url": "https://exe-staging.dev/deploy/gbrain.md",
  "upstream": {
    "website": "https://github.com/garrytan/gbrain",
    "source": "https://github.com/garrytan/gbrain",
    "docs": "https://github.com/garrytan/gbrain/blob/master/docs/mcp/DEPLOY.md",
    "license": "MIT"
  },
  "example_vm_name": "my-gbrain",
  "time": "10 minutes",
  "stack": [
    {
      "name": "GBrain",
      "detail": "`gbrain serve --http` on Bun, as `gbrain.service`: MCP, OAuth and the admin dashboard",
      "port": 8000,
      "data": "~/.gbrain"
    },
    {
      "name": "PostgreSQL 16 with pgvector",
      "detail": "pgvector/pgvector:pg16 in Docker Compose, on 127.0.0.1 only",
      "data": "~/gbrain/postgres"
    },
    {
      "name": "Nightly backup",
      "detail": "pg_dump plus settings, a systemd timer; keeps two weeks",
      "data": "~/backups"
    }
  ],
  "access": [
    {
      "url": "https://my-gbrain.exe.xyz/mcp",
      "who": "private",
      "what": "the MCP endpoint; agents send an exe.dev VM token and their own GBrain key"
    },
    {
      "url": "https://my-gbrain.exe.xyz/admin",
      "who": "private",
      "what": "GBrain's dashboard, behind your exe.dev login and GBrain's owner token"
    }
  ],
  "inputs": [
    {
      "name": "AGENTS",
      "description": "the agents that will share the brain, as short names such as `laptop-claude, laptop-codex, openclaw, hermes`; Shelley makes a GBrain key for each"
    }
  ],
  "delivers": [
    "GBrain's MCP server at `https://my-gbrain.exe.xyz/mcp` on PostgreSQL, as `gbrain.service`, restarted on failure and after a reboot.",
    "Two locks on every request: exe.dev lets in only your login or a VM token, then GBrain checks a key that belongs to one agent.",
    "A read-write GBrain key for each agent you named, revocable one at a time.",
    "The admin dashboard at `/admin`, and an owner token kept in `~/gbrain/.env`.",
    "Nightly backups of the database and settings in `~/backups`, with a restore tested."
  ],
  "owner_runs_after": [
    "ssh exe.dev ssh-key generate-api-key --vm=my-gbrain --label=gbrain-agents --exp=90d"
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe-staging.dev/new?prompt=AGENTS%3D%3Cfill-this-in%3E%0A%0ASet%20up%20GBrain%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe-staging.dev%2Fdeploy%2Fgbrain.md%20from%20top%20to%20bottom.%0A%0AThe%20values%20at%20the%20top%20of%20this%20message%20are%20mine%3A%0A-%20AGENTS%3A%20the%20agents%20that%20will%20share%20the%20brain%2C%20as%20short%20names%20such%20as%20%60laptop-claude%2C%20laptop-codex%2C%20openclaw%2C%20hermes%60%3B%20Shelley%20makes%20a%20GBrain%20key%20for%20each%0AAsk%20me%20for%20any%20that%20still%20say%20%3Cfill-this-in%3E%20before%20you%20need%20them.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-gbrain.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-gbrain.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20GBrain%27s%20MCP%20server%20at%20%60https%3A%2F%2Fmy-gbrain.exe.xyz%2Fmcp%60%20on%20PostgreSQL%2C%20as%20%60gbrain.service%60%2C%20restarted%20on%20failure%20and%20after%20a%20reboot.%0A-%20Two%20locks%20on%20every%20request%3A%20exe.dev%20lets%20in%20only%20your%20login%20or%20a%20VM%20token%2C%20then%20GBrain%20checks%20a%20key%20that%20belongs%20to%20one%20agent.%0A-%20A%20read-write%20GBrain%20key%20for%20each%20agent%20you%20named%2C%20revocable%20one%20at%20a%20time.%0A-%20The%20admin%20dashboard%20at%20%60%2Fadmin%60%2C%20and%20an%20owner%20token%20kept%20in%20%60~%2Fgbrain%2F.env%60.%0A-%20Nightly%20backups%20of%20the%20database%20and%20settings%20in%20%60~%2Fbackups%60%2C%20with%20a%20restore%20tested.%0A%0ARead%20the%20whole%20recipe%2C%20closed%20details%20included%2C%20and%20follow%20%22Set%20up%20by%0Ahand%22%20in%20order%2C%20skipping%20VM%20creation%3B%20the%20walkthrough%20above%20it%20is%20for%0Athe%20owner.%20Ask%20for%20AGENTS%20if%20it%20still%20says%20%3Cfill-this-in%3E.%20Make%20one%20key%0Aper%20agent%20with%20%60gbrain%20auth%20create%20%3Cname%3E%20--scopes%20read%2Cwrite%60%2C%20using%0Ashort%20lowercase%20names.%20Never%20make%20the%20VM%20public%20or%20bind%20Postgres%20beyond%0A127.0.0.1.%20On%20an%20existing%20VM%2C%20ask%20before%20replacing%20anything%20on%20port%208000%0Aor%205432.%20Don%27t%20reboot.%20Test%20the%20backup%20in%20a%20scratch%20directory%20only%3B%20never%0Arestore%20over%20the%20live%20database.%20The%20VM%20can%27t%20reach%20its%20own%0Ahttps%3A%2F%2F%3Cvm%3E.exe.xyz%2C%20so%20checks%20use%20localhost.%0AFinish%20with%20the%20MCP%20URL%2C%20each%20agent%27s%20key%2C%20the%20owner%20token%20from%0A%60~%2Fgbrain%2F.env%60%20for%20%2Fadmin%2C%20and%20the%20%60ssh-key%20generate-api-key%60%20command%0Afor%20the%20owner%20to%20run%20on%20their%20computer%2C%20then%20point%20them%20to%20%22Connect%0Ayour%20agents%22.%20This%20conversation%20is%20private%20to%20the%20owner.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open%20and%20these%20commands%2C%20which%20only%20I%20can%20run%2C%20from%20my%20own%20computer%20%28with%20this%20VM%27s%20name%20in%20them%29%3A%0A%20%20ssh%20exe.dev%20ssh-key%20generate-api-key%20--vm%3Dmy-gbrain%20--label%3Dgbrain-agents%20--exp%3D90d%0A",
    "terminal": "curl -fsSL https://exe-staging.dev/deploy/gbrain/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "AGENTS=\u003cfill-this-in\u003e\n\nSet up GBrain on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/gbrain.md from top to bottom.\n\nThe values at the top of this message are mine:\n- AGENTS: the agents that will share the brain, as short names such as `laptop-claude, laptop-codex, openclaw, hermes`; Shelley makes a GBrain key for each\nAsk me for any that still say \u003cfill-this-in\u003e before you need them.\n\nThe recipe's example VM name is my-gbrain. This VM's name is the output of `hostname`: use it wherever the recipe writes my-gbrain. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- GBrain's MCP server at `https://my-gbrain.exe.xyz/mcp` on PostgreSQL, as `gbrain.service`, restarted on failure and after a reboot.\n- Two locks on every request: exe.dev lets in only your login or a VM token, then GBrain checks a key that belongs to one agent.\n- A read-write GBrain key for each agent you named, revocable one at a time.\n- The admin dashboard at `/admin`, and an owner token kept in `~/gbrain/.env`.\n- Nightly backups of the database and settings in `~/backups`, with a restore tested.\n\nRead the whole recipe, closed details included, and follow \"Set up by\nhand\" in order, skipping VM creation; the walkthrough above it is for\nthe owner. Ask for AGENTS if it still says \u003cfill-this-in\u003e. Make one key\nper agent with `gbrain auth create \u003cname\u003e --scopes read,write`, using\nshort lowercase names. Never make the VM public or bind Postgres beyond\n127.0.0.1. On an existing VM, ask before replacing anything on port 8000\nor 5432. Don't reboot. Test the backup in a scratch directory only; never\nrestore over the live database. The VM can't reach its own\nhttps://\u003cvm\u003e.exe.xyz, so checks use localhost.\nFinish with the MCP URL, each agent's key, the owner token from\n`~/gbrain/.env` for /admin, and the `ssh-key generate-api-key` command\nfor the owner to run on their computer, then point them to \"Connect\nyour agents\". This conversation is private to the owner.\n\nFinish with the URLs I should open and these commands, which only I can run, from my own computer (with this VM's name in them):\n  ssh exe.dev ssh-key generate-api-key --vm=my-gbrain --label=gbrain-agents --exp=90d\n",
    "prompt_url": "https://exe-staging.dev/deploy/gbrain/prompt.txt"
  },
  "updated": "2026-10-30",
  "verified": "2026-10-30",
  "related": [
    "openclaw",
    "hermes-agent",
    "claude-code",
    "codex",
    "mcp-server",
    "pi"
  ]
}
