Run GBrain on a Prized box
Updated
Self-host GBrain, Garry Tan's open-source memory for AI agents, on a Prized box: one always-on brain that the box's Claude Code and Codex and your laptop's Claude Code share, with nothing published to the internet.
On this page8
GBrain is an MIT-licensed memory for AI agents: Claude Code and Codex look in it before they answer and keep what you ask them to remember. Self-hosted, it needs a machine that stays on. On a Prized box it runs with your laptop closed, and your laptop reaches it with no open port and no tunnel account.
1. Pick a box
Run it on your box, or start one for it:
prized box new brain --size micro --waitOn the free credit a workspace has one box at a time, so use the one you have (Free credit) and put its name where this page says brain. A Nano (2 vCPU, 2 GB) runs it, and the server holds about 420 MB of memory; a Micro (4 GB) leaves more room for agents working beside it.
2. Install GBrain
From your machine:
curl -fsSL https://prized.dev/docs/gbrain/gbrain-box.sh | prized exec brain -- bash -sIt takes under two minutes on a Nano or a Micro. The script installs Bun and GBrain's stable release, creates a brain that searches by keyword with no API key, runs it as a service on the box's 127.0.0.1:3131, connects the box's Claude Code and Codex, and saves a token for your laptop. It follows GBrain's own self-host and remote MCP guides, and it is safe to run again: a re-run also renews the box agents' tokens, which last 90 days.
To index a folder of Markdown on the box as well, such as your company's docs repo:
curl -fsSL https://prized.dev/docs/gbrain/gbrain-box.sh | prized exec brain -- 'GBRAIN_NOTES=~/company bash -s'3. Use it on the box
prized ssh brainThen start claude or codex. New sessions look in the brain first: ask one to remember a decision, and the next session answers from it. Allow the gbrain tools when Claude Code or Codex asks.
4. Use it from your laptop
The server listens only on the box. Forward its port to your machine, and leave this running:
prized proxy brain 3131If brain is the box you connected with prized setup, Prized already mirrors its ports to your localhost and you can skip this (Ports). Then add the brain to Claude Code on your laptop:
claude mcp add --transport http --scope user gbrain http://127.0.0.1:3131/mcp --header "Authorization: Bearer $(prized exec brain -- cat .gbrain/private/laptop.token)"claude mcp list then shows gbrain as connected. The token lasts 90 days. For a new one, delete ~/ on the box, run the script again, then claude mcp remove gbrain -s user and the same command.
When the box sleeps
A brain waiting for questions doesn't keep the box up, even with prized proxy open, so with auto-pause on, the box pauses after its idle window like any other: on the free credit, 2 hours idle, never in its first 24 hours (Auto-pause). While it sleeps, your laptop's agents can't reach the brain. Wake it with:
prized box resume brain --waitNano through Small boxes keep their memory through a pause, so the same GBrain server is running when the box wakes, 11 to 33 seconds later (Pause and resume). A running prized proxy forwards again by itself, and Claude Code on your laptop reconnects with nothing to redo. To keep the brain reachable all day, switch auto-pause off for this box; it then bills while idle, and on the free credit off means 12 idle hours at most:
prized box auto-pause brain offCommon questions
Does anything need an API key?
No: the brain searches by keyword, and for semantic search GBrain takes a Voyage or OpenAI key (its install guide). Your agents on the box still need their own sign-in.
How do I add notes later?
Run step 2's second command with your folder. Keep the folder a git repository, then pick up new commits with gbrain sync --no-pull --source notes on the box.