Blog

The default answer is no

How Kumi's kernel decides whether a plugin may do something, and why it starts from no.

Ask Kumi's kernel for something nobody approved, and the answer is no. The answer also says why.

Kumi is an AI agent client, and nearly everything in it is a plugin, from the part that talks to a model to the tools an agent uses. The one piece that isn't a plugin is the kernel, the small Rust program underneath whose job is to decide what plugins may do. Here is how it makes that decision.

A request is not a permission

Every plugin ships with a manifest, a short text file that says what it wants. Our local tools plugin, for example, asks to read the workspace folder and to write only to a notes folder inside it:

[capabilities.filesystem]
read = ["workspace"]
write = ["workspace/notes"]

By design, writing that down gives the plugin nothing on its own. Today the code that launches a plugin, not its manifest, decides which folders the sandbox lets it reach; once install is wired, a plugin will start only after you say yes. Our docs put it in two sentences: "The manifest is a request. A grant is the answer." A grant is a separate record that says yes, and the kernel keeps it, not the plugin.

The code that answers "may this plugin do this, now?" opens with a short list of rules. The first one is the whole idea:

The default is deny. No grant means no permission.

An empty policy denies everything. A plugin the kernel has never heard of has no grants, so it gets a no. Nobody has to remember to lock the door; it starts locked.

First look for a no, then for a yes

The function is called check. Here is its core, copied as is (adjusted). Look for the two places where it can say no:

for layer in GrantLayer::all() {
  let empty = Vec::new();
  let at_layer: &Vec<&Grant> = live.get(&layer).unwrap_or(&empty);
  for grant in at_layer {
    if !grant.allow && deny_covers(&grant.capability, request) {
      return Decision::Deny(format!("denied by the {} layer", layer_name(layer)));
    }
  }
}
let uncovered = first_uncovered(&live, request);
match uncovered {
  None => Decision::Allow,
  Some(item) => Decision::Deny(format!("no grant covers {item}")),
}

In plain words, it makes two passes.

First it looks for any no. Grants live in layers, from the kernel's own floor up to the ones a user approves. A deny at any layer ends the discussion, whatever the other layers say, and the answer names the layer that said no.

Then it looks for a yes for every single item the plugin asked for. If even one item has no matching grant, the answer is no, and the reason names the missing piece.

Take a tool call: the local tools plugin declares one called note.write. The part of the kernel that hands tool calls to plugins is written and tested, though not yet switched on in the Kumi you can run. Before handing that plugin a call, it asks check whether it holds a grant to serve the tool. In the code, serving a tool means publishing on the kernel's message bus under the tool's name, hence the bus in the answer. Without a grant, the call is refused before it reaches the plugin, and the reason ends like this (plugin id trimmed):

... may not serve "note.write": no grant covers bus publish to "note.write"

Not poetry, but you know what was missing. A kind of permission the kernel doesn't recognise isn't skipped either: a manifest that asks for one is rejected when it's read, and a grant of one kind never answers a request of another.

Before either pass, the kernel sets aside grants that don't apply right now. A grant can carry an expiry time, and an expired grant is treated as if it had never been stored. A grant is also tied to a range of plugin versions, so a yes given for one range doesn't quietly carry over to a version outside it.

This is the boring part of the system, and we worked hard to keep it that way.

Small yeses, on purpose

A default of no would be useless if the only other option were yes to everything. So every grant has a scope, and the decision code reads it strictly:

  • File grants match whole folder names. A grant for notes covers notes/a but not notes2. Requests that try to climb out with .. or jump to an absolute path are denied.
  • A write grant also covers reading the same place. A read grant never covers writing.
  • Network grants name a host and a port. The port has to match exactly, and a grant for *.example.com covers its subdomains but not example.com itself.
  • Denies reach the other way. Deny notes/private, and a request for the whole of notes is refused too, because it would reach the private folder.

None of this is about taking control away from you. The design leaves you free to give a plugin a narrow yes or a wide one, inside the places Kumi manages for it; that's your call, not ours. The kernel's job is to make sure every yes is one you gave on purpose, for the scope you meant. What doesn't move is the floor: a deny the kernel sets for its own safety is designed to win over any allow.

How you'll say yes

Here is how granting is designed to work. When you install a plugin, the kernel turns its manifest into plain sentences, one line per thing it asks for. The kernel writes that text, not the plugin author, so the wording can't be dressed up. It describes what the manifest declares; checking that a tool really does only what it declares is not something the kernel does yet. You read it and decide. Your answer will then be stored as grants. If a later version asks for more, it will need your consent again. Asking for less will need nothing.

The building blocks already exist in code and have tests: the decision logic above, the consent text generator, a store that records grants and revokes, and the tool-call check. Connecting them into the Kumi you'll actually use is what we're working on, and it's coming soon.

Until a yes exists, the answer stays no. We find that restful.


If you'd like to hear when you can try Kumi, there's a waitlist.

← All posts