Agent Booster

io.github.sseshachala由 GitHub 帳號 sseshachala 發布v0.6.4更新於 Oct 25, 2026

Cut AI agent token costs 5-15x — routes only relevant code symbols instead of full files.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為程式碼庫建立符號索引,只回傳與任務相關的函式與類別,藉此降低 AI 編碼代理的 token 用量。

可以做什麼
查詢某個檔案已建立索引的符號,回傳名稱、類型、行範圍與簽章,不必讀取檔案本身(get_symbols)。依任務描述對符號索引做語意搜尋,尚未建立嵌入時退回關鍵字搜尋(search_context)。只讀取指定檔案中與任務相符的符號原始碼行,並附上名稱與行範圍標題(smart_read)。依任務複雜度訊號建議模型等級(haiku、sonnet 或 opus),可自動偵測相關檔案(route_model)。
適用情境
適合 AI 編碼代理在大型 Python 或 JavaScript/TypeScript 儲存庫中工作、整檔讀取耗費大量 token 的情況。也適合希望在 Claude Code、Cursor、Windsurf 或 Codex 中取得與任務相關的程式碼片段與模型選擇建議的團隊。
執行需求
需要 Python 3.10+,並從 PyPI 在本機安裝 agent-booster 套件;語意搜尋建議加裝 embed 附加元件。每個專案需在專案根目錄執行一次 booster index 與 booster embed,再設定伺服器(booster init 或手動加入執行 booster serve 的 MCP 項目)。不需要環境變數或憑證。
安裝前請注意
booster init 會將設定與鉤子檔案寫入專案及使用者設定目錄,其中包括阻擋對已索引檔案執行 Read、並引導 Grep 改用 search_context 的鉤子;確認前請先檢視變更內容。此儲存庫已封存,開發已移至另一個專案。嵌入使用本機模型,程式碼不會離開本機。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Agent Booster,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

This repository is archived. Agent Booster now lives in sseshachala/conductai → tools/booster. Install from PyPI (pip install agent-booster); file issues and PRs on conductai.

Agent Booster

Cut AI coding agent token costs 5–15x by routing only the code that matters.

Instead of sending full source files to the model on every read, Agent Booster builds a symbol index of your codebase and returns only the functions and classes relevant to the current task.

[Agent Booster demo — fewer tokens sent, lower cost, same result]


How it works

Without Booster                    With Booster─────────────────                  ────────────────────────────Read executor.py                   smart_read executor.py + task→ 1,881 lines (~6k tokens)         → 3 matching functions (~200 tokens)

Five layers work together:

LayerWhat it does
Symbol indextree-sitter parses every .py, .ts, .tsx, .js, .jsx file, extracts functions/classes into SQLite
Vector embeddingssentence-transformers encodes each symbol for semantic search
Smart readgiven a file + task, runs per-file vector search and returns only matching symbol line ranges
MCP serverexposes four tools over stdio — any MCP-compatible agent can call them
Platform initone command writes the right config for Claude Code, Cursor, Windsurf, or Codex

Installation

Requires Python 3.10+.

bash
pip install agent-booster          # symbol index + MCP toolspip install agent-booster[embed]   # + semantic vector search (recommended)

Quickstart

Step 1 — Wire up your AI tool

bash
booster init claude     # Claude Codebooster init cursor     # Cursorbooster init windsurf   # Windsurfbooster init codex      # OpenAI Codex CLIbooster init all        # all four

Each command shows exactly what files will change, asks for confirmation, then writes them. Fully reversible:

bash
booster remove claude   # or cursor, windsurf, codex, all

Example — wiring up OpenAI Codex (booster init codex → booster start → booster gain):

[Agent Booster with OpenAI Codex — init writes ~/.codex/config.json + AGENTS.md, start indexes, gain reports savings]

Run once per project, not once per session. The hooks live in .claude/settings.json and .mcp.json at the project root. Every Claude Code session opened in this directory — any terminal window, same machine — picks them up automatically. No per-session setup needed.

Step 2 — Index your codebase

Run once from your project root. Re-run after large refactors.

bash
booster index && booster embed# Indexed 260 files, 1800 symbols.# Built embeddings for 1800 symbols.

The index is stored at .booster/ (gitignored). The index is shared across all sessions.

Step 3 — Restart your AI tool

The agent-booster MCP server is now available in every session. Claude Code (and other tools) will use smart_read and search_context automatically on indexed files.

Step 4 — Track savings

bash
booster gain

CLI reference

booster init <platform>

Writes the MCP server config and rules file for the target platform. Asks for confirmation before making any changes.

bash
booster init claude     # .mcp.json + CLAUDE.md + .claude/settings.json hookbooster init cursor     # .cursor/mcp.json + .cursorrulesbooster init windsurf   # ~/.windsurf/mcp.json + .windsurfrulesbooster init codex      # ~/.codex/config.json + AGENTS.mdbooster init all        # all four
booster init claude --yes   # skip confirmation (CI/scripts)

booster remove <platform>

Cleanly undoes everything init wrote. No residue.

bash
booster remove claudebooster remove cursorbooster remove windsurfbooster remove codexbooster remove all

booster index

Scans all .py, .ts, .tsx, .js, .jsx files from the current directory. Extracts functions, classes, methods, and interfaces into .booster/symbols.db. Skips node_modules, .venv, __pycache__, .git, .booster, .next, dist, build.

