Skip to main content
Glama

Agent Switch

简体中文 · English · 日本語

让 Codex、Claude Code 把简单任务派给便宜的小模型,省下高阶模型额度。

我用 Codex 的时候经常想,查一下某个函数在哪儿被调用,这种活也要派个高阶模型去干吗?我手里明明有便宜的小模型。

所以我做了 Agent Switch。把 API 接进来,哪个 Agent 能用哪些模型、什么难度的活交给谁,都可以自己定。懒得一个个选,就开智能调度。

下载 Windows 版 (x64) · 版本说明

完整解压后双击 Agent Switch.exe。

接入各个 Agent · 从源码运行 · 查看应用列表

调度试算。这个例子里,Codex 把 L2 任务交给了千问。图中为演示数据。

我会怎么派活

假如我要查一个订单为什么扣了两次款,我会这么分。

要干的活

交给谁

找到所有触发扣款的地方,列出文件和行号

便宜的小模型

顺着调用链,看看超时重试会不会重复扣款

DeepSeek 这类推理模型

判断原因,改代码,补测试

Codex

外部模型可以读授权项目里的代码、提修改方案。主 Agent 拿到结果,再核对和动手改。整个过程通过 MCP 调用。

同样是写代码,我可以让 Claude Code 的 L2 固定用 DeepSeek,Codex 的 L2 谁便宜就用谁。点左边的应用,单独改这一行就行。

Claude Code 的模型池和分级设置

Related MCP server: Houtini LM

第一次怎么用

  1. 接 API。 在「API 供应商」填地址和 Key。接口要兼容 OpenAI Chat Completions。

  2. 选模型。 到「全部模型」点「一键拉取模型」。新模型默认停用,点编辑,选等级和角色,填好输入、输出单价,再启用。单价按美元 / 百万 Token 填。

  3. 选项目。 在「项目授权」里选文件夹。外部模型会把任务需要的代码片段发给这家供应商。所有项目都用同一家,就在供应商旁边点「授权全部项目」,以后新建的也算。

  4. 接入 Agent。 点左边的应用,选好模型池,保存分配规则,点「接入」。重启或重新加载客户端。

我一般先去「调度总览」点几下 L1、L2、L3,看分得对不对。试算在本地完成。然后直接发一条任务:

用 Agent Switch 派个便宜的模型找一下这个项目的启动入口。你核对一下,告诉我入口在哪个文件、用了哪个模型、花了多少钱。

「调用记录」能看到谁派的活、哪个模型接的、用了多少 Token。费用按你填的单价和供应商返回的用量估算。主 Agent 规划和验收还会用自己的额度。

智能调度怎么选

主 Agent 判断任务难度,Agent Switch 按你设的规则分配。初始设置如下。

等级

常见任务

默认去向

L0

批量改名、格式转换

本地工具

L1

找文件、提取信息

从模型池里选

L2

梳理调用链、写函数

从模型池里选

L3

查并发问题、审代码

从模型池里选

L4

跨模块重构

主 Agent 决定是否派原生子智能体

L5

定架构、最终验收

主 Agent 自己做

自动选的时候,先看项目授权、角色和能力。剩下的模型按这次任务预计要用的输入和输出 Token 算总价,默认选最便宜的。价格没填的默认跳过。

某一级指定了模型,就跳过能力和价格筛选。指定模型用不了,任务交回主 Agent。标为敏感的任务也由主 Agent 自己处理。

能接哪些应用

Codex、Claude Code、Google Antigravity、OpenCode、Pi、DeepSeek Harness。Harness 桌面版和网页版可以分开配。其他支持 stdio MCP 的客户端,可以复制「应用」页底部的通用配置。

Codex 接入时会把分配规则写进 AGENTS.md。其他客户端可以把接入页那段话放进常驻指令。配完就能关掉窗口,客户端需要时会自己启动服务。

各客户端的配置位置、升级和排错 · Windows 打包和自动测试

模型配置、授权和调用记录存在 ~/.agent-switch/state.sqlite3。API Key 也以明文存在这里,分享项目时把这个文件留在本机。

许可证

MIT © 2026 hcw567666 · 客户端图标授权

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP clients like Claude Code to delegate bounded work — code review, boilerplate, commit messages, format conversion, embeddings — to a local GPU model or a cheaper cloud endpoint, keeping large file contents out of the orchestrator's context window. This cuts token costs dramatically while providing a second model for independent review.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables Claude Code and other MCP clients to offload bounded work—code review, test stubs, boilerplate, commit messages, format conversion, embeddings—to a local GPU model or a cheaper cloud, OpenAI-compatible endpoint. Source files are read by the server rather than the main model, cutting token spend while the orchestrating model keeps planning and verifying.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables Claude Code and other MCP clients to hand bounded work such as code review, boilerplate generation, commit messages, format conversion and embeddings to a local GPU model, LiteLLM router, OpenRouter, or cheaper cloud API like OpenAI, DeepSeek, Groq or Cerebras. Keeps the orchestrating model as architect and reviewer, cutting token spend and providing a second opinion on code.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables MCP clients like Claude Code to delegate bounded work—code review, boilerplate, commit messages, format conversion, embeddings—to local or cloud OpenAI-compatible models, keeping large files out of the main model's context to cut token costs and provide a second opinion. It routes and profiles the target model automatically, while the orchestrating client retains planning and quality checks.
      -