
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.
概览
一个本地 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 条目)。不需要环境变量或凭据。
安装
在 SourceWeft 中
- 打开 控制台中的 Agent Booster,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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
Five layers work together:
Installation
Requires Python 3.10+.
Quickstart
Step 1 — Wire up your AI tool
Each command shows exactly what files will change, asks for confirmation, then writes them. Fully reversible:
Example — wiring up OpenAI Codex (booster init codex → booster start → booster gain):
Run once per project, not once per session. The hooks live in
.claude/settings.jsonand.mcp.jsonat 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.
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
CLI reference
booster init <platform>
Writes the MCP server config and rules file for the target platform. Asks for confirmation before making any changes.
booster remove <platform>
Cleanly undoes everything init wrote. No residue.
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.
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).
booster search "<query>"
Keyword search across all indexed symbols. Returns file path, line number, kind, name, and signature.
booster route "<task>"
Recommends haiku, sonnet, or opus based on task complexity — keyword signals, file count, and symbol count.
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.
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.
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.
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.
route_model(task, files?)
Recommends haiku, sonnet, or opus based on task complexity signals. If files is omitted, auto-detects via search_context.
What booster init claude writes
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:
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):
Run booster index && booster embed once from your project root before starting Claude Desktop. No env vars required.
Project layout
来源:README.md,提交 d7c2eeb
工具
0版本历史
1- v0.6.4最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分