DEV Community

sun young
sun young

Posted on

gbrain: a Postgres-native memory layer for your AI agents, now with Chinese docs

gbrain's original repository shows 0 stars, and the Chinese translation at yangshun2005/gbrain-cn was published on 2026-11-10. Those are the numbers as they stand. What follows is about what the project does, how the Chinese version differs from the English README, and where the setup path gets murky.

What gbrain actually stores

The project describes itself as a Postgres-native personal knowledge brain with hybrid RAG retrieval. The phrasing matters. It is not a document index that returns pages ranked by similarity. It stores explicit facts with provenance, supports correction and retraction, and lets several agents read from the same memory.

That distinction shows up in the example the README uses: you ask "what do I need to know before meeting Alice tomorrow" and get an answer, not a list of possibly relevant pages. A retrieval system that returns chunks leaves the synthesis to the model every time. A fact store with correction semantics can hold "Alice moved to the platform team in March" and later mark that fact superseded.

The license is MIT. Self-hosting is free. gbrain.io is the optional paid hosted version.

The Chinese version adds a quick-start layer the original doesn't have

The translated repo keeps the original README body as a faithful translation and adds a separate section at the top labeled 中文快速上手. The translator states plainly that this section is supplementary and not part of the original document. That separation is the right call, and it is the main reason the Chinese version is easier to start with.

What the supplementary section covers:

  • A one-paragraph explanation of the problem gbrain solves, written for someone who has not read the English README yet.
  • A six-step shortest path to the hosted version, with commands copied from docs/install.md.
  • An environment requirements section that is honest about what the original does not specify.
  • A pitfalls section covering cost boundaries, keyless startup, data exposure, and sharing trust boundaries.

The environment section is worth calling out because of how it handles gaps. On operating system support, it says the original does not state which systems are supported. On hardware, it says the original does not give specific requirements, only that self-hosting runs on your own hardware, database, and keys. On Postgres version, it says the specific version requirement is not stated. A translation that invents answers to these questions would be worse than one that flags them.

The hosted path, step by step

The Chinese quick-start gives this sequence for gbrain.io:

curl -sSL https://gbrainio.terminalwire.sh | bash
Enter fullscreen mode Exit fullscreen mode

Then, in a new terminal:

gbrainio terminal connect
gbrainio workspace new
Enter fullscreen mode Exit fullscreen mode

The third command opens a browser flow for plan selection and workspace creation. Next, Bun, unless you already have 1.4.4 or newer:

curl -fsSL https://bun.sh/install | bash
export PATH="$HOME/.bun/bin:$PATH"
Enter fullscreen mode Exit fullscreen mode

Then the CLI itself, without a local brain:

bun install -g github:garrytan/gbrain#stable
Enter fullscreen mode Exit fullscreen mode

And the agent connection, using Claude Code as the example:

(claude mcp get gbrain >/dev/null 2>&1 || claude mcp add --transport http --scope user gbrain https://gbrain.io/mcp) && gbrain setup claude-code --instructions-only
Enter fullscreen mode Exit fullscreen mode

The parenthesized expression checks whether the MCP server is already registered before adding it, so re-running the command is safe.

Self-hosting is the gap in the material

The original README mentions "Install in 30 minutes" for a local brain, but the Chinese quick-start does not contain the full self-hosting command sequence, and says so directly: refer to the README body and docs/install.md. That is a limitation of the translation as published, not a defect in the original.

The dependency picture that can be assembled from the material: Bun is required (references to bun install, bun.lock, bunfig.toml), and Postgres is implied by the "Postgres-native" description plus the presence of docker-compose files. Specific Postgres version requirements are not documented in the source material.

If you are on a network where fetching Bun or GitHub packages is slow, the Chinese README notes that no mirror configuration is mentioned in the original and that you may need to set up acceleration yourself. It does not prescribe a method.

Four things that will bite you

The pitfalls section in the Chinese version is the most useful part of the translation, because most of it is not obvious from a feature list.

Hosted and self-hosted are separate costs. The original states that your harness subscription and any separately configured model API usage are different costs, and that always-on enrichment needs its own compute and API configuration. Running the hosted workspace does not mean your background enrichment is free.

You can start without API keys. The README recommends starting keyless with keyword retrieval, then adding semantic search, synthesis, and background enrichment as needed. This is a reasonable way to evaluate whether the memory model fits your workflow before committing to embedding costs.

Data leaves your machine in ways you might not expect. Configured cloud providers for embedding, reranking, extraction, and synthesis may receive text content. Even in keyless mode, the harness model can see recalled memories. And the Markdown export is explicitly not a complete database backup. If you treat the export as a backup, you will lose data.

Shared access has a trust boundary problem. Local files and shared database credentials sit in different trust boundaries, and source alone does not isolate callers. The README points to the sharing boundaries documentation and the company-brain tutorial before you enable shared access.

Three configuration paths

The original lays out three ways to run this, and the Chinese version translates them without alteration.

  1. Add gbrain to an existing agent. Keep the agent's identity, store memory in its environment. Guides exist for Grok Bot, Muse, and Codex / Claude Code.
  2. Publish the brain across your Tailscale tailnet with gbrain mcp expose, adding --funnel for cloud agents like Grok Bot, Muse, and ChatGPT. The guide is docs/guides/remote-mcp.md.
  3. Connect to an existing hosted brain.

The second path is the one that changes how you use the tool. A brain reachable over MCP from any machine in your tailnet means the same memory serves your laptop agent and a cloud agent, without a sync step.

Where the Chinese translation helps most

The audience that benefits is a Chinese-speaking developer who wants to evaluate gbrain without reading a full English README first. The quick-start gets you to a running hosted workspace in six commands, and the pitfalls section front-loads the cost and data-exposure issues that would otherwise surface after you have already configured things.

The translation is also honest about its own limits. It flags unspecified OS support, unspecified hardware requirements, unspecified Postgres versions, and the missing self-hosting command sequence. For a project with 0 stars and a single translation dated 2026-11-10, that kind of restraint is more useful than a polished but invented setup guide.

My sample here is one README and one translation, and I have not benchmarked retrieval quality or run the self-hosted path end to end. If you need the local brain, the 30-minute claim in the original is the number to test against, and docs/install.md is where the actual commands live.


Chinese documentation: https://github.com/yangshun2005/gbrain-cn

I'm an independent enterprise AI delivery consultant — private LLM deployment, RAG, agent workflows, AIOps. If your team is stuck somewhere in that stack, my inbox is open.

Top comments (0)