# garrytan/gbrain

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/garrytan-gbrain).**

23,848 stars · 3,423 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/garrytan/gbrain
- awesome-repositories: https://awesome-repositories.com/repository/garrytan-gbrain.md

## Description

gbrain is an agent framework and retrieval-augmented generation system that combines a durable task queue, a git-synced vector store, and a knowledge graph engine. It provides a foundation for building AI agents that interact with structured knowledge bases using the Model Context Protocol.

The system synchronizes markdown files from a git repository into a database for high-performance semantic retrieval and creates typed edges between data pages by extracting entity references and wikilinks. It uses a database-backed queue to execute persistent background jobs and tool loops, ensuring reliability and preventing data loss during system failures.

Information retrieval is handled through a hybrid search approach that combines vector embeddings with keyword matching to synthesize cited answers and perform gap analysis. The framework supports the organization of information into a structured knowledge graph using custom schemas derived from filesystem structures.

The project includes tools for benchmarking retrieval quality against standard datasets to evaluate hybrid search performance.

## Tags

### Artificial Intelligence & ML

- [MCP-Connected Frameworks](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/integration-deployment/agent-frameworks/agent-orchestrators/multi-agent-orchestration-frameworks/mcp-connected-frameworks.md) — Provides a framework for AI agents that utilizes the Model Context Protocol to interact with structured knowledge bases.
- [Model Context Protocol Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-assistant-integrations/model-context-protocol-integrations.md) — Exposes internal tools and data to AI agents using the Model Context Protocol for direct interaction.
- [Multi-Protocol Tool Exposures](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-integrations/ai-agent-tool-integrations/multi-protocol-tool-exposures.md) — Exposes internal functions and private data to AI agents via the Model Context Protocol.
- [Knowledge Graph Extraction](https://awesome-repositories.com/f/artificial-intelligence-ml/knowledge-graph-extraction.md) — Automatically generates a typed knowledge graph by extracting entity references and wikilinks from markdown files.
- [Action Function Exposures](https://awesome-repositories.com/f/artificial-intelligence-ml/mcp-servers/action-function-exposures.md) — Exposes internal functions as discoverable tools for AI agents using a standardized Model Context Protocol server. ([source](https://cdn.jsdelivr.net/gh/garrytan/gbrain@master/README.md))
- [RAG Knowledge Management](https://awesome-repositories.com/f/artificial-intelligence-ml/rag-knowledge-management.md) — Implements a RAG system that synchronizes markdown files into a database for semantic retrieval and cited answer synthesis.
- [Hybrid Search Retrievers](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-rag-development/knowledge-base-retrieval/hybrid-search-retrievers.md) — Combines vector embeddings and keyword matching to retrieve relevant pages based on semantic and factual connectivity. ([source](https://cdn.jsdelivr.net/gh/garrytan/gbrain@master/README.md))
- [Agentic Workflow Automation](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-workflow-automation.md) — Runs durable background jobs and tool loops to automate data collection and processing for AI agents.
- [Automated Knowledge Synthesis Tools](https://awesome-repositories.com/f/artificial-intelligence-ml/automated-knowledge-synthesis-tools.md) — Composes cited answers from retrieved data and performs gap analysis to identify missing information or contradictions. ([source](https://cdn.jsdelivr.net/gh/garrytan/gbrain@master/README.md))

### Content Management & Publishing

- [Git-Based Content Management Systems](https://awesome-repositories.com/f/content-management-publishing/git-based-content-management-systems.md) — Utilizes a git repository as the primary record while syncing content to a database for high performance access.

### Data & Databases

- [Hybrid Vector-Keyword Indexing](https://awesome-repositories.com/f/data-databases/hybrid-vector-keyword-indexing.md) — Combines semantic vector embeddings with keyword matching to locate relevant information within a knowledge base.
- [Git-Synchronized](https://awesome-repositories.com/f/data-databases/in-memory-data-stores/vector-stores/git-synchronized.md) — Synchronizes markdown files from a Git repository into a database for fast semantic retrieval.
- [Knowledge Graph Builders](https://awesome-repositories.com/f/data-databases/knowledge-graph-indexers/knowledge-graph-builders.md) — Automatically creates typed edges between pages by extracting entity references from markdown and wikilinks. ([source](https://cdn.jsdelivr.net/gh/garrytan/gbrain@master/README.md))
- [Knowledge Graph Indexing Engines](https://awesome-repositories.com/f/data-databases/knowledge-graph-indexing-engines.md) — Provides an engine that extracts entity references and wikilinks from markdown to build a typed knowledge graph.
- [Hybrid Retrieval](https://awesome-repositories.com/f/data-databases/search-indexing-technologies/search-indexing/search-information-retrieval/hybrid-retrieval.md) — Combines vector search and keyword matching to synthesize cited answers from a knowledge base.
- [Filesystem-Based Schemas](https://awesome-repositories.com/f/data-databases/json-schema-modeling/sample-based-schema-derivation/filesystem-based-schemas.md) — Defines data types and taxonomies based on the physical structure of the underlying file system.
- [Taxonomy Schema Packs](https://awesome-repositories.com/f/data-databases/schema-definitions/taxonomy-schema-packs.md) — Organizes information using customizable schema packs that define page types and taxonomies based on filesystem structure. ([source](https://cdn.jsdelivr.net/gh/garrytan/gbrain@master/README.md))

### Software Engineering & Architecture

- [Git Repository Synchronizers](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/repository-maintenance/project-organization/git-repository-synchronizers.md) — Uses a git repository as the primary record by syncing markdown files into a database. ([source](https://cdn.jsdelivr.net/gh/garrytan/gbrain@master/README.md))
- [Markdown Database Syncs](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/repository-maintenance/project-organization/git-repository-synchronizers/markdown-database-syncs.md) — Syncs markdown files from a git repository into a database for high-performance semantic retrieval.
- [Database-Backed Deferred Queues](https://awesome-repositories.com/f/software-engineering-architecture/database-backed-deferred-queues.md) — Implements a database-backed queue to execute persistent background jobs and shell loops with durability during failures.

### Part of an Awesome List

- [Durable Task Processors](https://awesome-repositories.com/f/awesome-lists/devtools/task-queues/durable-task-processors.md) — Provides a persistent background job processor that executes tool loops and shell commands to prevent data loss.

### Business & Productivity Software

- [Personal Knowledge Management](https://awesome-repositories.com/f/business-productivity-software/personal-knowledge-management.md) — Organizes personal information into a structured knowledge graph using markdown files and custom schemas.

### System Administration & Monitoring

- [Background Job Schedulers](https://awesome-repositories.com/f/system-administration-monitoring/background-job-schedulers.md) — Executes persistent tool loops and shell jobs using a database queue to prevent data loss. ([source](https://cdn.jsdelivr.net/gh/garrytan/gbrain@master/README.md))
