Skip to main content
Glama
README.md
# Agent Chancery · 机枢院

[![Release v0.2.5](https://img.shields.io/badge/release-v0.2.5-blue)](docs/releases/v0.2.5.md)
[![MIT License](https://img.shields.io/badge/license-MIT-green)](LICENSE)

English · [简体中文](README_ZH.md)

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](#vision) · [Where it stands](#where-it-stands) · [Quick start](#quick-start) · [How it works](#how-it-works) · [Documentation](#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.

## 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](docs/releases/v0.2.5.md) 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.

   ```sh
   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](docs/agent-setup.md)

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](docs/usage.md#安装与配置) · [Kimi Code](docs/usage.md#kimi-code-调用方) · [DeepSeek Harness](docs/usage.md#deepseek-harness-调用方)

## How it works

```text
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.

- Have your agent configure a project, or update an existing installation. [Agent setup guide](docs/agent-setup.md)
- Local inventory, delegation rules, permissions and reminders, state maintenance and usage reports. [Usage guide](docs/usage.md)
- Measured coverage, known issues, upgrade and rollback. [v0.2.5 release notes](docs/releases/v0.2.5.md) · [All release notes](docs/releases/)
- Operating instructions for the calling agent. [Agent Chancery skill](.agents/skills/agent-chancery/SKILL.md)
- Develop and test the project. [Development guide](docs/development.md)

## License

[MIT](LICENSE)

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