Logo van Agent Brain

Agent Brain

Organisatie
SpillwaveSolutions

Local-first RAG memory for AI agents: hybrid + GraphRAG search, MCP server with OAuth 2.1, plugin for Claude Code / OpenCode / Codex.

UitgeverSpillwaveSolutions
Repositoryagent-brain
TaalPython
Forks
23
Sterren
119
Beschikbare tools
0
Transporttypestdio
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    Agent Brain biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    119 sterren en 23 forks in de gekoppelde repository.


last_validated: 2026-03-16

Agent Brain

A RAG-based (Retrieval-Augmented Generation) document indexing and semantic search system for AI agents and applications. Agent Brain enables intelligent querying of documentation and source code using natural language.

Overview

Agent Brain provides AI-first document and code search through a Claude Code plugin with skills, commands, and agents. Use slash commands to search, agents for complex research tasks, and skills for intelligent query optimization.

ComponentDescription
Plugin30 slash commands, 3 agents, 2 skills for Claude Code
SkillsIntelligent search mode selection and query optimization
AgentsResearch assistant, search assistant, setup assistant
ServerFastAPI backend for indexing and retrieval
CLICommand-line tool (also used by plugin internally)

Quick Start (Claude Code Plugin)

1. Install the Plugin

bash
# 1. Add the Agent Brain marketplace (the repo is a plugin marketplace)
claude plugins marketplace add SpillwaveSolutions/agent-brain

# 2. Install the plugin from that marketplace
claude plugins install agent-brain@agent-brain-marketplace

Installing a Claude Code plugin does not use pip. The plugin is installed through the marketplace above; the underlying Python packages (agent-brain-rag, agent-brain-cli) are installed for you by the /agent-brain-setup wizard (or manually via pip — see CLI Usage).

Other hosts

The same plugin installs into Codex, Cursor, Grok Build, and OpenCode through the CLI. Each command converts the shared payload into the host's native layout and, with --with-mcp, registers the MCP server in that host's config file.

bash
pip install agent-brain-rag agent-brain-cli agent-brain-ag-mcp
agent-brain install-agent --agent codex --with-mcp     # .codex/skills/agent-brain + AGENTS.md; MCP in ~/.codex/config.toml
agent-brain install-agent --agent cursor --with-mcp    # .cursor/plugins/agent-brain + .cursor/rules; MCP in .cursor/mcp.json
agent-brain install-agent --agent grok --with-mcp      # .grok/plugins/agent-brain; zero-config Claude load, MCP in .mcp.json
agent-brain install-agent --agent opencode --with-mcp  # .opencode/plugins/agent-brain; MCP in opencode.json

A conforming Agent Plugins 1.0 client reads agent-brain-plugin/plugin.json, skills/, and mcp.json directly. See docs/HOSTS.md for the manifest each host reads.

2. Set Up Your Project

In Claude Code, run:

/agent-brain-setup

This interactive wizard will:

  • Install the Python packages (agent-brain-rag, agent-brain-cli)
  • Configure your API keys
  • Initialize the project
  • Start the server
  • Index your documentation

3. Search with Commands

/agent-brain-search "how does authentication work"

That's it! The plugin handles everything automatically.

Plugin Commands

Search Commands

CommandDescriptionUse When
/agent-brain-searchSmart hybrid search (recommended)General questions
/agent-brain-semanticPure semantic/vector searchConceptual queries
/agent-brain-keywordBM25 keyword searchError messages, function names
/agent-brain-hybridHybrid with alpha tuningFine-tuned searches
/agent-brain-graphKnowledge graph search"What calls X?", dependencies
/agent-brain-multiAll modes combined (RRF)Maximum recall

Server Commands

CommandDescription
/agent-brain-startStart the server (auto-port)
/agent-brain-stopStop the server
/agent-brain-statusCheck health and document count
/agent-brain-indexIndex documents or code

Setup Commands

CommandDescription
/agent-brain-setupComplete guided setup wizard
/agent-brain-installInstall pip packages
/agent-brain-initInitialize project directory
/agent-brain-verifyVerify configuration
/agent-brain-providersConfigure embedding/summarization providers

Plugin Agents

Agent Brain includes three intelligent agents for complex tasks:

AgentDescriptionTriggered By
Search AssistantMulti-step search across modes, synthesizes answers"Find all references to...", "Research how..."
Research AssistantDeep exploration with follow-up queries"Investigate...", "Analyze the architecture of..."
Setup AssistantGuided installation and troubleshooting"Help me set up Agent Brain", configuration issues

Example Agent Interaction

You: "Research how authentication is implemented across the codebase"

Research Assistant:

  1. Searches documentation for auth concepts
  2. Queries code for auth-related functions
  3. Uses graph mode to find dependencies
  4. Synthesizes comprehensive answer with references

Plugin Skills

Skills provide intelligent context to Claude for optimal searching:

SkillPurpose
using-agent-brainSearch mode selection, query optimization, API knowledge
configuring-agent-brainInstallation, provider configuration, troubleshooting

