Gigabrain

Gigabrain

A local-first memory control plane for AI agents, providing auditable recall via MCP with provenance and contradiction handling.

Category
访问服务器

README

Gigabrain

<p align="center"> <strong>One shared memory for your AI assistants, under your control.</strong> </p>

<p align="center"> <a href="https://github.com/legendaryvibecoder/gigabrain/releases"><img src="https://img.shields.io/github/v/release/legendaryvibecoder/gigabrain?include_prereleases&style=for-the-badge" alt="GitHub release"></a> <a href="https://www.npmjs.com/package/@legendaryvibecoder/gigabrain"><img src="https://img.shields.io/npm/v/@legendaryvibecoder/gigabrain?style=for-the-badge" alt="npm version"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a> <a href="https://github.com/legendaryvibecoder/gigabrain/stargazers"><img src="https://img.shields.io/github/stars/legendaryvibecoder/gigabrain?style=for-the-badge" alt="GitHub Stars"></a> <img src="https://img.shields.io/badge/local--first-by%20default-brightgreen?style=for-the-badge" alt="Local-first by default"> </p>

<p align="center"> <a href="docs/configuration.md">Configuration</a> · <a href="CHANGELOG.md">Changelog</a> · <a href="CONTRIBUTING.md">Contributing</a> · <a href="SECURITY.md">Security</a> · <a href="https://github.com/legendaryvibecoder/gigabrain/discussions">Discussions</a> </p>


Why this exists

Each AI assistant keeps a separate memory of your work, so one assistant can miss a decision that you made with another. You then explain the same facts again. Old information can also guide new work.

When a Codex session moves an app from Stripe to Paddle, Claude Code can still hold the old Stripe record. A later billing change can then use Stripe code.

What Gigabrain does

Gigabrain keeps one local record for supported AI assistants.

  • Read supported memory files. Gigabrain adds the facts that it finds to the shared record. It keeps each source file unchanged.
  • Keep the source and dates. You can check where a fact came from and when it entered the store.
  • Show conflicts. Gigabrain applies documented rules when two records disagree about the same fact. It gives more weight to strong support and recent evidence, then keeps the decision history.
  • Store data on your computer. The default memory store stays on your computer. You choose each optional connection.

Gigabrain works beside each assistant's built-in memory as a shared record that you can inspect or correct. Use an export when you want to move it.

Quickstart

These commands install the package, connect a project, check the setup, and write an audit report. All supported imports stay read-only.

npm install @legendaryvibecoder/gigabrain
npx gigabrainctl init --project-root /path/to/repo
npx gigabrainctl doctor --config ~/.gigabrain/config.json --target both
npx gigabrainctl handoff --config ~/.gigabrain/config.json \
  --output-dir ./gigabrain-memory-audit

init writes the configuration to ~/.gigabrain/config.json. The other commands and assistant setups use this file. Read the audit report before you enable a feature from the configuration guide.

Open the guide for your assistant: Codex · Claude Code · OpenClaw.

Limits and safeguards

  • Memories in ChatGPT, Claude.ai, Gemini, and Copilot stay in those accounts. Gigabrain can import a supported file after you export it.
  • A laptop and a desktop use separate stores. Use a reviewed bundle or a configured connection when you want to move data between them. See the sharing guide.
  • Gigabrain ranks evidence with documented rules and lets you inspect or change the result.
  • The local store can contain sensitive data. Protect the computer and review every export before you move it. Read the privacy guide.

The configuration guide describes every setting and optional feature.


Technical reference

Core behavior

  • Shared recall with clear scope: Codex, Claude Code, Hermes, and OpenClaw can share project facts and stable user preferences when they use the same Gigabrain configuration.
  • Source record: Each claim keeps its source host, path, evidence, time data, status, and trust tier.
  • Conflict rules: Gigabrain checks source trust first. It then checks independent support. Recency resolves the final tie. An append-only record keeps each decision.
  • Time model: A fact can have a content time and a validity window. Normal recall skips expired or superseded rows.
  • Audit tools: Optional tools can recover transcripts, filter secret risks, manage review queues, write Handoff Records, and build a memory wiki.
  • Local operation: The default setup runs locally, where SQLite stores the data and lexical search finds it. Policy checks control each result. A cloud memory service is optional.

Processing flow

  1. Ingest: Add supported local memory files, explicit checkpoints, and manual exports to a local event store.
  2. Build the current view: Write the latest state to SQLite and keep its source and validity data.
  3. Resolve conflicts: Apply reviewable rules to duplicate or conflicting claims. A queue holds uncertain changes that can remove data.
  4. Serve recall: Use lexical search through MCP, the CLI, or authenticated HTTP. Loopback Ollama embeddings are optional.
   Codex   Claude   Cursor   OpenClaw   Hermes   manual exports
     └────────┴────────┴─────────┴─────────┴──────────────┘
                              │   (supported imports are read-only)
                              ▼
                    ┌────────────────────┐
                    │      Gigabrain     │   capture · resolve · recall
                    │ arbitration ledger │   MCP · CLI · HTTP
                    └─────────┬──────────┘
                              │  recall with sources after conflict checks
                              ▼
                  any configured agent uses gigabrain_recall

