-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Rick Hightower edited this page Feb 2, 2026
·
5 revisions
A production-grade RAG (Retrieval-Augmented Generation) document indexing and semantic search system designed for AI agents and applications.
Agent Brain is a monorepo containing four packages:
| Package | Description |
|---|---|
| agent-brain-server | FastAPI REST API for document indexing and semantic search |
| agent-brain-cli | Command-line interface for managing the server |
| agent-brain-skill | Claude Code skill for AI-powered documentation queries |
| agent-brain-plugin | Claude Code plugin with 24 commands, 3 agents, and 2 skills |
- Hybrid Search: Combines semantic (Vector) + keyword (BM25) with tunable alpha weighting
- GraphRAG (NEW): Knowledge graph-based retrieval with entity relationships
- Multi-Mode Search: VECTOR, BM25, HYBRID, GRAPH, and MULTI (RRF fusion)
- AST-Aware Code Indexing: 9+ languages with tree-sitter parsing
- Embedding Providers: OpenAI, Ollama, Cohere
- Summarization Providers: Anthropic, OpenAI, Gemini, Grok, Ollama
- Fully Local Mode: Run completely offline with Ollama
- Multi-Instance Architecture: Per-project isolation with automatic port allocation
- Singleton Services: Shared service instances for efficiency
- Async Throughout: All I/O operations are async for performance
- REST API: Full OpenAPI-documented REST interface
- Claude Code Plugin: 24 commands for complete workflow integration
- Knowledge Agents: Specialized agents for research tasks
# Install the CLI
pip install agent-brain-cli
# Initialize project
agent-brain init
# Start server
agent-brain start
# Index your codebase
agent-brain index .
# Query with semantic search
agent-brain query "how does authentication work"
# Query with GraphRAG (requires ENABLE_GRAPH_INDEX=true)
agent-brain query "what uses UserService" --mode graph- User-Guide - End-user documentation
- Quick-Start - Get started quickly
- Developer-Guide - Development setup guide
- Architecture-Overview - System architecture overview
- Design-Overview - Complete design documentation index
- Diagrams-Index - Index of all 93 architecture diagrams
- Design-Architecture-Overview - C4 diagrams and component architecture
- Design-Query-Architecture - Query routing and search modes
- Design-Storage-Architecture - ChromaDB, BM25, and graph storage
- Design-Class-Diagrams - Service classes and interfaces
- Design-Query-Sequences - Sequence diagrams for all query modes
- GraphRAG-Guide - Complete GraphRAG explanation
- Design-Indexing-Pipeline - Document and code indexing flow
- Design-Indexing-Sequences - Indexing sequence diagrams
- Code-Indexing-Guide - AST-aware multi-language indexing
- Design-Deployment-Architecture - Local, Docker, Kubernetes deployments
- Design-Deployment-Diagram - PlantUML deployment diagrams
- Design-Package-Diagrams - Package structure diagrams
- Design-Component-Diagrams - Component interaction diagrams
- Deployment-Guide - Deployment options and configuration
- Design-Server-States - Server lifecycle state diagrams
- Design-CLI-Sequences - CLI command sequence flows
- Configuration-Reference - All configuration options
- API-Reference - Complete REST API documentation
- Agent-Skill-API-Reference - Skill API documentation
- Agent-Skill-Vector-Search-Guide - Vector (semantic) search
- Agent-Skill-BM25-Search-Guide - Keyword search
- Agent-Skill-Hybrid-Search-Guide - Hybrid search
- Agent-Skill-Graph-Search-Guide - GraphRAG search
- Agent-Skill-Provider-Configuration - Configure embedding and summarization providers
- Agent-Skill-Installation-Guide - Installation and setup
- Agent-Skill-Interactive-Setup - Interactive setup guide
- Agent-Skill-Version-Management - Version management
- Plugin-Guide - Complete plugin documentation
- Plugin-README - Plugin installation guide
- Agent-Skill-Definition - Claude Code skill definition
- Agent-Skill-Integration-Guide - Integration patterns
- Agent-Skill-Server-Discovery-Guide - Server auto-discovery
- Agent-Skill-Troubleshooting-Guide - Troubleshooting guide
| Command | Description |
|---|---|
| Command-Search | Multi-mode search with automatic mode selection |
| Command-Semantic | Pure vector/semantic search |
| Command-Keyword | Alias for BM25 keyword search |
| Command-BM25 | BM25 keyword search |
| Command-Vector | Vector (semantic) search |
| Command-Hybrid | Hybrid search (BM25 + Vector) |
| Command-Graph | GraphRAG knowledge graph search |
| Command-Multi | Multi-mode RRF fusion search |
| Command | Description |
|---|---|
| Command-Start | Start the Agent Brain server |
| Command-Stop | Stop the running server |
| Command-Status | Check server status |
| Command-List | List running Agent Brain instances |
| Command-Index | Index documents or code |
| Command-Reset | Reset/clear the index |
| Command | Description |
|---|---|
| Command-Init | Initialize project for Agent Brain |
| Command-Install | Install Agent Brain CLI |
| Command-Setup | Interactive setup wizard |
| Command-Config | Configure settings |
| Command-Verify | Verify configuration |
| Command-Help | Show help |
| Command-Version | Show version information |
| Command | Description |
|---|---|
| Command-Providers | List and configure providers |
| Command-Embeddings | Configure embedding provider |
| Command-Summarizer | Configure summarization provider |
| Agent | Description |
|---|---|
| Agent-Search-Assistant | Intelligent search assistant for complex queries |
| Agent-Setup-Assistant | Guided setup and configuration assistant |
| Agent-Research-Assistant | Research assistant for deep exploration |
- Pluggable-Providers-Spec - Pluggable provider specification
- Pluggable-Providers-Plan - Implementation plan
- Pluggable-Providers-Tasks - Implementation tasks
- Pluggable-Providers-Quickstart - Provider quickstart guide
- Pluggable-Providers-Research - Research notes
- Pluggable-Providers-Data-Model - Data model
- Multi-Instance-Architecture-Spec - Per-project isolation specification
- Multi-Instance-Architecture-Plan - Implementation plan
- Multi-Instance-Architecture-Tasks - Implementation tasks
- Multi-Instance-Architecture-Quickstart - Quickstart guide
- Multi-Instance-Architecture-Research - Research notes
- Multi-Instance-Architecture-Data-Model - Data model
- GraphRAG-Integration-Spec - Knowledge graph integration specification
- GraphRAG-Integration-Plan - Implementation plan
- GraphRAG-Integration-Tasks - Implementation tasks
- GraphRAG-Integration-Quickstart - Quickstart guide
- GraphRAG-Integration-Research - Research notes
- GraphRAG-Integration-Data-Model - Data model
- Agent-Brain-Plugin-Spec - Plugin specification
- Agent-Brain-Plugin-Plan - Implementation plan
- Agent-Brain-Plugin-Tasks - Implementation tasks
- Agent-Brain-Plugin-Quickstart - Quickstart guide
- Agent-Brain-Plugin-Research - Research notes
- Agent-Brain-Plugin-Data-Model - Data model
- Product-Roadmap - Product roadmap and future plans
- Specification-Mapping - Feature specification mapping
- E2E-Testing-Plan - End-to-end testing plan
- GraphRAG-Integration-Plan - GraphRAG integration plan
- Migration-Guide - Migration from doc-serve to Agent Brain
- Original-Specification - Original project specification
| Mode | Algorithm | Best For |
|---|---|---|
VECTOR |
Cosine similarity | Conceptual queries, "how does X work" |
BM25 |
TF-IDF + BM25 | Exact terms, error messages, symbols |
HYBRID |
Vector + BM25 (alpha blend) | General search (default) |
GRAPH |
Knowledge graph traversal | Entity relationships |
MULTI |
RRF over all modes | Maximum recall |
| Provider | Models | Local |
|---|---|---|
| OpenAI | text-embedding-3-large, text-embedding-3-small | No |
| Ollama | nomic-embed-text, mxbai-embed-large | Yes |
| Cohere | embed-english-v3.0, embed-multilingual-v3.0 | No |
| Provider | Models | Local |
|---|---|---|
| Anthropic | claude-haiku-4-5-20251001, claude-sonnet-4-5-20250514 | No |
| OpenAI | gpt-5, gpt-5-mini | No |
| Gemini | gemini-3-flash, gemini-3-pro | No |
| Grok | grok-4, grok-4-fast | No |
| Ollama | llama4:scout, mistral-small3.2, qwen3-coder | Yes |
- Server: FastAPI + Uvicorn
- Vector Store: ChromaDB (HNSW, cosine similarity)
- BM25 Index: LlamaIndex BM25Retriever
- Graph Store: SimplePropertyGraphStore / Kuzu
- Embeddings: OpenAI text-embedding-3-large (3072 dimensions) or Ollama
- Summarization: Claude Haiku or Ollama
- AST Parsing: tree-sitter (9+ languages)
- CLI: Click + Rich
- Build System: Poetry
See the Developer-Guide for setup instructions.
Before pushing changes, always run:
task before-pushMIT License - see LICENSE file for details.
- Design-Architecture-Overview
- Design-Query-Architecture
- Design-Storage-Architecture
- Design-Class-Diagrams
- GraphRAG-Guide
- Agent-Skill-Hybrid-Search-Guide
- Agent-Skill-Graph-Search-Guide
- Agent-Skill-Vector-Search-Guide
- Agent-Skill-BM25-Search-Guide
Search
Server
Setup
- Pluggable-Providers-Spec
- GraphRAG-Integration-Spec
- Agent-Brain-Plugin-Spec
- Multi-Instance-Architecture-Spec