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.
npx agentmods add commands/spillwavesolutions/agent-brain/agent-brain-hybridgit clone --depth 1 https://github.com/SpillwaveSolutions/agent-brainWrote 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.
[](https://agentmods.dev/commands/spillwavesolutions/agent-brain/agent-brain-hybrid)<a href="https://agentmods.dev/commands/spillwavesolutions/agent-brain/agent-brain-hybrid"><img src="https://agentmods.dev/badge/commands/spillwavesolutions/agent-brain/agent-brain-hybrid.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00016 | $0.01536 |
| Opus 5 | $0.00008 | $0.00768 |
| Sonnet 5 | $0.00003 | $0.00307 |
| Haiku 4.5 | $0.00002 | $0.00154 |
Grade A, and why
agent-brain-hybrid 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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 235 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent Brain Hybrid Search
Purpose
Performs hybrid search combining BM25 keyword matching with semantic vector similarity. This is the default and most versatile search mode, balancing exact term matching with conceptual understanding.
Hybrid search is ideal for:
- General documentation queries
- Mixed technical and conceptual questions
- When you need both precise terms and semantic relevance
- Comprehensive search across diverse content
Usage
/agent-brain:agent-brain-hybrid <query> [--alpha <a>] [--top-k <n>] [--threshold <t>]
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
| query | Yes | - | The search query text |
| --alpha | No | 0.5 | Hybrid blend factor (0.0-1.0) |
| --top-k | No | 5 | Number of results (1-20) |
| --threshold | No | 0.3 | Minimum relevance score (0.0-1.0) |
Alpha Tuning Guide
The --alpha parameter controls the blend between semantic and keyword matching:
| Alpha | Semantic | BM25 | Best For |
|---|---|---|---|
| 1.0 | 100% | 0% | Pure semantic (concepts, explanations) |
| 0.7 | 70% | 30% | Favor meaning over exact terms |
| 0.5 | 50% | 50% | Balanced (default) |
| 0.3 | 30% | 70% | Favor exact terms with some semantic |
| 0.0 | 0% | 100% | Pure keyword (exact terms only) |
When to Adjust Alpha
| Query Type | Suggested Alpha |
|---|---|
| "how does authentication work" | 0.7 |
| "OAuth implementation guide" | 0.5 |
| "AuthenticationError handling" | 0.3 |
| "def process_document" | 0.0 |
Execution
Pre-flight Check
# Verify server is running
agent-brain status
If not running:
agent-brain start
Search Command
agent-brain query "<query>" --mode hybrid --alpha <alpha> --top-k <k> --threshold <t>
Examples
# Balanced hybrid search (default)
agent-brain query "OAuth implementation" --mode hybrid
# Favor semantic understanding
agent-brain query "how does caching work" --mode hybrid --alpha 0.7
# Favor exact terms
agent-brain query "ConnectionRefusedError" --mode hybrid --alpha 0.3
# More results with lower threshold
agent-brain query "error handling patterns" --mode hybrid --top-k 10 --threshold 0.2
# Full custom search
agent-brain query "authentication flow" --mode hybrid --alpha 0.6 --top-k 8 --threshold 0.25
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.
- 5d ago First seen · 235 lines · 16 tokens per session scan A cd1f20b73c24
agent-brain-hybrid is a command published in the GitHub repository SpillwaveSolutions/agent-brain (118 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 1,536 once invoked, about $0.0001 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.
Other commands, from other repositories
ov
Show OpenViking memory plugin status — server, identity, last injection / recall, toggles.
mempalace-status
Show the current state of your memory palace — wings, rooms, drawer counts, and suggestions.
tree-ring-certify
Generate Tree Ring harness or recall-quality evidence without confusing it with the full framework release suite.
tree-ring-recall
Recall durable Tree Ring Memory context before starting or resuming work.
tree-ring-update
Check for or install a verified Tree Ring Memory CLI update without changing installation scope.
tree-ring-status
Check receipt-backed Tree Ring harness readiness without claiming configuration is activation.