Release highlights

What it means for you
Answer-focused recall Recall selects evidence that can answer questions about duration, completion, or certification. Unrelated preferences rank lower.
Conflict checks during import Gigabrain checks conflicts during import and during maintenance. Risky changes wait for review.
Local host imports Gigabrain can inspect and import supported local data from Codex, Claude Code, Hermes, Cursor, and Windsurf. Each imported fact keeps its source.
Portable handoff Export and import bundles use integrity hashes. Data moves only when you run the export and import commands.
Privacy check for releases The release check scans Git files and the npm package contents. It blocks unknown binary files and redacts each finding.
Secured local console Runtime tests cover authentication, scope rules, path limits, security headers, and dependency checks.

The cloud inbox, transcript recovery, Git wiki, Obsidian reference set, remote bridge, and URL importer start disabled. Read the configuration guide and privacy model before you add a data source or network provider.

Supported clients

Host surface Install What Gigabrain handles
OpenClaw openclaw plugins install Provides an optional memory slot, registry, recall, conflict checks, and maintenance
Codex desktop, CLI, or IDE npm install and setup Keeps the local project and user store on the configured Codex host. It also provides MCP tools.
Claude Code npm install and setup Uses the same standalone store when its configuration matches. Setup adds MCP tools and .mcp.json entries.
Claude Desktop claude:desktop:bundle Uses the same MCP-backed memory store and tools as Claude Code
Hermes Agent gigabrain-hermes-setup Adds MCP tools and imports local Hermes memory files in read-only mode
Cursor or Windsurf gigabrainctl sync-hosts Imports local project rules and memory in read-only mode
Cloud assistants Explicit file import Parses supported ChatGPT, Gemini, or Copilot files after you export them

Privacy model

  • Gigabrain keeps the standalone SQLite store under ~/.gigabrain/. A hosted Gigabrain service is optional.
  • The default LLM provider setting is none. Optional semantic embeddings go only to a loopback Ollama endpoint.
  • Gigabrain extracts raw transcripts through a local provider or a local hook that you add. A cloud audit excludes rows that can contain credentials. Before data leaves the computer, Gigabrain masks supported PII patterns and removes the original scope.
  • Native host stores use read-only import. To add a supported memory file from a cloud account, export it first.
  • Enable each network feature before use. The remote bridge is opt-in. For URL import, the Python console requires an exact host allowlist and an explicit setting.
  • The release gate scans all publishable files, the npm package contents, Git data, and GitHub data. Its output hides matched values.

The SQLite store and generated Markdown can contain sensitive memory. Protect the host account, use disk encryption, restrict file permissions, and review each export before you move it. Read the full boundary in the privacy model.

How it works under the hood

Conversation (OpenClaw / Codex / Claude Code / Claude Desktop)
               │
               ▼
┌──────────────────────────────────┐
│           Gigabrain              │
│   (memory layer + MCP server)   │
├──────────────────────────────────┤
│  Capture ─► Policy ─► Registry  │
│  Recall  ◄─ Orchestrator        │
│  Host Sync ◄─ Codex/Claude/etc. │  ← read-only adapters
│  Transcript Harvester ◄─ logs   │  ← optional recovery
│  Arbiter (trust>support>recency)│  ← at ingest + nightly
│  World Model (entities/beliefs) │
│  Git Wiki ◄─► reviewed edits    │  ← optional, high trust
└──────────────┬───────────────────┘
               │
         SQLite + FTS5 + optional local embeddings
  • Capture: Explicit remember calls, checkpoints, host imports, and optional transcript recovery become append-only events.
  • Recall: FTS5 and BM25 search text directly. When local embeddings are available, Gigabrain combines lexical and dense rankings. It then applies scope, status, answer fit, source data, and conflict rules.
  • Conflict review: The world model records competing beliefs for each claim slot and ranks them by trust tier. It next checks independent support. Recency resolves any remaining tie. Clock-skew and source-independence checks protect the result.
  • Audit reports: Static Markdown, HTML, and JSON reports show readiness, source coverage, conflicts, stale rows, and omitted secret risks.

The published evidence comes from a small development regression set. The benchmark evidence page describes its limits.

Why use it when native memory exists?

Several assistants provide useful native memory. Codex has local memories, Claude Code has auto memory, Cursor has project memories, and OpenClaw has hybrid memory search. Each product documents a different scope. Some stores stay on one machine or inside one product.

Gigabrain keeps source data across products and separates project facts from user preferences. Fixed rules resolve conflicts. Validity dates control when each fact applies. You can move the record with an export and audit the protocol independently. The detailed comparison maps these features to native memory.

MCP tools

gigabrain_recall · gigabrain_remember · gigabrain_checkpoint · gigabrain_provenance · gigabrain_recent · gigabrain_sources · gigabrain_sync_status · gigabrain_export_brief · gigabrain_entity · gigabrain_relationships · gigabrain_contradictions · gigabrain_arbitrate · gigabrain_adjudications · gigabrain_beliefs_as_of · gigabrain_review_queue · gigabrain_doctor

