byleave 0.15.0

The command line of By Your Leave: runs the kernel and talks to it.
byleave-0.15.0 is not a library.

By Your Leave

A runtime in which groups of LLM agents carry out work under a human-governed control loop. A pack, the domain-specific part, declares the roles, their tools and their limits. By Your Leave runs the agents, decides what each proposed action may do, asks a person when it must, and records everything.

By Your Leave was called Prospero until v0.12.1. To move an installation, see docs/MIGRATING.md.

How it differs from an agent framework

Many tools coordinate agents: they route messages between models, keep a plan and call tools on the agents' behalf. By Your Leave assumes an agent may be wrong, misled or hostile, and builds the control loop around that:

  • Agents run sandboxed. Each role runs in its own process, in a Windows AppContainer with no network, no access to the log and no credentials. A role returns proposals; nothing it outputs has any effect until the kernel has checked and logged it. A tool that runs code a role wrote runs in a Linux container with no network. The kernel proves from inside each sandbox that every route out is closed before it runs anything there: an open route stops the kernel at start, and a tool sandbox it cannot prove runs nothing.
  • Every action is gated by how irreversible it is. Each tool declares a class, from 0 (reading) to 3 (cannot be undone); an undeclared tool is class 3. The class comes from the declaration and the arguments, never from the agent. Actions at or above a threshold wait for a person. A class 3 action is rejected until a person has enrolled a device to sign with; after that it needs a signed approval, then waits out a delay during which the approval can be withdrawn. Budgets, rate limits and a kill switch apply to all of them.
  • The log is tamper-evident. Every event is appended to one log: each model call in full, each proposal, decision, action and observation. It is never updated or deleted. Each event is chained to the one before by its hash, and each decision a person signs with Windows Hello names the head of the log, so a rewrite shows. byleave verify checks the chain and every signature.

The kernel knows no domain: it names no pack, tool or business concept. The domain lives in packs, and one kernel runs several packs of different domains at once, each under its own grants and policy.

Quick start

By Your Leave runs on Windows 11 for now (D-26). You need Rust, stable, and, only for tools that run in the tool sandbox, Docker Desktop with Linux containers.

  1. Build it:

    cargo build --release
    
  2. Install the agent sandbox's network block, once, from a terminal run as administrator:

    target\release\byleave.exe sandbox install
    
  3. Check the sandbox from the inside. Every route should be closed, apart from the known limits listed in ARCHITECTURE.md section 13:

    target\release\byleave.exe sandbox check --data .\data
    
  4. Run a goal through a scripted model. No model is called and no API key is needed:

    target\release\byleave.exe run --data .\data --config examples\scripted.json --goal "Say hello" --until-idle
    
  5. See what happened:

    target\release\byleave.exe verify --data .\data
    

examples\ holds configurations for a real model (anthropic.json, which reads its key from the Windows credential store), a local model (local.json), the workspace tool (workspace.json), two packs on one kernel (two-packs.json) and the orchestrator (orchestrated.json). While a kernel runs, byleave status, escalations, answer, kill and the other commands talk to it; byleave with no arguments lists them. To chat with it from Claude Code, and to sign approvals with Windows Hello, see docs/CHAT_SETUP.md.

Install from crates.io

Instead of building from a clone, you can install the programs with Cargo:

cargo install byleave by-your-leave-agent by-your-leave-model-scripted

Add the adapters you use: by-your-leave-model-anthropic, by-your-leave-model-chat, by-your-leave-model-claude-code, by-your-leave-tool-workspace and by-your-leave-mcp. The kernel looks for the agent and the adapters in the folder byleave runs from, so install them all to the same place, Cargo's bin folder by default. The example configurations and packs come with the repository, not with the crates.

Known limitations

The agents are sandboxed; you are not. These are the limits that matter most in use. The full list is in ARCHITECTURE.md, section 13.

  • The kernel runs as your own account (D-69). The agents cannot reach the log or the credentials, but any other program running as you can. Such a program can:
    • write the data folder, and so rewrite the log. The hash chain shows a rewrite of anything before the last decision you signed. It does not show a rewrite of what came after it, or a log cut short.
    • read the credentials stored for your account, the model keys among them;
    • ask Windows Hello to sign. The prompt asks only whether you are there, not what is being signed, so answer a prompt only for a command you started yourself.
  • An agent can see your screen (D-44). Windows lets any AppContainer open your desktop and copy what is on it. The agents' own windows stay off your screen and the clipboard is closed to them, but this route stays open, and the sandbox's self-test reports it as a known limit. Tools that run code a role wrote run in the tool sandbox, which has no such route.
  • git still runs a repository's filter, merge and diff drivers (D-76). Every git command on a project turns off the repository's hooks and the settings that start a program, but not the drivers that .gitattributes names and the repository's own configuration defines. An agent cannot define one, since no tool writes into .git for it. Anyone else who can write the project's .git can, and today that is only you.
  • Adapters are trusted, not contained (D-77). Tool and model adapters run as you, outside every sandbox, with your files and network. Each declares the network destinations it reaches, and byleave status shows them, but nothing enforces the declaration. Install only adapters you would run yourself.
  • Sandboxed tools need Docker Desktop, signed in. Docker Desktop's engine runs only while you are signed in. Without it, a sandboxed action is held for you to retry or stop, and everything else keeps running (D-71).
  • Hardened mode is designed, not built (P-25). It would run the kernel as a Windows service under an account of its own, so that programs running as you can no longer reach the log or the credentials, and it would close the screen route. Two spikes showed that it works. It is postponed, and the default installation stays as above. It would not make running while no one is signed in possible, as Docker Desktop's engine would still be gone. See ROADMAP.md, "Possible improvements".

Documents

The design is in docs/:

To report a vulnerability, see SECURITY.md.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.