Skip to main content
Glama

Agent Chancery · 机枢院

Release v0.2.5 MIT License

English · 简体中文

Use other providers' agents from the coding agent you already work in, the same way it uses its own subagents.

Agent Chancery is an MCP server. The calling agent hands a task to another provider's native agent through it, waits for the work to finish, and brings the result back to your conversation.

Vision · Where it stands · Quick start · How it works · Documentation

Vision

Agent Chancery exists so that a calling agent can organize agents from different providers to get your work done, without you having to manage the handoff.

  • You stay in the conversation you started. You discuss, assign work and review results as if you were using that one agent. You can name the agent that does the work or leave the choice to the caller, which decides when to bring in an outside agent by the same rules it uses for its own subagents.

  • Every agent works natively, with its own program, permissions and configuration. Agent Chancery absorbs the differences in subscriptions, authentication, context, tools, messages and task lifecycles, so they don't become a new workflow for you to learn.

  • No single caller is special. Codex, Claude Code, Kimi Code and DeepSeek Harness can all call it.

  • The end state is one entry point, several native executors and clear capability boundaries, not a team assembled for every request.

Related MCP server: Roundtable AI MCP Server

Where it stands

In v0.2.4, you followed the guide to configure the project by hand. The caller then used a separate info() call to see which agents were installed locally, their versions and known limits. In v0.2.5, your agent configures the project. Once the local inventory is in place, the MCP handshake tells the caller which agents it can consider on that connection and what limits apply.

  • Your agent sets it up. In Codex or Claude Code, your agent reads this repository and runs a dry run. It installs the project MCP entry, the skill and any applicable hooks. On macOS, setup can install the Codex reminder hooks. After you reopen the host, your agent checks the connection and tries a small delegation. You still confirm sign-in, project changes, CC Switch access and host trust.

  • The caller decides when to delegate. Agent Chancery probes installed programs and records the authentication status it can confirm. The MCP handshake introduces the available candidates and their main limits. The caller combines that with the delegation rules in your project to decide whether to delegate and to whom. You can still name an agent. If it isn't available, the caller can explain why and suggest alternatives.

  • CC Switch, read-only. With your consent, Agent Chancery reads CC Switch card references on macOS when the required columns and card values are compatible and the database can be read consistently under write protection. Native probing still builds the inventory when card data is unavailable or you decline.

  • Codex task controls. When delegating to Codex, you can pick a sandbox and approval combination you approved earlier, add instructions to a running turn with steer, and check progress and per-turn usage.

Everything from v0.2.4 remains: wait on several tasks at once, page through full answers, follow up in the native session, answer native approvals and questions from the caller's chat, receive completion and pending-question reminders in Claude Code and Codex through hooks, reread old answers and export token usage. Agent Chancery rejects delegation when it identifies the caller and delegate as the same provider. Use the caller's own subagents for that work. When configuring the service by hand, you can set --caller-family to identify the caller.

On macOS, v0.2.5 setup, first delegation and proactive delegation were tested on real hosts with Claude Code and Codex CLI. Inside Codex App, setup and first delegation were tested; proactive delegation did not pass. See the release notes for measured coverage, known issues and upgrade steps.

Quick start

You need Python 3.11 or later, uv, and the native agent you want to delegate to. This example uses Kimi Code.

  1. Get the source.

    git clone --branch v0.2.5 https://github.com/MagicGeek2/agent-chancery.git
  2. Open your project in Codex or Claude Code and tell your agent:

    Read the setup guide in <agent-chancery checkout> and configure Agent Chancery for this project.

    Your agent runs a dry run first, then asks whether it may read CC Switch and whether you approve the project changes. Sign in and grant trust in the native prompts, reopen the host, and let your agent verify the connection. Agent setup guide

  3. Try it in a project with a README.md:

    Use Agent Chancery to ask Kimi Code to read this project's README.md and summarize it in one sentence. Wait for the answer and bring it back here.

If you install from a wheel, use the manual configuration steps. For Kimi Code or DeepSeek Harness as the caller, use its host configuration. Installation and configuration · Kimi Code · DeepSeek Harness

How it works

Caller: Codex, Claude Code, Kimi Code, DeepSeek Harness
   │  MCP tools: dispatch, wait, result, ...
   ▼
chancery serve ── private state directory: tasks, turns, answers, usage, local inventory
   │  native interface
   ▼