When you ask about documentation or code, Claude automatically uses the skill to:

  • Choose the best search mode for your query
  • Set appropriate parameters (top_k, threshold, alpha)
  • Interpret and synthesize results

Search Modes

ModeBest ForExample Query
HYBRIDGeneral questions (default)"How does caching work?"
VECTORConceptual understanding"Explain the architecture"
BM25Exact terms, error codes"NullPointerException", "getUserById"
GRAPHRelationships, dependencies"What classes use AuthService?"
MULTIComprehensive search"Everything about data validation"

Pluggable Providers

Agent Brain supports multiple providers for embeddings and summarization:

Embedding Providers

ProviderModelsLocal
OpenAItext-embedding-3-large, text-embedding-3-smallNo
Ollamanomic-embed-text, mxbai-embed-largeYes
Cohereembed-english-v3.0, embed-multilingual-v3.0No

Summarization Providers

ProviderModelsLocal
Anthropicclaude-haiku-4-5-20251001, claude-sonnet-4-5-20250514No
OpenAIgpt-5, gpt-5-miniNo
Geminigemini-3-flash, gemini-3-proNo
Grokgrok-4, grok-4-fastNo
Ollamallama4:scout, mistral-small3.2, qwen3-coderYes

Fully Local Mode

Run completely offline with Ollama:

/agent-brain-providers
# Select Ollama for both embeddings and summarization

Features

Code Search

  • 10 Programming Languages: Python, TypeScript, JavaScript, Java, Kotlin, C, C++, C#, Go, Rust, Swift
  • AST-Aware Chunking: Tree-sitter parsing preserves code structure
  • LLM Summaries: AI-generated descriptions improve semantic search
  • Language Filtering: Filter results by programming language

GraphRAG (Knowledge Graph)

  • Entity and relationship extraction
  • Dependency-aware queries ("What calls X?")
  • Code structure visualization

Multi-Instance Architecture

  • Per-project isolated servers
  • Automatic port allocation
  • Work on multiple projects simultaneously

Project Structure

agent-brain/
├── agent-brain-plugin/        # Claude Code plugin (primary interface)
│   ├── commands/              # 30 slash commands
│   ├── agents/                # 3 intelligent agents
│   └── skills/                # 2 context skills
├── agent-brain-server/        # FastAPI backend
├── agent-brain-cli/           # CLI tool (used by plugin)
└── docs/                      # Documentation

Documentation

Getting Started

Reference

Architecture

CLI Usage (Alternative)

While the plugin is the recommended interface, you can also use the CLI directly:

bash
# Install
pip install agent-brain-rag agent-brain-cli

# Initialize and start
agent-brain init                     # auto-generates a per-project API key
agent-brain start --daemon

# Index and query
agent-brain index /path/to/docs --include-code
agent-brain query "authentication" --mode hybrid

Note on authentication. As of the next release, every data endpoint requires X-API-Key. agent-brain init writes a 32-byte urlsafe key into .agent-brain/config.json (mode 0o600); the CLI and agent-brain-mcp pick it up automatically. Pass --no-api-key to agent-brain init for the legacy no-auth experience on 127.0.0.1. The server refuses to start on any non-loopback bind without a key set. See docs/CHANGELOG.md under the unreleased entry for the full design (Issue #179).

Development

Prerequisites

  • Python 3.10+
  • Poetry (dependency management)
  • Task (task runner)

Setup

bash
git clone https://github.com/SpillwaveSolutions/agent-brain.git
cd agent-brain
task install

Running Tests

bash
task test           # All tests
task before-push    # Full quality check

Technology Stack

  • Plugin: Claude Code slash commands, agents, skills
  • Server: FastAPI + Uvicorn
  • Vector Store: ChromaDB (HNSW, cosine similarity)
  • BM25 Index: LlamaIndex BM25Retriever
  • Graph Store: SimplePropertyGraphStore / Kuzu
  • Embeddings: OpenAI or Ollama
  • Summarization: Claude, GPT-5, Gemini, Grok, or Ollama
  • AST Parsing: tree-sitter (10 languages)
  • CLI: Click + Rich
  • Build System: Poetry

Contributing

See the Developer Guide for setup instructions.

Before pushing changes, always run:

bash
task before-push

License

MIT License - see LICENSE file for details.

Links

Gebruik Agent Brain MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Agent Brain is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Agent Brain toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Agent Brain.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "agent-brain": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Agent Brain in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Agent Brain in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Agent Brain gebruiken om me hiermee te helpen?
Agent Brain
Zeker. Ik heb het gelezen.
Dit vond ik met Agent Brain.

Veelgestelde vragen

Waarvoor wordt de MCP-server Agent Brain gebruikt?

Agent Brain is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Agent Brain MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Agent Brain gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Agent Brain MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Agent Brain verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Agent Brain MCP met TypingMind?

Agent Brain werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Agent Brain MCP in TypingMind?

Agent Brain biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Agent Brain MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Agent Brain authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