byleave 0.13.1

The command line of By Your Leave: runs the kernel and talks to it.
byleave-0.13.1 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.

Documents

The design is in docs/:

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.