Agent skill

Configuring Agent Brain

by SpillwaveSolutions in SpillwaveSolutions/agent-brain

Installation and configuration skill for Agent Brain document search system.

MITAuto-check: notesAI & LLM Engineering

Install Configuring Agent Brain

skills CLI
$ npx skills add SpillwaveSolutions/agent-brain --skill configuring-agent-brain -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SpillwaveSolutions/agent-brain configuring-agent-brain --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SpillwaveSolutions/agent-brain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agent-brain-plugin/skills/configuring-agent-brain .claude/skills/configuring-agent-brain && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
configuring-agent-brain
GitHub stars
120
Token cost
~7k tokens
SKILL.md length
2,160 words
Files
6 (incl. references)
Skills in repo
55
Repo updated
First seen
Licence
MIT

At a glance

Installation and configuration skill for Agent Brain document search system.

  • Works in 4 steps: Project-level: .agent-brain/config.yaml → User-level: ~/.agent-brain/config.yaml → XDG config:… → …
  • Asked to install agent brain
  • SKILL.md covers Contents, Multi-Runtime Support, Quick Setup and Setup Wizard, plus 4 more sections
  • Calls pip, ollama and python; reaches api.openai.com; needs OPENAI_API_KEY and ANTHROPIC_API_KEY

What it does

Configuring Agent Brain is an agent skill from SpillwaveSolutions/agent-brain. Installation and configuration skill for Agent Brain document search system. Use when asked to "install agent brain", "setup agent brain", "configure agent brain", "setting up document search", "installing agent-brain packages", "configuring API keys", "initializing project for search", "troubleshooting agent brain", "pip install agent-brain", "agent brain not working", "agent brain setup error", "configure embeddings provider", "setup ollama for agent brain", "agent brain environment variables", "install agent…

Its SKILL.md is about 7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/configuration-guide.md`, `references/installation-guide.md` and `references/mcp-setup-guide.md`).

It sits in AI & LLM Engineering, covering Embeddings, LLM inference and serving and MCP servers. It works with Model Context Protocol and Ollama. The repository describes itself as: Local-first RAG memory for AI agents: hybrid + GraphRAG search, MCP server with OAuth 2.1, plugin for Claude Code / OpenCode / Codex. The licence is MIT.

When your agent uses it

  • Asked to install agent brain
  • Setup agent brain
  • Configure agent brain
  • Setting up document search

Example prompts

  • “install agent brain”
  • “setup agent brain”
  • “configure agent brain”
  • “/configuring-agent-brain”

Requirements

  • Python 3
  • A credential in OPENAI_API_KEY
  • A credential in ANTHROPIC_API_KEY
  • Pre-approved tools (allowed-tools): Bash, Read

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Project-level: .agent-brain/config.yaml
  2. User-level: ~/.agent-brain/config.yaml
  3. XDG config: ~/.config/agent-brain/config.yaml
  4. Current directory: ./config.yaml or ./agent-brain.yaml

What it can do on your machine

Read from SKILL.md and the folder at commit 8339623. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash
    • Read

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • pip
    • ollama
    • python
    • curl
    • brew
    • pipx
    • uv
    • jq

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.openai.com

    Also links to:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY
    • ANTHROPIC_API_KEY
    • GOOGLE_API_KEY
    • COHERE_API_KEY
    • XAI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Configuring Agent Brain loads about 7k tokens when it runs, and up to ~21k if it reads all its reference files. Until then it costs about 185 tokens; SKILL.md has 2,160 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~185
When it runs · the whole SKILL.md, loaded when a task matches
~7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~21k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:226
    Add the same values to your `.env` if you prefer file-based config.
  • NoteRuns commands with sudoSKILL.md:247
    # DO NOT use sudo with pip
  • NoteRuns commands with sudoSKILL.md:248
    sudo pip install agent-brain-rag  # Wrong - creates permission issues
  • NoteMentions a .env fileSKILL.md:425
    Set variables in shell or `.env` file:
  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Bash, Read

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from SpillwaveSolutions/agent-brain at commit 8339623, republished under its MIT licence (© SpillwaveSolutions). 2,160 words, ~7,008 tokens.

Download SKILL.mdSave it as .claude/skills/configuring-agent-brain/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
configuring-agent-brain
description
Installation and configuration skill for Agent Brain document search system. Use when asked to "install agent brain", "setup agent brain", "configure agent brain", "setting up document search", "installing agent-brain packages", "configuring API keys", "initializing project for search", "troubleshooting agent brain", "pip install agent-brain", "agent brain not working", "agent brain setup error", "configure embeddings provider", "setup ollama for agent brain", "agent brain environment variables", "install agent brain mcp", "configure mcp server", or "connect agent brain to claude desktop". Covers package installation (server, CLI, MCP), provider configuration, project initialization, and server management.
allowed-tools
Bash, Read
license
MIT
metadata.version
10.4.0
metadata.category
ai-tools
metadata.author
Spillwave
metadata.last_validated
2026-06-24

Configuring Agent Brain

Installation and configuration for Agent Brain document search with pluggable providers.

Contents


Multi-Runtime Support

Agent Brain supports multiple AI coding runtimes from a single canonical plugin source:

RuntimeInstall Command
Claude Codeagent-brain install-agent --agent claude
OpenCodeagent-brain install-agent --agent opencode
Codex (+ AGENTS.md)agent-brain install-agent --agent codex
Cursoragent-brain install-agent --agent cursor
Grok Buildagent-brain install-agent --agent grok
Any skill runtimeagent-brain install-agent --agent skill-runtime --dir <path>

All runtimes share the same .agent-brain/ data directory for indexes, configuration, and server state. The install-agent command converts the canonical plugin format into each runtime's native format automatically.

Use --global for user-level installation, or --dry-run to preview files before writing.


Quick Setup

Option A: Local with Ollama (FREE, No API Keys)
bash
# 1. Install packages
pip install agent-brain-rag agent-brain-cli

# 2. Install and start Ollama
brew install ollama  # macOS
ollama serve &
ollama pull nomic-embed-text
ollama pull llama3.2

# 3. Configure for Ollama
export EMBEDDING_PROVIDER=ollama
export EMBEDDING_MODEL=nomic-embed-text
export SUMMARIZATION_PROVIDER=ollama
export SUMMARIZATION_MODEL=llama3.2

# 4. Initialize and start
agent-brain init
agent-brain start
agent-brain status
Option B: Cloud Providers (Best Quality)
bash
# 1. Install packages
pip install agent-brain-rag agent-brain-cli

# 2. Configure API keys
export OPENAI_API_KEY="sk-proj-..."       # For embeddings
export ANTHROPIC_API_KEY="sk-ant-..."     # For summarization (optional)

# 3. Initialize and start
agent-brain init
agent-brain start
agent-brain status

Validation: After each step, verify success before proceeding to the next.


Setup Wizard

The canonical entry point for a complete guided setup is /agent-brain-setup. It asks all configuration questions interactively before running any CLI commands, then writes a comprehensive config.yaml.

Wizard Configuration Questions

The wizard asks the following questions in sequence:

StepQuestionConfig Keys Set
2Embedding Providerembedding.provider, embedding.model, optionally embedding.base_url, embedding.api_key or embedding.api_key_env
3Summarization Providersummarization.provider, summarization.model, optionally summarization.base_url, summarization.api_key or summarization.api_key_env
4Storage Backendstorage.backend (chroma or postgres)
5GraphRAGgraphrag.enabled, graphrag.store_type, graphrag.use_code_metadata
6Default Query ModeWritten as YAML comment: # query.default_mode
Embedding Provider Options
OptionProvider KeyModelNotes
Ollama (FREE, local)ollamanomic-embed-textRequires Ollama running locally
OpenAIopenaitext-embedding-3-largeRequires OPENAI_API_KEY
Coherecohereembed-multilingual-v3.0Requires COHERE_API_KEY, multi-language support
Google Geminigeminitext-embedding-004Requires GOOGLE_API_KEY
Custom(user-specified)(user-specified)Specify provider, model, and base_url
Summarization Provider Options
OptionProvider KeyModelNotes
Ollama (FREE, local)ollamallama3.2Requires Ollama running locally
Ollama + Mistral (FREE, local)ollamamistral-small3.2Better summarization quality
Anthropicanthropicclaude-haiku-4-5-20251001Requires ANTHROPIC_API_KEY
OpenAIopenaigpt-4o-miniRequires OPENAI_API_KEY
Google Geminigeminigemini-2.0-flashRequires GOOGLE_API_KEY
Grok (xAI)grokgrok-3-mini-fastRequires XAI_API_KEY
Config.yaml Written by Wizard

After answering all questions, the wizard writes a comprehensive config.yaml covering:

  • embedding.* — provider, model, api_key or api_key_env, optional base_url
  • summarization.* — provider, model, api_key or api_key_env, optional base_url
  • storage.* — backend selection and (if PostgreSQL) connection settings
  • graphrag.* — enabled flag, store_type, use_code_metadata
  • # query.default_mode as a YAML comment (informational)

The file is chmod 600 automatically. A security warning is shown: never commit config.yaml to git.

PostgreSQL + BM25: When storage.backend: "postgres" is selected, the disk-based BM25 index is replaced by PostgreSQL's built-in full-text search (tsvector + websearch_to_tsquery). The --mode bm25 command works identically from the user's perspective. Language is configurable via storage.postgres.language (default: "english").

Standalone Config Command

/agent-brain-config handles provider-specific details when called standalone (without the full wizard). It includes storage backend selection, indexing exclude patterns, and Ollama status checks.


Prerequisites

Required
  • Python 3.10+: Verify with python --version
  • pip: Python package manager
Provider-Dependent
  • OpenAI API Key: Required for OpenAI embeddings
  • Ollama: Required for local/private deployments (no API key needed)
System Requirements
  • ~500MB RAM for typical document collections
  • ~1GB RAM with GraphRAG enabled
  • Disk space for ChromaDB vector store

Installation

Recommended installer: use pipx (isolated global) or uv to install the CLI — pipx install agent-brain-cli or uv tool install agent-brain-cli. The bare pip commands below work everywhere and are kept for simplicity, but pipx/uv avoid dependency clashes. See Installation Guide for the full comparison.

Standard Installation
bash
pip install agent-brain-rag agent-brain-cli

Verify installation succeeded:

bash
agent-brain --version

Expected: Version number displayed (e.g., 10.3.0 or later)

With GraphRAG Support
bash
pip install "agent-brain-rag[graphrag]" agent-brain-cli
# Kuzu backend (optional):
pip install "agent-brain-rag[graphrag-kuzu]" agent-brain-cli
Enable GraphRAG (server)
bash
export ENABLE_GRAPH_INDEX=true            # Master switch (default: false)
export GRAPH_STORE_TYPE=simple            # or kuzu
export GRAPH_INDEX_PATH=./graph_index
export GRAPH_USE_CODE_METADATA=true       # Extract from AST metadata
export GRAPH_USE_LLM_EXTRACTION=true      # Use LLM extractor when available
export GRAPH_MAX_TRIPLETS_PER_CHUNK=10    # Triplet cap per chunk
export GRAPH_TRAVERSAL_DEPTH=2            # Default traversal depth
export GRAPH_EXTRACTION_MODEL=claude-haiku-4-5

Add the same values to your .env if you prefer file-based config.

bash
python -m venv .venv
source .venv/bin/activate  # macOS/Linux
pip install agent-brain-rag agent-brain-cli
Installation Troubleshooting
ProblemSolution
pip not foundRun python -m ensurepip
Permission deniedUse pip install --user or virtual env
Module not found after installRestart terminal or activate venv
Wrong Python versionUse python3.10 -m pip install

Counter-example - Wrong approach:

bash
# DO NOT use sudo with pip
sudo pip install agent-brain-rag  # Wrong - creates permission issues

Correct approach:

bash
pip install --user agent-brain-rag  # Correct - user installation
# OR use virtual environment

MCP Server (Optional)

Agent Brain ships an MCP (Model Context Protocol) server that exposes the running instance to MCP-aware clients — Claude Desktop, Claude Code, Cursor, Windsurf, the Claude Agent SDK, and LangChain DeepAgents.

Install
bash
pip install agent-brain-ag-mcp

PyPI name vs. command: the package publishes as agent-brain-ag-mcp (renamed in v10.1.2 — the original name hit PyPI's typosquatting filter), but the installed console script is still agent-brain-mcp and the import path is still agent_brain_mcp.

install-agent can register the MCP server for you while installing the plugin — no hand-editing of .mcp.json:

bash
# Install the plugin AND register the agent-brain MCP server for Claude Code
agent-brain install-agent --agent claude --with-mcp

# ...or for OpenCode (writes the project-root opencode.json)
agent-brain install-agent --agent opencode --with-mcp

# ...or for Codex (writes ~/.codex/config.toml, TOML [mcp_servers.agent-brain])
agent-brain install-agent --agent codex --with-mcp

# ...or for Cursor (writes .cursor/mcp.json)
agent-brain install-agent --agent cursor --with-mcp

# ...or for Grok Build (writes .mcp.json — Grok loads Claude plugins)
agent-brain install-agent --agent grok --with-mcp

# Preview without writing anything
agent-brain install-agent --agent claude --with-mcp --dry-run

# Register with client-side OAuth enabled (for a remote, OAuth-protected server)
agent-brain install-agent --agent claude --with-mcp --mcp-auth oauth

What --with-mcp does:

  • Writes/merges an agent-brain entry into the runtime's MCP config, preserving any other MCP servers and keys — Claude Code's .mcp.json / ~/.claude.json (mcpServers), OpenCode's project-root opencode.json / ~/.config/opencode/opencode.json (mcp), Codex's $CODEX_HOME/config.toml (default ~/.codex/config.toml, [mcp_servers.agent-brain] TOML), Cursor's .cursor/mcp.json / ~/.cursor/mcp.json, or Grok Build's Claude path.
  • Pins AGENT_BRAIN_STATE_DIR to the project's absolute .agent-brain path so the server is discoverable regardless of the client's working directory.
  • Is idempotent — re-running reports unchanged when the entry already matches.
FlagValuesDefaultPurpose
--with-mcp—offRegister the MCP server during install
--mcp-backendauto/uds/httpautoHow the MCP server reaches agent-brain-serve
--mcp-authnone/oauthnoneWrite AGENT_BRAIN_MCP_AUTH=oauth for remote OAuth servers

Auto-registration targets Claude Code, OpenCode, Codex, Cursor, and Grok Build. For other MCP hosts, register manually with the JSON block below (the flag will print a note and skip). Codex has no project-level MCP config, so both scopes write the single user-level config.toml. Conforming Agent Plugins 1.0 clients also pick up agent-brain-plugin/mcp.json automatically.

Configure an MCP client (manual)

Add the server to your client's MCP config (Claude Desktop / Cursor / Windsurf use the same mcpServers shape):

json
{
  "mcpServers": {
    "agent-brain": {
      "command": "agent-brain-mcp",
      "args": ["--backend", "auto"],
      "env": { "AGENT_BRAIN_STATE_DIR": "/abs/path/.agent-brain" }
    }
  }
}
  • --backend {auto,uds,http} selects how the MCP server reaches agent-brain-serve (auto prefers the Unix domain socket, falls back to HTTP). This is orthogonal to the MCP listen transport.
  • stdio is the default listen transport (no flag). For IDE/framework clients that prefer HTTP, use agent-brain-mcp --transport http --host 127.0.0.1 --port 8765 (loopback only — public binds are rejected).
OAuth 2.1 for remote servers (shipped in v10.4)

For a local/loopback server you need no auth — leave the defaults. To run Agent Brain remotely (CI box, shared dev server, hosted), the MCP server supports OAuth 2.1 on the Streamable HTTP transport. Auth is off by default; opt in with env vars:

VariableSideValuesNotes
AGENT_BRAIN_AUTHservernone (default) / basic / oauthServer-side auth mode
AGENT_BRAIN_OAUTH_RESOURCEserverabsolute URI (scheme, no fragment)Required only when AGENT_BRAIN_AUTH=oauth (RFC 8707 resource id)
AGENT_BRAIN_MCP_AUTHclientunset (off) / oauthOpts the MCP client into the OAuth dance

The client side persists tokens at <state_dir>/mcp-oauth-tokens.json (chmod 0o600) and refreshes silently. install-agent --with-mcp --mcp-auth oauth writes the client toggle for you. Per-tool scopes (agent-brain:read|index|admin|subscribe) enforce least privilege, with default-deny on the mutating tools.

Verify
bash
# stdio server starts and exposes tools/resources/prompts
agent-brain-mcp --help

# Or drive it from the CLI's mcp transport
agent-brain --transport mcp resources list

The current surface is 16 tools, 5 corpus:// resources, and 6 prompts. See the MCP package README, docs/MCP_USER_GUIDE.md, and this skill's MCP Setup Guide for the full reference.


Provider Configuration

Agent Brain supports pluggable providers with two configuration methods.

Create a config.yaml file in one of these locations:

  1. Project-level: .agent-brain/config.yaml
  2. User-level: ~/.agent-brain/config.yaml
  3. XDG config: ~/.config/agent-brain/config.yaml
  4. Current directory: ./config.yaml or ./agent-brain.yaml
yaml
# ~/.agent-brain/config.yaml
server:
  url: "http://127.0.0.1:8000"
  port: 8000

project:
  state_dir: null  # null = use default (.agent-brain)

embedding:
  provider: "openai"
  model: "text-embedding-3-large"
  api_key: "sk-proj-..."  # Direct key, OR use api_key_env
  # api_key_env: "OPENAI_API_KEY"  # Read from env var

summarization:
  provider: "anthropic"
  model: "claude-haiku-4-5-20251001"
  api_key: "sk-ant-..."  # Direct key, OR use api_key_env
  # api_key_env: "ANTHROPIC_API_KEY"

Config file search order: AGENT_BRAIN_CONFIG env → current dir → project dir → user home

Security: If storing API keys in config file:

  • Set file permissions: chmod 600 ~/.agent-brain/config.yaml
  • Add to .gitignore: config.yaml
  • Never commit API keys to version control
Method 2: Environment Variables

Set variables in shell or .env file:

bash
export EMBEDDING_PROVIDER=openai
export EMBEDDING_MODEL=text-embedding-3-large
export SUMMARIZATION_PROVIDER=anthropic
export SUMMARIZATION_MODEL=claude-haiku-4-5-20251001
export OPENAI_API_KEY="sk-proj-..."
export ANTHROPIC_API_KEY="sk-ant-..."

Precedence order: CLI options → environment variables → config file → defaults


Provider Profiles
Fully Local with Ollama (No API Keys)

Best for privacy, air-gapped environments:

Config file (~/.agent-brain/config.yaml):

yaml
embedding:
  provider: "ollama"
  model: "nomic-embed-text"
  base_url: "http://localhost:11434/v1"

summarization:
  provider: "ollama"
  model: "llama3.2"
  base_url: "http://localhost:11434/v1"

Or environment variables:

bash
export EMBEDDING_PROVIDER=ollama
export EMBEDDING_MODEL=nomic-embed-text
export SUMMARIZATION_PROVIDER=ollama
export SUMMARIZATION_MODEL=llama3.2

Prerequisite: Ollama must be installed and running with models pulled.

Cloud (Best Quality)

Config file:

yaml
embedding:
  provider: "openai"
  model: "text-embedding-3-large"
  api_key: "sk-proj-..."

summarization:
  provider: "anthropic"
  model: "claude-haiku-4-5-20251001"
  api_key: "sk-ant-..."

Or environment variables:

bash
export OPENAI_API_KEY="sk-proj-..."
export ANTHROPIC_API_KEY="sk-ant-..."
Mixed (Balance Quality and Privacy)
yaml
embedding:
  provider: "openai"
  model: "text-embedding-3-large"
  api_key: "sk-proj-..."

summarization:
  provider: "ollama"
  model: "llama3.2"
Show full SKILL.md (907 more words)Show less
GraphRAG Configuration

GraphRAG enables graph-based entity-relationship extraction for advanced query modes.

YAML config keys (config.yaml):

yaml
graphrag:
  enabled: false                    # Master switch (default: false)
  store_type: "simple"              # "simple" (in-memory) or "kuzu" (persistent disk)
  use_code_metadata: true           # Extract entities from AST metadata (imports, classes)
  langextract_provider: openai      # Optional override — see below
  langextract_model: gpt-4o-mini    # Optional override — see below

Corresponding environment variables:

Env VarConfig KeyDefaultDescription
ENABLE_GRAPH_INDEXgraphrag.enabledfalseMaster switch
GRAPH_STORE_TYPEgraphrag.store_typesimplesimple or kuzu
GRAPH_USE_CODE_METADATAgraphrag.use_code_metadatatrueAST metadata extraction
GRAPH_LANGEXTRACT_PROVIDERgraphrag.langextract_provider(reuses summarization)Override the provider used for doc-chunk extraction
GRAPH_LANGEXTRACT_MODELgraphrag.langextract_model(reuses summarization)Override the model used for doc-chunk extraction

Anthropic / Claude summarization users: langextract's provider registry does not recognise Claude model ids. If summarization.provider: anthropic is set and no langextract override is given, Agent Brain auto-routes langextract to openai/gpt-4o-mini (you'll see an INFO log). Set langextract_provider / langextract_model explicitly to use a different model — Agent Brain validates the choice at startup and raises a clear ConfigurationError if the model is not registered with langextract.

Note: GraphRAG requires the --include-code flag during indexing to extract code structure:

bash
agent-brain index ./src --include-code

For Kuzu (persistent), install the optional extra first:

bash
pip install "agent-brain-rag[graphrag-kuzu]"
Query Mode Selection

Agent Brain supports the following query modes, selectable per request with --mode:

ModeDescriptionRequirements
hybridVector similarity + BM25 keyword (recommended default)None
semanticPure vector similarity searchNone
bm25Keyword-only search (fast, no embedding needed)None
graphEntity relationship graph traversalGraphRAG + ChromaDB backend
multiFuses vector + BM25 + graph with RRFGraphRAG + ChromaDB backend

Note: graph and multi modes are not available with PostgreSQL backend. GraphRAG uses an in-memory/Kuzu graph store that is separate from the vector store — it currently integrates only with ChromaDB.

Per-request override:

bash
agent-brain query "authentication flow" --mode hybrid
agent-brain query "class relationships" --mode graph    # GraphRAG + ChromaDB required
agent-brain query "how do services work" --mode multi   # GraphRAG + ChromaDB required

Note: There is no global query.default_mode config key yet. Mode is per-request only. The setup wizard writes the selected default mode as a YAML comment for documentation purposes.

Verify Configuration
bash
agent-brain verify

Counter-example - Common mistake:

bash
# DO NOT put keys in shell command history
OPENAI_API_KEY="sk-proj-abc123" agent-brain start  # Wrong - key in history

Correct approaches:

bash
# Use config file (keys are in file, not command line)
agent-brain start

# Or use environment from shell profile
export OPENAI_API_KEY="sk-proj-..."  # In ~/.bashrc
agent-brain start

Project Initialization

Initialize Project

Navigate to the project root and run:

bash
agent-brain init

Verify initialization succeeded:

bash
ls .agent-brain/config.json

Expected: File exists

Start Server
bash
agent-brain start

Verify server started:

bash
agent-brain status

Expected output:

Server Status: healthy
Port: 49321
Documents: 0
Mode: project
Index Documents
bash
agent-brain index ./docs

Verify indexing succeeded:

bash
agent-brain status

Expected: Documents count > 0

bash
agent-brain query "test query" --mode hybrid

Expected: Search results or "No results" (not an error)


Verification

Full Verification Checklist

Run each command and verify expected output:

  • agent-brain --version shows version number (10.3.0+)
  • echo ${OPENAI_API_KEY:+SET} shows "SET" (if using OpenAI)
  • ls .agent-brain/config.json file exists
  • agent-brain status shows "healthy"
  • agent-brain status shows document count > 0
  • agent-brain query "test" returns results or "no matches"
  • agent-brain folders list shows indexed folders
  • agent-brain types list shows file type presets
  • agent-brain jobs shows job queue (empty or with history)
GraphRAG Verification (if enabled)
  • echo ${ENABLE_GRAPH_INDEX} shows "true"
  • agent-brain status --json | jq '.graph_index' shows graph index info
  • agent-brain query "class relationships" --mode graph returns results or graceful error
  • agent-brain query "how it works" --mode multi returns fused results
Automated Verification
bash
agent-brain verify

This runs all checks and reports any issues.

Post-Indexing Verification

After indexing documents, verify the pipeline is working:

bash
# Monitor indexing job
agent-brain jobs --watch

# Check job completed successfully
agent-brain jobs <job_id>

# Verify incremental indexing works
agent-brain index ./docs  # Should show eviction summary with unchanged files

# Validate injection scripts before use
agent-brain inject ./docs --script enrich.py --dry-run

When Not to Use

This skill focuses on installation and configuration. Do NOT use for:

  • Searching documents - Use using-agent-brain skill instead
  • Query optimization - Use using-agent-brain skill instead
  • Understanding search modes - Use using-agent-brain skill instead
  • GraphRAG queries - Use using-agent-brain skill instead

Scope boundary: Once Agent Brain is installed, configured, initialized, and verified healthy, switch to the using-agent-brain skill for search operations.


Common Setup Issues

Issue: Module Not Found
bash
pip install --force-reinstall agent-brain-rag agent-brain-cli
Issue: API Key Not Working
bash
# Test OpenAI key
curl -s https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY" | head -c 100

Expected: JSON response (not error)

Issue: Server Won't Start
bash
# Check for stale state
rm -f .agent-brain/runtime.json
rm -f .agent-brain/lock.json
agent-brain start
Issue: Ollama Connection Failed
bash
# Verify Ollama is running
curl http://localhost:11434/api/tags

Expected: JSON with model list

Issue: No Search Results
bash
agent-brain status  # Check document count

If count is 0, index documents:

bash
agent-brain index ./docs

Environment Variables Reference

VariableRequiredDefaultDescription
AGENT_BRAIN_CONFIGNo-Path to config.yaml file
AGENT_BRAIN_URLNohttp://127.0.0.1:8000Server URL for CLI
AGENT_BRAIN_STATE_DIRNo.agent-brainState directory path
EMBEDDING_PROVIDERNoopenaiProvider: openai, cohere, ollama
EMBEDDING_MODELNotext-embedding-3-largeModel name
SUMMARIZATION_PROVIDERNoanthropicProvider: anthropic, openai, gemini, grok, ollama
SUMMARIZATION_MODELNoclaude-haiku-4-5-20251001Model name
OPENAI_API_KEYConditional-Required if using OpenAI
ANTHROPIC_API_KEYConditional-Required if using Anthropic
GOOGLE_API_KEYConditional-Required if using Gemini
XAI_API_KEYConditional-Required if using Grok
COHERE_API_KEYConditional-Required if using Cohere
EMBEDDING_CACHE_MAX_MEM_ENTRIESNo1000Max in-memory LRU entries (~12 MB at 3072 dims per 1000 entries)
EMBEDDING_CACHE_MAX_DISK_MBNo500Max disk size for the SQLite embedding cache

Note: Environment variables override config file values. Config file values override defaults.

Caching
Embedding Cache

The embedding cache is automatic — no setup required. Embeddings are cached on first compute and reused on subsequent reindexes of unchanged content, significantly reducing OpenAI API costs when using file watching or frequent reindexing.

The two cache env vars allow tuning for specific environments:

  • Large indexes — increase EMBEDDING_CACHE_MAX_MEM_ENTRIES (e.g., 5000) to keep more embeddings in the fast in-memory tier and reduce SQLite lookups
  • Memory-constrained environments — decrease EMBEDDING_CACHE_MAX_MEM_ENTRIES (e.g., 200) to limit RAM usage; the disk cache still provides cost savings even with a small memory tier
  • Disk space constrained — decrease EMBEDDING_CACHE_MAX_DISK_MB (e.g., 100) to cap the SQLite cache database size; oldest entries are evicted when the limit is reached

The disk cache uses SQLite with WAL mode for safe concurrent access during indexing operations.

Query Cache

The query cache is automatic — no setup required. Identical queries within the TTL window return instantly without hitting storage.

  • graph and multi modes bypass the cache — each call reaches storage for fresh results.
  • Cache is invalidated on every completed reindex job (file watcher or manual).
  • Configurable via environment variables (see Configuration Guide for details):
    • QUERY_CACHE_TTL — cache TTL in seconds (default: 300, i.e., 5 minutes)
    • QUERY_CACHE_MAX_SIZE — max cached query results (default: 256)

Reference Documentation

GuideDescription
Configuration GuideConfig file format and locations
Installation GuideDetailed installation options
Provider ConfigurationAll provider settings
MCP Setup GuideMCP server install, registration, OAuth, per-runtime config
Troubleshooting GuideExtended issue resolution

Support

© SpillwaveSolutions, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (references) in agent-brain-plugin/skills/configuring-agent-brain of SpillwaveSolutions/agent-brain.

  • SKILL.md
  • references/configuration-guide.md
  • references/installation-guide.md
  • references/mcp-setup-guide.md
  • references/provider-configuration.md
  • references/troubleshooting-guide.md

Open the folder on GitHubat commit 8339623

Compare with similar skills

Configuring Agent Brain next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Configuring Agent Brain compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Configuring Agent Brain this skillSpillwaveSolutions/agent-brain120—~7kAutomated safety check: NotesMIT
Pi AgentK-Dense-AI/scientific-agent-skills48k1 repos~2.1kAutomated safety check: PassMIT
Agent Frameworkjihadkhawaja/Egroo178—~1.9kAutomated safety check: PassApache-2.0
Cookbook Aimldatabricks-solutions/databricks-apps-cookbook183—~1.7kAutomated safety check: PassCustom licence
Ollama MCP Tool for NanoClawnanocoai/nanoclaw31k1 repos~3kAutomated safety check: NotesMIT
Facturasgustavoeenriquez/MakerAi212—~127Automated safety check: PassMIT

Similar skills

  • Pi Agent

    K-Dense-AI/scientific-agent-skills

    Builds with and operates Pi, the minimal terminal coding harness.

    48k GitHub starsUsed in 1 repo~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Agent Framework

    jihadkhawaja/Egroo

    Build, extend, and debug AI agents in Egroo using the Microsoft Agent Framework (C .NET).

    178 GitHub stars~1.9k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Cookbook Aiml

    databricks-solutions/databricks-apps-cookbook

    Invoke ML models, run vector search, and connect to MCP servers from Databricks Apps.

    183 GitHub stars~1.7k tokensUpdated 3 days ago
    AI & LLM EngineeringAuto-check passed
  • Adds an MCP server so the NanoClaw container agent can send prompts to local Ollama models, with optional tools to manage the model library.

    31k GitHub starsUsed in 1 repo~3k tokens
    AI & LLM EngineeringAuto-check: notes
  • Facturas

    gustavoeenriquez/MakerAi

    Úsalo cuando el usuario pida redactar una factura, una cuenta de cobro o una nota de cobro.

    212 GitHub stars~127 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Local LLM Free

    artokun/comfyui-mcp

    Run the ComfyUI agent locally for FREE with no subscription, no API key, and fully offline, using our gemma4 models fine-tuned on the comfyui-mcp tool suite via Ollama.

    793 GitHub stars~897 tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check: notes

More from SpillwaveSolutions/agent-brain

All 55 skills in this repo
  • Gsd Complete Milestone

    SpillwaveSolutions/agent-brain

    Archive completed milestone and prepare for next version. An agent skill from SpillwaveSolutions/agent-brain.

    120 GitHub starsUsed in 4 repos~1.6k tokens
    Auto-check passed
  • Mastering Python Skill

    SpillwaveSolutions/agent-brain

    Modern Python coaching covering language foundations through advanced production patterns.

    120 GitHub stars~1.4k tokensUpdated 17 days ago
    Auto-check: notes
  • Gsd Debug

    SpillwaveSolutions/agent-brain

    Systematic debugging with persistent state across context resets

    120 GitHub starsUsed in 4 repos~1.5k tokens
    Auto-check passed
  • Gsd Review Backlog

    SpillwaveSolutions/agent-brain

    Review and promote backlog items to active milestone. An agent skill from SpillwaveSolutions/agent-brain.

    120 GitHub starsUsed in 3 repos~961 tokens
    Auto-check passed
  • Gsd Thread

    SpillwaveSolutions/agent-brain

    Manage persistent context threads for cross-session work. An agent skill from SpillwaveSolutions/agent-brain.

    120 GitHub starsUsed in 3 repos~1.2k tokens
    Auto-check passed
  • Gsd Plant Seed

    SpillwaveSolutions/agent-brain

    Capture a forward-looking idea with trigger conditions — surfaces automatically at the right milestone

    120 GitHub starsUsed in 2 repos~691 tokens
    Auto-check passed

Questions about Configuring Agent Brain

What does Configuring Agent Brain do?

Installation and configuration skill for Agent Brain document search system. Configuring Agent Brain is an agent skill from SpillwaveSolutions/agent-brain. Installation and configuration skill for Agent Brain document search system.

When should I use Configuring Agent Brain?

Configuring Agent Brain fits situations like: asked to install agent brain; setup agent brain; configure agent brain; setting up document search.

How do I install Configuring Agent Brain in Claude Code?

Run `npx skills add SpillwaveSolutions/agent-brain --skill configuring-agent-brain -a claude-code`. Or copy the skill folder (agent-brain-plugin/skills/configuring-agent-brain in SpillwaveSolutions/agent-brain) into .claude/skills/configuring-agent-brain in your project. Claude Code loads it when a task matches its description.

How do I install Configuring Agent Brain in Codex?

Run `npx skills add SpillwaveSolutions/agent-brain --skill configuring-agent-brain -a codex`. Or copy the skill folder (agent-brain-plugin/skills/configuring-agent-brain in SpillwaveSolutions/agent-brain) into .agents/skills/configuring-agent-brain in your project. Codex loads it when a task matches its description.

Can I use Configuring Agent Brain in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SpillwaveSolutions/agent-brain --skill configuring-agent-brain -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/configuring-agent-brain, .gemini/skills/configuring-agent-brain, .github/skills/configuring-agent-brain and .opencode/skills/configuring-agent-brain in your project.

What does Configuring Agent Brain need to run?

Going by SKILL.md and its folder, Configuring Agent Brain needs the command-line tools its instructions call (pip, ollama, python, curl, brew and pipx) and credentials named OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY and COHERE_API_KEY. Our summary lists: Python 3; A credential in OPENAI_API_KEY; A credential in ANTHROPIC_API_KEY. Its frontmatter pre-approves these tools: Bash, Read.

Does Configuring Agent Brain access the network?

SKILL.md names 2 domains. In commands or code: api.openai.com; the agent is likely to contact it when it follows the instructions. As links in the text: github.com. This is read from the text; nothing was executed.

Is Configuring Agent Brain safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file; runs commands with sudo; pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Configuring Agent Brain use?

Configuring Agent Brain is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Configuring Agent Brain use?

About 7k tokens (SKILL.md is roughly 28k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to Configuring Agent Brain?

Skills that share tags, products or a category with Configuring Agent Brain: Pi Agent (K-Dense-AI/scientific-agent-skills, 48k stars), Agent Framework (jihadkhawaja/Egroo, 178 stars), Cookbook Aiml (databricks-solutions/databricks-apps-cookbook, 183 stars) and Ollama MCP Tool for NanoClaw (nanocoai/nanoclaw, 31k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Configuring Agent Brain?

SpillwaveSolutions (a GitHub organization) maintains it in SpillwaveSolutions/agent-brain, which has 120 GitHub stars. The repository holds 55 skills in this directory. The repository was last updated on September 19, 2026.

Source: SpillwaveSolutions/agent-brain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.