Install
avatar-harness is a Python 3.12+ library. It is not yet published to PyPI — install it from source: The repo is a uv workspace with two packages: the SDK (avatar-harness/, import avatar)
and the cockpit (jo-cli/, import jo).
Always quote the extras — zsh otherwise glob-expands the brackets and
fails with
no matches found: avatar-harness[openai].openai is needed only to use the
default OpenAIModelClient (you can inject any ModelClient instead), and
textual only for the bundled TUI. Two external binaries must be on PATH:
- ripgrep (
rg) — thesearch_repotool shells out to it. - git — patches apply via
git apply; the workspace pinsHEADas its diff baseline.
make install (a thin uv sync) sets up
everything including the dev tools.
Configure
Configuration comes fromAVATAR_* environment variables or a local .env.
The only required value is an API key:
First run — the CLI
Status: line and the cited answer. The whole run is journaled to
events/<session_id>.jsonl for replay and debugging.
The workspace refuses to start on a tree with uncommitted tracked changes
(the diff baseline must be well-defined — untracked files are fine). Commit,
stash, or pass
--allow-dirty.First run — the library
The same engine, importable. Five lines to a verifier-checked answer:state.outcome is "success" only when the harness-owned verifier found
positive external evidence — the model never self-certifies. The other terminal
outcomes are incomplete (budget exhausted), blocked (needs human input), and
failed (a completion claim that wouldn’t verify).
Every collaborator is an injectable seam:
task_kind (investigate / edit / test_only) selects the
verification contract — what evidence is required before the run may be
called a success. investigate is the default: a grounded answer with the
tree netting to zero diff vs the pinned baseline at verification (transient
instrumentation is legal mid-task, but must be reverted — ADR-0005).
Where to go next
SDK guide
The full surface: the two-plane
Session, typed events, multi-turn
ReplSession, and every configuration knob.Build a terminal agent
A step-by-step tutorial: your own streaming, approval-answering agent in
about 90 lines.