agent-brain-config

A setup wizard for Agent Brain, a tool that searches and indexes project code. It guides you through choosing AI providers, data storage, file indexing, search settings, caching, and server options.

In plain words
What is it for?
Use it to configure local or cloud AI providers, ChromaDB or PostgreSQL storage, code indexing, automatic re-indexing, graph-based search, caching, result ranking, search tuning, and multi-project servers.
Why use it?
It removes the need to find and edit many configuration settings by hand. It also helps keep related options consistent across a project.

Command

Part of the agent-brain-plugin plugin — 29 commands, 3 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/spillwavesolutions/agent-brain/agent-brain-config
Clone the repo
git clone --depth 1 https://github.com/SpillwaveSolutions/agent-brain

Or install agent-brain-plugin, the plugin that ships this one along with the rest of its 29 commands, 3 agents.

Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 8,370 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 5 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00037 $0.08370
Opus 5 $0.00018 $0.04185
Sonnet 5 $0.00007 $0.01674
Haiku 4.5 $0.00004 $0.00837

Measured 3d ago against content hash eed42574eb0c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade E, and why

agent-brain-config scanned grade E with 5 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 ~/.agent-brain/config.yaml # Secure the file

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

Linux: curl -fsSL https://ollama.com/install.sh | sh

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

SCRIPT=$(find ~/.claude/plugins/agent-brain/scripts ~/.claude/skills/agent-brain/scripts agent-brain-plugin/scripts -name "ab-setup-check.sh" 2>/dev/null | head -1)

Enumerates other installed skillsmediumAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

SCRIPT=$(find ~/.claude/plugins/agent-brain/scripts ~/.claude/skills/agent-brain/scripts agent-brain-plugin/scripts -name "ab-setup-check.sh" 2>/dev/null | head -1)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s --connect-timeout 3 http://localhost:11434/ 2>/dev/null
agent-brain-plugin/commands/agent-brain-config.md · 1,111 lines

How it starts

The opening of the file, as written. The whole thing — 1,111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Configure Agent Brain

Purpose

Guides users through configuring all aspects of Agent Brain across 12 wizard steps:

  1. Providers - Ollama (local/free) or cloud providers (OpenAI, Anthropic, Gemini)
  2. Storage backend - ChromaDB (local-first) or PostgreSQL + pgvector
  3. Indexing excludes - Detect and exclude large directories (node_modules, .venv, etc.)
  4. GraphRAG - Knowledge graph extraction and indexing (AST, LangExtract, or Kuzu)
  5. Caching - Embedding cache and query result cache configuration
  6. File watcher - Automatic re-indexing when files change
  7. Reranking - Two-stage search quality with cross-encoder reranking
  8. Chunking and search tuning - Chunk size, overlap, top-k, and similarity threshold
  9. Server and deployment - Host, port, instance mode, and multi-project setup

Usage

/agent-brain:agent-brain-config

Execution

Step 1: Detect Config File Location

IMPORTANT: Check BOTH locations and edit the correct one.

Config file search order (highest to lowest):

  1. AGENT_BRAIN_CONFIG environment variable
  2. State directory: AGENT_BRAIN_STATE_DIR/config.yaml
  3. Current directory: ./config.yaml
  4. Project-level (walk up from CWD): .agent-brain/config.yaml or .claude/agent-brain/config.yaml
  5. XDG config (preferred user-level): ~/.config/agent-brain/config.yaml
  6. Legacy user-level (deprecated): ~/.agent-brain/config.yaml

Use agent-brain config path to see which file is active.

# Check which config file is active
agent-brain config path

# Show the full active configuration
agent-brain config show

When editing config: Use the file reported by agent-brain config path. Project-level takes precedence over user-level.

Step 2: Run Pre-Flight Detection

Run the environment detection script once. It consolidates Ollama check, Docker check, large-dir scan, and config detection into a single call:

# Find the script — adjust path if plugin is installed to ~/.claude/plugins/
SCRIPT=$(find ~/.claude/plugins/agent-brain/scripts ~/.claude/skills/agent-brain/scripts agent-brain-plugin/scripts -name "ab-setup-check.sh" 2>/dev/null | head -1)
if [ -n "$SCRIPT" ]; then
  SETUP_STATE=$("$SCRIPT")
  echo "$SETUP_STATE"
else
  echo "ab-setup-check.sh not found — run detection manually (see fallback below)"
  SETUP_STATE="{}"
fi

Read the full file on GitHub · 1,111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 1,111 lines · 37 tokens per session scan E eed42574eb0c

Subscribe to this mod's changes

agent-brain-config is a command published in the GitHub repository SpillwaveSolutions/agent-brain (117 stars, last pushed 3d ago), licensed MIT. It adds 37 tokens to every session and 8,370 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it E with 5 findings (asks for root, downloads and executes remote code, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.