A Rust CLI for running YAML-defined, read-only coding agents with Rig. Each run loads the configured tools and instructions, sends one prompt, and prints the answer. Tools may inspect the current directory but cannot write files or escape that workspace.
Requires Rust 1.97.1 or newer and provider configuration in
~/.pi/agent/models.json. GitHub skill sources also require git on PATH and
network access.
cargo run --locked -- --agent sandbox/default.yaml --prompt "Explain this project"The default definition uses strata/qwen3.8-flash-next-q2_0. Use a definition
matching your Pi configuration, or override its model:
cargo run --locked -- --agent sandbox/default.yaml --model provider/model --tools read,searchname: reader
model: provider/model
tools: [Read, Search]
agentfile: instructions.md
skills:
- file://skills/explain
- github://killallgit/killall-skills/skills/parse-dont-validatenameandmodelare required. Unknown YAML fields are rejected.modelis a provider key and declared model ID from Pi'smodels.json, split at the first slash. Supported provider APIs areopenai-completions,openai-responses, andanthropic-messages. Credentials may be literal keys or!commandvalues; Anthropic models need a positive configured or built-in output-token limit.toolsselectsread,list, andsearch, case-insensitively.ALL, an omitted list, or an empty list enables all three. Duplicates are ignored; unknown names are errors, including alongsideALL.agentfileis optional. Its contents follow the built-in read-only instructions in the system prompt.skillsis optional. All selectedSKILL.mdinstructions follow the agentfile in source order, with collection entries sorted by path. Missing or malformed sources and duplicate skill names are errors, not silent skips.
Relative agentfile paths and file:// paths resolve from the YAML file's
containing directory. They do not change the workspace: tool paths still
resolve from the directory where you launched the CLI.
--name, --model, --tools, --skills, and --agentfile replace the matching
YAML values. CLI resource paths resolve from the current directory instead.
--tools accepts space- or comma-separated names; --skills accepts
space-separated sources. A bare --skills clears the YAML skills list.
cargo run --locked -- --agent sandbox/default.yaml \
--agentfile ./instructions.md --tools read list \
--skills file://./skills/explain github://owner/repository/path/to/skill \
--prompt "Review the implementation"A skill requires a SKILL.md with YAML frontmatter containing nonempty name
and description fields, followed by a nonempty Markdown body.
file://pathaccepts a skill file, a directory containingSKILL.md, or a collection with immediate child skill directories. Repository collections underskills/are also discovered.github://owner/repository[/path]shallow-clones the default branch over HTTPS into a temporary directory, then loads the same formats. Checkouts are discarded after reading. There is no cache, ref selection, or private-repo authentication support; global Git configuration and hooks are disabled.
Only configure sources you trust: their text is supplied as model instructions. Fetching does not run skill scripts, install packages, or initialize submodules. Companion references and assets are not loaded, and skills do not expand the workspace boundary of the read-only tools.
cargo test --locked --all-targets
cargo fmt --all --check
cargo clippy --locked --all-targets -- -D warningsThe default tests use temporary files, local Git repositories, mock models, and local HTTP servers; no external model API or GitHub access is needed. An optional end-to-end GitHub fetch check uses a public skill and a local mock model:
cargo test --locked --test agent_runtime github_skill_instructions -- --ignoredFrom a clean, up-to-date main, maintainers can run npm ci followed by
npm run release -- patch (or minor / major). Release-it runs the local
checks, updates the Cargo version and lockfile, and commits, tags, and pushes.
The tag-triggered GitHub workflow verifies the version, reruns CI and security
checks, and publishes Linux and macOS binaries with checksums.