Skip to content

v0.37.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 13:24
· 13 commits to master since this release
v0.37.0
0cd5cca

An agent tree can grade its agent with evals. This is a MINOR release
under the pre-1.0 convention: it adds package eval, the bonnie eval
command, and bonnie build --native-loader. bonnie init writes main.go
with a newAgent function. No exported Go symbol is removed. The run
executor, the journal, and the channels do not change. BONNIE remains early
and experimental. No release is proven in production. Do not use it for work
whose loss would hurt.

The claims

  • A run survives process death. A served agent continues unfinished runs
    at startup from the journalled conversation, including typed tool calls and
    results. SQLite commits each tool-calling step atomically. The sender of a
    turn and its trace context are journalled with the turn and restored on
    resume, so a recovered turn keeps its caller and its trace. A keyed
    decision is answered from the journal after a restart. Unsaved input
    cannot be recovered; execution is not exactly once.
  • A run parks indefinitely. A human-input wait needs no live agent process
    or running sandbox compute. Resume supplies the answer after restart. Keep
    the journal and sandbox data. JetStream waits need their original agent.
  • A run is reachable over HTTP. Routes under /bonnie/v1 expose runs,
    snapshots, events, durable submissions, and owned child runs. Terminal chat
    and the optional /web interface use the same channel and run executor.
    Iroh serves the HTTP wire API over authenticated QUIC streams for approved
    peers. The same authenticated API is also reachable over Core NATS subjects.
    The runs console and its commands act on runs through the same API.

Fixed

  • bonnie build names the standard Linux loader. A tree that loads a C
    library at run time through purego (examples/self-contained-agent) is
    dynamically linked, also with CGO_ENABLED=0. With the Go toolchain from
    nixpkgs, the binary named a loader in /nix/store and stopped on other
    hosts with cannot execute: required file not found. For a Linux target,
    bonnie build now passes the linker -I with the loader that upstream Go
    names for the target GOARCH (/lib64/ld-linux-x86-64.so.2 on amd64), or
    the musl one on a host that has only musl. -I wins over the toolchain
    default in each toolchain; GO_LDSO in the build environment does not,
    because only the nixpkgs linker reads it. The -I is added to the
    -ldflags in GOFLAGS, and a -I there is kept. A static binary does not
    change.

Added

  • bonnie build --native-loader keeps the Go toolchain's own loader, for
    a binary that runs on a NixOS host without nix-ld.
  • Evals: package eval and bonnie eval. An eval is a Go test in an
    agent tree (*_eval_test.go, //go:build eval). eval.New opens the real
    agent in process on a temporary journal. Send, Respond and Restart
    drive one run; Restart opens a new runtime that shares only the journal.
    Run checks on eval.Turn (Succeeded, Suspended, CalledTool,
    CalledToolWith, NotCalledTool, NoFailedTools, MaxSteps) and
    e.Check with matchers are gates, and read the journal. A Score is soft
    by default: AtLeast/AtMost set a threshold, Gate makes it fatal, and
    strict mode (--strict, BONNIE_EVAL_STRICT) makes each miss fatal. The
    recommended judge is a decision model (Judge, JudgeAll with Bool,
    Rubric and Choice questions); JudgeLLM asks a chat model for a score
    and a reason. turn.Decided grades the agent's own decision records. A
    judgment with no model fails the eval. bonnie eval generates the wiring,
    runs go test -tags eval -json, prints each eval and score, and fails on a
    tree with no evals. Tool stubs and remote targets are not included.
  • bonnie eval has a terminal interface, and keeps each run. On a
    terminal it shows the evals live, then each score, failure and
    conversation; o opens an eval's journal in the run console. --tui=false,
    --json, or output that is not a terminal give the plain table. Each run
    is saved in .bonnie/evals/<id> with each eval's journal
    (BONNIE_EVAL_DIR); bonnie eval show and bonnie eval list read them,
    and --keep (default 10) limits how many are kept. In the interface, r
    reruns the selected eval and R each failed eval, as a new saved run that
    names the run it came from. A rerun keeps the whole suite: it replaces only
    the results of the evals it runs, marks the others with the run that made
    them, and counts the whole suite. Prune keeps a run that a kept run
    carries results from. A rerun runs go test once for each package
    and parent test with an anchored -run pattern, because one pattern
    cannot name subtests of two parents without their cross product.
  • bonnie init writes main.go with a newAgent function that main
    serves and each eval calls, so an eval tests the options the binary ships.
    An existing tree keeps working; move the bonnie.New call into newAgent
    before you write evals.

Changed

  • No BONNIE code imports charm.land/fantasy, also not a test. Kit
    v0.139.0 aliases fantasy.LanguageModel as kit.LLMLanguageModel, and
    each type its methods take (kit.LLMCall, kit.LLMResponse,
    kit.LLMStreamResponse, ...). internal/fakemodel and the tests now use
    these aliases. fantasy is // indirect in go.mod. The depguard rule
    fantasy-in-tests-only is now no-fantasy, which denies the import in
    every file. The earlier statement that Kit does not alias the types of
    LanguageModel was wrong for this pin.
  • The Nix package installs the newest release, not master. flake.nix
    pins a bonnie-release input to a tag, and nix/bonnie.nix builds that
    source with its version (it reported 0.7.0 before). The installed msb
    comes from the same release. The dev shell still uses the working tree. A
    new nix-release-pin job in release.yml moves the pin, flake.lock, and
    vendorHash after each tag, with scripts/bump-flake-release-pin.sh and
    scripts/update-flake-vendor-hash.sh. The Nix build no longer runs the
    tests: CI tested the release, and the Nix sandbox has no network for the
    tests that build an agent module.

Known limits

  • Evals call live models and run real tools. bonnie eval sends real
    requests to the agent's model and to the judge, and each request can cost
    money. Judge calls are not journalled. There are no tool stubs and no remote
    targets: an eval runs the agent's own tools in its sandbox, with their real
    effects. A judge score is a model's opinion, not a proof. The saved runs in
    .bonnie/evals hold each eval's full journal; protect them.

  • A dynamic agent binary names a fixed loader. bonnie build names the
    standard glibc loader, or the musl one on a musl host. A host with no
    loader at that path, such as NixOS without nix-ld, needs a binary built
    with --native-loader, and that binary runs only where the toolchain's
    loader path exists. A static binary does not name a loader.

  • The self-contained example is not one static binary. Its model runs
    through Kronk and llama.cpp, so bonnie build makes a binary that loads
    libffi and llama.cpp's shared libraries when it starts. The first start
    downloads about 2 GB into ~/.kronk and needs a network connection. The
    model has its own license, not Apache 2.0.

  • The model database refresh changes a shared cache. update models
    writes Kit's per-user cache outside every sandbox, and other agents of that
    user read it on their next load. Use only trusted catalog sources. A
    cancellation or an output error does not undo an update that Kit committed.
    Running agents must restart to use it. Disabling the command does not stop
    Kit from reading the cache.

  • Mouse copy needs OSC 52. A terminal without OSC 52, such as GNOME
    Terminal, does not get the selection, except inside tmux. Use Shift+drag
    there. On the trace and journal tabs of bonnie runs a selection marks
    screen cells, so a scroll or a key drops it.

  • A decision is a probability, not an authorization. Enforce access rules
    in host code; keep the sandbox and the network policy as the hard limits. A
    keyed decision is not exactly once: if the process stops after the model
    answers and before the record is written, the next call asks again and can
    cost money. Agent.Decide has no run and writes no record. The startup
    check proves that Kit can call the model, not that its credentials or URL
    settings work. The decide tool takes text only, at most 32 KiB and 16
    questions. Captured decision answers are output content.

  • Linux only. Releases support linux/amd64 and linux/arm64. The default needs
    kernel 5.13 or newer with Landlock enabled; otherwise select Docker.

  • Containment is not isolation. Landlock confines files, not the network,
    and shares the host kernel. Do not run as a user in the docker group:
    access to its socket permits host escape. Docker uses namespaces, not a
    separate kernel. Microsandbox needs Linux and KVM. Local provides no isolation.

  • Sandbox egress is open until a policy is set. Landlock refuses policies it
    cannot enforce. Microsandbox policy is fixed at creation; reattachment with a
    different policy fails. Automatic runtime installation needs network access
    and does not upgrade existing installations or remove runtime requirements.

  • Custom tools and completion callbacks are trusted host code. Use scoped
    Exec for commands; do not retain scopes after execution. Use Kit.Subagent,
    not Kit.Prompt, from active tools. Closure state is not durable; interrupted
    calls and checks can repeat. Child model calls are not durable BONNIE runs.
    Enforce authorization and idempotency in tool code. Keep completion policy and
    limits stable after restart. Usage can be undercounted; unsaved attachments
    are lost, accepted events can repeat, and drafts can appear before acceptance.
    Checks skip suspension and model failure. Managed setup, scoped factories, and
    completion options cannot use WithAgentFactory.

  • A halt stops the turn, not the step. Sibling tool calls still run before
    suspension. Omitting human-input tools does not change permissions.

  • A skill's bundled files stay on the host. Put required text in the skill
    body and required sandbox files in context/. Workspace skills are the
    exception: their assets are live sandbox files, not journal snapshots.

  • Workspace skills are untrusted input. Repository descriptions and bodies
    enter model context and can contain hostile instructions; activation does not
    authorize execution. Discovery is opt-in and opens sandbox compute at startup.
    Only Local, Landlock, and custom sandbox.SkillDiscovery implementations
    support it; built-in Docker and Microsandbox discovery returns an unsupported
    error, and the packaged bonnie-skillfs helper does not enable it. Linux
    openat2 is required. Over-limit skills are skipped, not truncated; a scan
    that fails or times out keeps the last complete catalogue. Saved catalogues
    hold instruction text, so protect the journal.

  • HTTP authentication is opt-in. Protect TCP HTTP separately; Iroh approval
    does not authenticate or disable it. Health remains public on TCP HTTP.
    Verified ownership is required for operation_id. CSRF checks do not replace
    authentication. Chat webhooks verify the platform, not the person.

  • Iroh pairing grants access to all runs, not tenant isolation. Verify peer
    IDs out of band. Persist approved IDs and stable endpoint keys on the host;
    pairing and revocation are process-local. Revocation blocks later requests,
    not requests already accepted. Tickets provide reachability, not permission.
    There is no built-in Iroh CLI, pairing command, or presence advertisement.
    Loopback tests do not prove Internet relays or Rust-client interoperability.

  • Run ownership is per host. Use one process and one submission scheduler per
    journal. SQLite protects transactions, not execution coordination. Do not mix
    direct Start and scheduler delivery to the same run. Network filesystems need
    reliable POSIX locks and are unsafe for the journal.

  • Events are journal-anchored. Durable events replay; transient assistant
    deltas do not. Web chat does not show reasoning deltas. Another process's
    writes do not publish live events in this host.

  • Cleanup is opt-in and deletes files, not history. Waiting and interrupted
    runs are kept;
    publish output before completion. CLI serve does not sweep sandboxes. Locks
    are local to one Runner; deletion callbacks must be safe to repeat. Shared
    directories and custom factories cannot use automatic cleanup. Only Landlock
    and Local support shared directories; use one server and no context seeding.

  • Tool recovery is not exactly once. Saved and current policies must allow
    replay; no tool is replay-safe by default. Replay bypasses interactive approval
    hooks. Different arguments can evade uncertain-action blocks. Outcomes saved
    before a step retain text, not media. Custom factories need their own recovery.

  • Submission deduplication covers admission, not effects. Human waits park
    inputs; failed work is not retried automatically. The scheduler recovers recorded
    submissions; the served host recovers unfinished synchronous runs. Steering supports text only. Atomic
    markers and child creation need runtime.StepJournal. Background children do
    not keep parents busy or grant approval. Unsaved callbacks can repeat.

  • Logs can contain sensitive data. Info includes final responses; Debug
    includes prompts, arguments, results, and reasoning. Synchronous logging can
    delay runs; replay does not log events again.

  • Authoring needs Go and public module access. Static agents need neither Go
    nor BONNIE installed, but their sandbox can need a separate runtime. Scoped
    command operations own resources; do not retain them after return.

  • Cancellation is cooperative, not rollback. Models, tools, and callbacks
    must observe contexts. Detached children can escape process-group signals.
    Route controls to the execution owner. Legacy text answers cannot identify
    delayed questions; chat retry can repeat effects. Served hosts recover interrupted HTTP
    work at startup; address and operation_id cannot be combined.

  • NATS credentials and routes need protection. Use TLS, broker permissions,
    and one authentication method. Payloads do not verify identity. Other connection
    options need a caller-supplied connection. Core NATS can lose tasks and results;
    the host continues interrupted runs, but does not retry result publication.
    Ordinary subscribers get copies.

  • JetStream delivery is at least once. Recovery needs the original journal,
    sandbox data, unique agent identity, and one owner. Waiting runs need their
    original agent. Deduplication and retention are bounded; there is no global
    attempt lookup. Consumer changes can replay messages. Targeted tasks have no
    fallback; task IDs deduplicate per route, not across routes.

  • Publish receipts confirm storage, not execution. Existing streams are not
    changed. Filter task IDs and respect cancellation; invalid messages need
    correction. Deduplicate status event IDs and order by sequence. Statuses and
    results have no cross-stream ordering. Queries and cancellation are not durable
    commands; timeouts do not prove failure. Custom reply prefixes are unsupported.

  • The NATS run API is operator access, not tenant isolation. API access
    covers all runs; per-run ownership authorization is not supplied. It needs an
    HTTP authenticator and restrictive broker ACLs and TLS; broker authentication
    alone does not identify a publisher. Assign one bridge per journal-owning agent
    subject; it is not a shared worker queue. Requests are not retried, reply loss
    does not prove failure, and API delivery is not durable. Missed live-only
    activity cannot be replayed.

  • Schedules have one journal owner. Change Revision when policy changes.
    Waiting work blocks default overlap. Latest catch-up needs saved cron history,
    not every missed occurrence. Delivery and callbacks can repeat. Only mounted
    tracked chat receivers are supported, not scheduled files or NATS. Execution
    has 16 active occurrences. Manual and HTTP triggers need separate authorization.

  • Browser validation is incomplete. CI excludes the live-state and end-to-end
    browser tests. They need Chromium and Node WebSocket support and otherwise skip.
    CI green does not prove other browsers or production authentication.

  • Presence is advisory, not execution ownership. Polling can miss changes;
    expiry does not prove work stopped. It adds no scheduler, routing, or failover.
    Protect registries; labels are not authorization. Keep caller-owned connections
    open through shutdown. Existing storage and history are not validated. Memory
    presence is process-local with no default renewal; readiness is local only.

  • Saved-input continuation needs agent support. Custom agents must implement
    runtime.ContinuationAgent and resolve pending tool calls first. Retry APIs
    need one owner and provide no process lease or reversal of effects.

  • Job output has no disk-use limit. Model output is bounded to 32 KiB per
    stream, but saved files can fill storage. Fresh providers cannot establish
    unfinished host job outcomes. Guest reconnection needs files and identity;
    stopping a sandbox need not preserve jobs.

  • Provider login uses a shared credential store. Only OpenAI ChatGPT/Codex
    login is supported. Protect and persist credentials; they can override
    environment keys. Login needs a loopback callback on port 1455 with no manual
    fallback. Restart agents to load changes. Logout does not revoke provider access.

  • Search can be partial. grep and find ignore .gitignore, include
    dotfiles, and stop at entry, time, result, or response limits. Files above
    1 MiB make grep results partial. Whole-file reads do not bound backend memory.

  • File mutations are not transactions. The mutation gate covers edit and
    write_file in one tool set only, not shell commands or external writers.
    Writes do not promise rollback or exactly-once effects after a crash. Check
    current content before retrying an uncertain edit.

  • New input is not queued by Start. Retain ErrInputDeferred commands
    durably, recover admitted work with StartRetry, and submit new input only
    after the old logical turn closes. Zero-value Start keeps legacy recovery.

  • Automatic recovery needs durable input and a mounted owner. Input lost
    before it reached the journal must be sent again. Pending, waiting, failed,
    and cancelled runs are not automatically executed. Opening a journal alone
    executes nothing; custom hosts must call Runner.Recover and Runner.Drain.
    Keep agent configuration stable after restart. Recovery delivery is
    fire-and-log, not a durable outbox. GitHub needs GITHUB_INSTALLATION_ID to
    post a recovered reply. Core NATS results can remain only in the journal.

  • Self-modification output is not reviewed for you. Read the diff before
    you commit a local change or merge a pull request; a change to main.go can
    change the model, channels, and sandbox. The subagent cannot download a
    module, so a change that needs a new dependency fails to build. Calls on one
    tree run one after the other. A remote proposal from a host without go is
    not built before it is proposed. Remote hides its tool from an unverified
    caller; a Local authorizer must check Verified itself. The subagent is a
    Kit.Subagent call, not a durable run: an interrupted attempt is repeated,
    not resumed.

  • Tracing is incomplete. Provider HTTP spans appear only with an
    instrumented transport, such as kit.WithHTTPTransport with otelhttp.
    Inbound traceparent is accepted from every caller that passes the channel's
    authentication. Captured content can hold personal or secret data; capture is
    off by default. Langfuse can show an approval score up to ten minutes late,
    and a failed score does not fail the run.

  • The run console reads the journal; its actions use the HTTP channel. The
    Trace tab is rebuilt from journal times, not from exported spans, so it shows
    no provider HTTP spans. A call with no journalled outcome reads as unknown.
    Actions need a reachable HTTP channel at --addr. A --token value is
    visible in the process list. Read access to the journal shows full
    conversations; protect it.