Writing

Three tools for every kind of file

3 min read

When you connect an editor to an AI agent, the obvious design is one tool per command. An editor for slides has a tool to add a slide, a tool to set a title, a tool to move a shape, and so on. It is easy to build and easy to explain.

It also does not scale. A professional editor has hundreds of commands, and Kition has sixteen editors. Every tool definition is sent to the model in every conversation, whether the agent uses it or not. Before the agent has read a single file, its context is already full of descriptions of things it will not do.

The Kit Harness Protocol (KHP) is my answer to that. It is a thin protocol on top of MCP, and its main rule is that the set of tools does not grow.

The same tools, whatever the file

Every editor that follows KHP, which I call a kit, gives the agent the same small set of tools. They do three jobs.

  1. Inspect the file. The agent asks what is in the file and gets structure it can address, together with a preview drawn by the kit’s own engine. The preview matters: an agent that cannot see the page cannot know that the text ran off it.
  2. Run commands. The commands are not tools. They live in a catalogue that the agent searches when it needs one. A kit can have several hundred commands and still present the same few tools.
  3. Check the result. After a change, the kit reports what is now wrong, and the agent can look again.

On top of this, a kit can let the agent work in a draft, a copy of the file that only a person can merge. The agent proposes and you decide.

What the pilot benchmark found

I measured this, and I want to be exact about how much the measurements show. They are pilot results, mostly with one model and one agent. The method, the data and the limits are published with the benchmark at kitharness.org.

Tool definitions get much smaller. With one kit connected, KHP’s tool definitions take 4,693 tokens, against 40,312 for one tool per command. With three kits connected it is 5,030 against 157,477, which is 31 times less. The fixed set barely grows when you add kits, and that is the point of it.

Agents stop editing the wrong thing. The test I care most about is a conversation of several turns in which the user returns to an earlier slide. Through KHP, an agent finished 30 of 30 conversations cleanly. With flat tools it finished 18 of 30. The difference comes from addressing. KHP commands name the object they change. An interface with a hidden “current slide” lets the agent act on whatever happens to be current, and it does so without an error.

Scripts are still cheaper. In the three suites of tasks across a slide deck, a spreadsheet and a document, the same work cost 0.44 to 0.53 times as much when the agent wrote scripts against libraries the model already knew from training. I publish that number because it is true, and because it explains a decision. It is the reason Kition is open source.

A protocol, not a product

KHP does not carry Kition’s name, on purpose. It is a neutral specification with a conformance checker, khp check, and anyone can build a kit for another kind of file with the Kition SDK. If the idea is right, the most useful kits will be for files I have never worked with, written by people who know those files far better than I do.

To try it, any agent that speaks MCP connects with one command:

npx @kition/cli