bash
booster index# Indexed 260 files, 1800 symbols.

booster embed

Builds sentence-transformer vector embeddings for all indexed symbols. Required for semantic search_context calls. Uses all-MiniLM-L6-v2 (local, no data leaves your machine).

bash
booster embed# Built embeddings for 1800 symbols.

booster search "<query>"

Keyword search across all indexed symbols. Returns file path, line number, kind, name, and signature.

bash
booster search "guard install"# apps/web/src/app/settings/modules/page.tsx:99  function handleInstall  function handleInstall() {

booster route "<task>"

Recommends haiku, sonnet, or opus based on task complexity — keyword signals, file count, and symbol count.

bash
booster route "fix the guard SSE role check"# haiku  (narrow task — 0 symbol(s) in 1 file)
booster route "refactor the entire runtime compiler and DSL layer"# opus  (matches complexity keywords)

booster serve

Starts the MCP server over stdio. Called automatically by Claude Code, Cursor, Windsurf, and Codex when configured via booster init. You rarely need to run this directly.

booster gain

Shows token savings from past smart_read calls — total reads, tokens served vs. tokens saved, savings rate, and top files by savings.

Agent Booster — Token Savings Report─────────────────────────────────────Active days:        3Total reads:        47Tokens served:      12,400Tokens saved:       89,200Savings rate:       88%
Top files by savings:  executor.py              18,400 tokens saved  (12 reads)  guard.py                 14,200 tokens saved  (8 reads)

MCP tools

Once booster serve is running, these four tools are available to the agent:

get_symbols(file)

Returns all indexed symbols for a file — name, kind, line range, and signature. No file read required.

Input:  { "file": "apps/api/app/runtime/executor.py" }Output: function run_workflow (lines 42-89): def run_workflow(...)        class WorkflowState (lines 91-140): class WorkflowState:

search_context(task)

Semantic vector search across all symbols in the index. Returns top 10 matches by cosine similarity. Falls back to keyword search if embeddings haven't been built.

Input:  { "task": "guard install uninstall" }Output: apps/web/src/app/settings/modules/page.tsx:99 function handleInstall — function handleInstall() {        apps/web/src/components/guard/GuardNav.tsx:13 function GuardNav — function GuardNav() {        ...

smart_read(file, task)

Runs per-file vector search and returns only the source lines for matching symbols, with a header showing name and line range. If no symbols match, returns an explicit message so the model knows to fall back to a full Read rather than silently receiving the whole file.

Input:  { "file": "apps/api/app/runtime/executor.py", "task": "execute output block" }Output: # function _execute_output (lines 1165-1210)        def _execute_output(block, state, credentials, ...):            ...

route_model(task, files?)

Recommends haiku, sonnet, or opus based on task complexity signals. If files is omitted, auto-detects via search_context.

Input:  { "task": "fix the login redirect bug" }Output: { "model": "haiku", "reason": "narrow task — 1 symbol in 1 file" }

What booster init claude writes

FileChange
.mcp.jsonAdds agent-booster to mcpServers
CLAUDE.mdAppends booster usage rules block (sentinel markers)
.claude/settings.jsonWires PreToolUse (Read + Grep) and UserPromptSubmit hooks
.claude/hooks/booster-gate.pyBlocks Read on indexed files — forces smart_read
.claude/hooks/booster-grep-nudge.pyNudges semantic Grep patterns toward search_context
.claude/hooks/booster-route.pyAuto route_model — recommends haiku/sonnet/opus on every user turn

booster remove claude removes all six, cleanly. No residue.


Where it fits

Agent Booster is the third layer in a three-layer token reduction stack:

Layer 3 — Agent Booster     AST+semantic routing, smart file readsLayer 2 — RTK               Token compression on CLI/git/build outputLayer 1 — Prompt caching    Stable context reuse (native to Claude Code + API)

Each layer is independent and addable separately.


Common questions

Does it work if I open a second terminal? Yes. The hooks are wired into .claude/settings.json and .mcp.json in your project root — not inside a specific terminal session. Any new Claude Code window you open in this project picks them up automatically.

Do I need to run booster init again after restarting my machine? No. booster init writes files to disk once. They persist across restarts and across sessions. The only time you re-run it is if you delete those files or switch to a new project.

Do teammates need to run booster init too? Yes — once per developer, once per project. If you commit .mcp.json and .claude/settings.json to the repo, teammates get the hooks when they clone. They still need to run pip install agent-booster[embed] and booster index && booster embed locally, since the symbol index is gitignored.

Can I undo it completely? Yes. booster remove claude removes all six files and cleans the settings entries. No residue.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "agent-booster": {      "command": "booster",      "args": ["serve"]    }  }}

Run booster index && booster embed once from your project root before starting Claude Desktop. No env vars required.


Project layout

tools/booster/├── README.md├── pyproject.toml└── booster/    ├── cli.py          # click commands: index, embed, search, serve, init, remove, route, gain    ├── indexer.py      # tree-sitter parser + SQLite symbol store + vector search    ├── retriever.py    # smart_read: per-file vector search → relevant line slice    ├── mcp_server.py   # MCP server: get_symbols, search_context, smart_read, route_model    └── stats.py        # token savings tracking (booster gain)

來源:README.md,提交 d7c2eeb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.6.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分