Workbooks Documentation

Workbooks

A workbook is a single .org file that runs. It carries prose, code, and data, compiles its source blocks to WebAssembly, and publishes as one self-contained .html you can open in any browser. No build pipeline. No config. One file in, one URL out.

A toolkit is how you give a workbook — or an agent — a new capability. You write it in any language; it compiles to WASM in a sandbox, runs isolated, and travels inside a workbook. A toolkit is what turns a document into a program you can extend.

These are the two surfaces you build on. Everything in these docs is one or the other.

  WORKBOOK                          TOOLKIT
  the artifact you ship             the capability you build
  a live .html backed by WASM       sandboxed WASM, run anywhere
  ── the output ─────────────────── the tool that makes outputs do more ──

A toolkit in one minute

Write a command in any language. The runtime compiles it to WASM inside its own sandbox — no toolchain on your machine — content-addresses it, and registers it. Now an agent or a workbook can call it.

# write a tiny reverser in JS, build it in-sandbox, run it
wb toolkit build-inline rev js ./reverse.js
run-command rev <<< "hello"     # → olleh

That rev toolkit is now a real, sandboxed, content-addressed unit you can hot-swap, promote into a workbook, sign, and ship to anyone. The same path works for C, Zig, Rust, and Go — and for richer shapes than a stdin→stdout command.

Build your first toolkit →

flowchart LR
  src["source<br/>any language"] -->|"build in sandbox"| wasm["content-addressed<br/>.wasm"]
  wasm --> reg(["registered<br/>toolkit"])
  reg --> agent["an agent"]
  reg --> wb["a workbook"]
  reg --> ship["pack · sign · install"]

Why it's one substrate, not three

Most stacks split the document, the runtime, and the package system into three different tools you have to glue together. Workbooks collapses them:

  • The document is the app — a workbook renders and runs.

  • The toolkit is the capability — sandboxed WASM, capability-gated, isolation-tiered.

  • Distribution is the document — a toolkit ships as a workbook; install verifies it by hash.

You author all of it in one place, in the language you already use, and it stays a plain .html and a plain .org the whole way down.

Where to go next

This documentation site is itself a workbook — rendered by the same OQL kernel that renders yours.