Delegate: kimi, dsh, codex (your own programs, homes, sign-ins and permission settings)

Each host starts its own chancery serve, and several servers can share one state directory. Agent Chancery starts native sessions with each delegate's own program and configuration. Task records live in the state directory, so earlier answers remain readable after the host restarts.

Documentation

The detailed guides are in Chinese.

License

MIT

Available Tools

12 tools
artifactC
Read-only

读工作区当前 UTF-8 文件及摘要。

Inputs: task_id (required), relative_path (required), limit, offset, +1 more.

cancelA

请求停止 task_id 的当前操作,可能阻止 prompt 发出或中断在途工作。先用 status 核对目标轮及开工或终态证据。delivery 记录取消指令的送达情况。调用后核对同一轮的 prompt_terminal、stop_reason 和 native_stop_confirmed,判断原轮是否被取消。DSH 会话由 close 关闭。

Inputs: task_id (required).

closeC

关闭 DSH 会话。

Inputs: task_id (required).

dispatchB

按用户指定或候选能力委派独立工作,只发送获准分享的材料。同类走调用方的原生子代理。Codex 只可选服务已批准的权限组合,省略用原生默认。默认 Kimi yolo、DSH auto-approve。constraints 限 DSH,reasoning_effort 供 DSH/Codex。

Inputs: provider (required), workspace (required), instruction (required), request_key (required), +7 more.

followupC

在原会话续聊。须原轮终结或确证未发。

Inputs: task_id (required), instruction (required), request_key (required).

infoA
Read-only

选择外部 Agent 或解释指定对象为何不可用时查当前连接的候选。section=agents 查当前服务的路由和排除原因。程序或登录变化后先用 chancery agents probe 更新清单,再查 info。也可查就绪、安装、服务来源或调用记录。

Inputs: limit, cursor, section, provider.

respondC

答复 Kimi 或 Codex 的权限或提问。

Inputs: task_id (required), request_id (required), action, content, +3 more.

resultC
Read-only

读原轮结果。answer、turns 和 usage 可传 turn_id。权限用 request_id 取引用,offset=0 读原文。

Inputs: task_id (required), limit, offset, section, +3 more.

statusB
Read-only

读取任务当前操作及其 operation_id 和 turn_id。用 acceptance 查受理,write_status 查是否写出,native_start_evidence 查原生开工。用 prompt_terminal 和 stop_reason 查原轮终态,native_stop_confirmed 查原生取消是否确认。

Inputs: task_id (required), since_revision.

steerA

向 Codex 当前活动的原生轮补充指令,沿用任务权限。用稳定的 request_key 关联插话。发送待证时沿原轮查证。等原轮终结后,要另开一轮用 followup。

Inputs: task_id (required), instruction (required), request_key (required).

tasksC
Read-only

分页列任务。

Inputs: limit, scope, cursor, provider.

waitC
Read-only

task_id、tasks、notification_id 三选一。提醒用 seconds=0。

Inputs: tasks, seconds, task_id, since_revision, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 12 tools

    Disambiguation4/5

    The core lifecycle verbs (dispatch, steer, followup, cancel, close) are explicitly disambiguated in the descriptions, including preconditions such as 'steer only during an active native turn, use followup after the turn ends.' The remaining overlap is mild: status vs. result (state vs. payload) and wait vs. status require reading the description to choose correctly, but the boundaries are stated.

    Naming Consistency3/5

    All names are single lowercase words with no separator, which is visually consistent, but the convention mixes verbs (followup, close, dispatch, steer, cancel, respond, wait) with bare nouns (info, tasks, status, result, artifact). There is no predictable verb_noun pattern an agent could extrapolate from, though each name is still readable and guessable.

    Tool Count5/5

    Twelve tools is well-scoped for an agent-orchestration server: delegation, steering, cancellation, observation, waiting, responding, and artifact reading each map to one operation. No tool looks like filler, and the set is not fragmented into near-duplicates.

    Completeness4/5

    The surface covers the full delegation lifecycle: discovery (info, tasks), dispatch, in-flight control (steer, cancel, close), observation (status, wait, result), permission handling (respond), continuation (followup), and output retrieval (artifact). Minor gaps exist — no explicit session/agent enumeration tool separate from info, and no task cleanup beyond cancel/close — but agents can work around these.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers