Skip to main content
gbrain is a personal knowledge system that gives your agent persistent memory backed by Postgres with vector search. When installed on a managed agent, it’s wired as an MCP server — the agent gets 34 tools for storing, searching, and organizing knowledge.

Install

This runs through five phases: Install is idempotent — re-running it after a partial failure is safe. The allocate phase skips if the database exists, provision skips if gbrain is already cloned, and so on.

What the agent gets

After install, the agent has these tool groups available:

Test it

After installing, message your agent on Telegram:

Managed database

The database that backs gbrain is managed by OpenComputer — you don’t need to provision or configure Postgres yourself. The database:
  • Lives outside the sandbox on a shared Postgres cluster
  • Survives instance restarts and sandbox recreation
  • Is preserved when you uninstall gbrain (your data isn’t deleted)
  • Is restored when you reinstall gbrain on the same agent
The connection URL is passed to gbrain via the MCP server’s environment config, not as a sandbox-level secret.

Uninstall

This removes the MCP wiring from the core’s config and restarts the gateway. The agent loses access to gbrain tools, but the database is preserved. Reinstalling gbrain on the same agent reconnects to the existing data.

Debugging

Shell into the sandbox to inspect the installation:
Common issues:
  • “missing executable ‘bun’” in gateway logs — the MCP config needs absolute paths (e.g., /home/sandbox/.bun/bin/bun), not bare bun
  • Embedding failures — gbrain uses OpenAI for vector embeddings. If OPENAI_API_KEY is missing from the MCP env config, pages are stored but semantic search won’t work
  • Gateway didn’t pick up MCP — check if the gateway restarted after the wire phase. Run hermes gateway run --replace from the shell to force a restart