Toolkits

A toolkit is a command you wrap once and call everywhere — a small CLI, written in a real systems language, compiled to WebAssembly, and made available as a command that a sandbox or an agent can run through exec. It's how you extend the box with tools of your own.

A toolkit is a wrapped CLI

The body of a toolkit block is an ordinary command-line program — it reads stdin and writes stdout, the classic Unix shape. The platform compiles it to a wasm32-wasi command module and registers it under its name:

toolkit :upper
toolkit :upper do
  // summary: uppercase stdin
  #include <stdio.h>
  #include <ctype.h>
  int main(void) { int c; while ((c = getchar()) != EOF) putchar(toupper(c)); return 0; }
end

Once registered, upper is a command. An agent told it has an upper tool can pipe text through it; a sandbox with exec can invoke it. The toolkit is the wasm command behind that name.

Many languages, one shape

The language is inferred from the body — C and Rust compile to wasm commands today, each through its real toolchain. Whatever the language, the contract is the same: stdin in, stdout out. That uniform shape is why a toolkit composes with any other command and why an agent can use one without knowing how it was written.

The same source always yields the same command — a toolkit block compiles to one deterministic wasm32-wasi module behind its name.

Why wrap a CLI at all

Three reasons it's worth the block:

Toolkits and agents

This is the seam that makes agents useful. An agent that "has a bash tool with a web kit" is really an agent granted exec over a set of registered toolkit commands. You build the kit, grant it, and the agent computes real answers with real tools — inside the wall, every time.