local-brain-search

local-brain-search is an agent for Claude Code from Abilityai/cornelius. It costs 37 tokens per session (1,670 once invoked), scanned A, original, MIT.

A local search agent for a personal knowledge base called the Brain. It finds notes by meaning, related notes, and highly connected notes, then can re-index the collection.

In plain words
What is it for?
Use it to search notes semantically, discover connections between topics, find central or hub notes, and rebuild the search index.
Why use it?
It helps locate relevant information even when notes do not contain the exact words in your search.

Agent for Claude Code

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 agents/abilityai/cornelius/local-brain-search
Clone the repo
git clone --depth 1 https://github.com/Abilityai/cornelius

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for local-brain-search

README.md
[![agentmods](https://agentmods.dev/badge/agents/abilityai/cornelius/local-brain-search.svg)](https://agentmods.dev/agents/abilityai/cornelius/local-brain-search)
Your own site
<a href="https://agentmods.dev/agents/abilityai/cornelius/local-brain-search"><img src="https://agentmods.dev/badge/agents/abilityai/cornelius/local-brain-search.svg" alt="Measured on agentmods" height="20"></a>
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 1,670 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.01670
Opus 5 $0.00018 $0.00835
Sonnet 5 $0.00007 $0.00334
Haiku 4.5 $0.00004 $0.00167

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

Security

Grade A, and why

local-brain-search scanned grade A with 0 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/local-brain-search.md · 270 lines

How it starts

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

Local Brain Search Agent

You are a specialized agent for searching and exploring the Brain knowledge base using a local vector search system.

System Location

All scripts are located at:

resources/local-brain-search/

IMPORTANT: Use the wrapper scripts (run_*.sh) - they handle the virtual environment automatically.

Core Operations

1. SEARCH - Semantic Search

Find notes by meaning, not just keywords.

resources/local-brain-search/run_search.sh "your query here"

Options:

  • --limit N or -n N - Maximum results (default: 10)
  • --threshold T or -t T - Similarity threshold 0-1 (default: 0.5)
  • --full or -f - Show full content instead of preview
  • --json or -j - Output as JSON (for parsing)

Examples:

# Basic search
run_search.sh "dopamine reward prediction"

# Limit to 5 results with higher threshold
run_search.sh "consciousness meditation" --limit 5 --threshold 0.7

# JSON output for further processing
run_search.sh "AI agents" --json

2. CONNECTIONS - Find Related Notes

Discover how notes are connected through explicit links and semantic similarity.

resources/local-brain-search/run_connections.sh "note name or topic"

Options:

  • --depth N or -d N - Connection depth for multi-hop (default: 1)
  • --semantic-only - Show only semantic (similarity-based) connections
  • --explicit-only - Show only explicit (wiki-link) connections
  • --json or -j - Output as JSON

Examples:

# Find connections for a note
run_connections.sh "Dopamine"

# Multi-hop connections (depth 2)
run_connections.sh "Flow states" --depth 2

# Only semantic connections
run_connections.sh "Buddhism" --semantic-only

# Full note ID for exact match
run_connections.sh "02-Permanent/Dopamine.md" --json

3. STATS - Graph Statistics

Get statistics about the knowledge graph.

resources/local-brain-search/run_connections.sh --stats

Returns:

  • Total notes and edges
  • Explicit links vs semantic edges
  • Isolated notes
  • Connected components
  • Average degree

Read the full file on GitHub · 270 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. 4d ago First seen · 270 lines · 37 tokens per session scan A ff95730a44ea

Subscribe to this mod's changes

local-brain-search is an agent published in the GitHub repository Abilityai/cornelius (105 stars, last pushed 11d ago), licensed MIT. It adds 37 tokens to every session and 1,670 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

AGENTS

In-depth tutorials on LLMs, RAGs and real-world AI agent applications.

patchy631/ai-engineering-hub · 0 tokens

ap-preflight-probe

L4 diagnostic/recovery probe - on an explicit cache miss, proves RUN/READ/WRITE and reports model/effort bindings; never the mandatory first spawn.

Spielewoy/autoprompt-skill · 39 tokens

algorithm-expert

RL algorithm expert. Fire when working on GRPO/PPO/DAPO/GSPO/SAPO algorithms, reward functions, advantage normalization, loss computation, or training loop implementation.

redai-infra/Relax · 37 tokens

mlops-engineer

ML operations agent for experiment tracking, model registry, feature stores, ML pipelines, model serving, drift monitoring, and AIOps.

pjt222/agent-almanac · 31 tokens

chip-esl-writer

ESL 模型代码编写 Agent。根据 ESL 架构方案文档,生成可编译的 SystemC/TLM 模型代码,包括模块定义、TLM 接口实现、数据通路逻辑和性能计数器。内置 LLM Wiki 知识系统(SystemC/TLM 2.0 预编译结构化知识),严格遵循 ESL 编码规范和架构冻结原则。集成对抗性评审(devils-advocate ruthless 模式),可在代码实现完成后自动挑战代码正确性和潜在 Bug。当用户需要将 ESL 架构方案转化为 SystemC/TLM 实现、生成虚拟平台代码或编写 ESL 模型时激活。.

zhaixin244-wq/fnw · 162 tokens

migration-reviewer

Use this agent after aidp-migrate-job completes to review a migrated .ipynb for correctness (NOT just "did it run"). Catches latent issues the cell-execute loop missed — wrong write-mode, lost rows, dropped columns, hardcoded paths, dead Databricks-isms. Outputs a structured review report.

ahmedawan-oracle/claude-code-plugins · 70 tokens