The coverage matrix lists each action and its available interface.

CLI

npx gigabrainctl init                       # Find and connect installed agents
npx gigabrainctl handoff --output-dir ./out # Write a memory audit and safe Handoff Records
npx gigabrainctl nightly                    # Run the nightly import, conflict check, and audit
npx gigabrainctl doctor                     # Check system health
npx gigabrainctl inventory                  # Show memory statistics
npx gigabrainctl review contradictions      # Review conflicts across agents
npx gigabrainctl sync-hosts --host codex,claude_code  # Import a host again
npx gigabrainctl vault sync|status          # Use the read-only Obsidian reference set
npx gigabrainctl transcript sync|status     # Recover raw local transcripts
npx gigabrainctl wiki project|reconcile|status  # Manage the Git versioned memory wiki
npx gigabrainctl watch --install-hook --kind=session  # Capture at the end of a session
npx gigabrainctl export-bundle --out ./memory-bundle.json
npx gigabrainctl import-bundle --in ./memory-bundle.json
npx gigabrainctl migrate legacy-drop --dry-run  # Preview legacy cleanup

All commands accept --config <path> and are also available as npm run scripts.

HTTP endpoints

Method Path Auth Description
GET /gb No Service landing response
GET /gb/health No Health check
POST /gb/bench/recall Token Recall result plus benchmark diagnostics
POST /gb/control/apply Token Mutating: apply an explicit memory action
GET /gb/entities Token List world-model entities
GET /gb/entities/:id Token Entity detail (/gb/entities/detail?id=... is also accepted)
GET /gb/beliefs Token List beliefs
GET /gb/episodes Token List episodes
GET /gb/open-loops Token List open loops
GET /gb/contradictions Token List contradiction-review items
GET /gb/adjudications Token List arbitration verdicts
GET /gb/beliefs-as-of Token Bi-temporal belief snapshot
GET /gb/review-queue Token Read-only review queue
GET /gb/relationships Token Relationship graph for an entity
GET /gb/evolution Token Entity evolution by claim slot
GET /gb/memory/:id/timeline Token Event timeline for a memory
POST /gb/recall Token Memory recall for a query
POST /gb/recall/explain Token Recall diagnostics and routing explanation
POST /gb/suggestions Token Mutating: validate and ingest structured suggestions

/gb and /gb/health return service status only. Every data route accepts X-GB-Token, X-OpenClaw-Token, or a Bearer token. A route denies access when its configuration has no token. The dangerous development setting GB_ALLOW_NO_AUTH=1 can bypass Node route checks only when no token is configured. It prints a warning. Use this setting only in a disposable loopback environment. OpenClaw gateway authentication can add an outer layer.

Key subsystems

Subsystem Docs
Memory Audit + Handoff Records docs/handoff-record.md
Surface coverage matrix (MCP / CLI / HTTP) docs/coverage-matrix.md
Configuration reference docs/configuration.md
Privacy and trust boundaries docs/public/privacy-model.md
Public security review docs/public/security-review.md
Native-memory comparison docs/public/why-gigabrain.md
Benchmark evidence docs/public/benchmark-evidence.md
Recall pipeline docs/recall.md
Nightly maintenance docs/maintenance.md
Obsidian vault reference docs/obsidian.md

Prerequisites

  • Node.js 22.18.0 or later. Gigabrain uses node:sqlite and built-in TypeScript type stripping.
  • Ollama is optional. It provides local fact extraction and semantic search.
  • OpenClaw 2026.2.15 or later is required for the plugin path.
  • Python 3.10 or later is required for the optional web console.

Testing

node tests/run-all.js     # Run the repository tests
node scripts/package-smoke.js  # Test the packaged runtime
npm run pack:dry-run     # Check the published package contents
node scripts/check-no-pii.mjs
node scripts/check-public-mirror.mjs --require-single-commit  # Check the public mirror
npm run audit:github-metadata -- --repo owner/repository     # Check a new remote

Security

  • Node HTTP endpoints that carry data require a token by default. The code compares tokens with timing-safe logic. A Node token grants access to its configured store, where scope filters recall and queries. The optional FastAPI console isolates scoped tokens and conceals whether an ID exists. Limit GB_ALLOW_NO_AUTH=1 to the development use described above.
  • The optional web console listens on loopback as documented. It sets security headers and limits uploads. Extracted PDF text also has a size limit. URL import starts disabled.
  • Release checks run npm audit and pip-audit against dependencies. The security review gives the date, result, and remaining risks.
  • An explicit allowlist creates the public mirror with a new single-commit history. The private engineering repository stays private.

Report vulnerabilities through the private process in SECURITY.md.

Contributing

Read CONTRIBUTING.md before you send a change. Report a concrete bug in Issues, or use Discussions for design and usage questions. Remove private data from every post, including secrets, local paths, identifiers, and runtime files.

License

MIT License. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选