Skip to main content

Crate blyte_agent

Crate blyte_agent 

Source
Expand description

The agent loop: blyte owning execution rather than wrapping someone else’s.

Every mechanism this project built to influence an agent from outside its loop was capped or negative. A PreToolUse hook cannot prevent the call it intercepts, because the model has already emitted the request and the conversation has already been re-sent by the time the hook runs (FINDINGS 13.25). Refusing a read the worker had decided it needed simply produced a second request: 89-91% of suppressions were immediately insisted on. And 47.6% of all input tokens went to turns whose entire output was “waiting for the background task”, because the host harness backgrounded slow commands and the worker polled for them, each poll costing a full turn carrying the whole conversation (13.29).

None of those are fixable from outside. All of them are design decisions from inside.

Modules§

approval
bench
A model-free benchmark of the harness’s own time: a fixed trajectory of tool calls, replayed at zero model latency (examples/harness_bench.rs). Every speed change is judged by it.
claim_check
Model-assisted check of prose claims in a research report against their cited source lines.
context
How the next prompt is assembled.
conversation
fs
Where files actually live. The companion seam to crate::shell.
gate_slots
Machine-wide gate slots so parallel dispatches do not all build and test at once.
quote_expand
Expand quote directives in a research report.
research_check
Check that a research report’s code quotes and line citations match the files they cite.
rules
The repository’s own rules for agents, loaded on every run so that blyte gets them however it was started (2026-09-30: runs started with blyte dispatch directly saw only the task text, while the dispatch scripts appended .claude/agy-rules.md).
run
The turn loop, and the gate the worker cannot call.
sandbox
Sandbox profile generation and host sandbox detection for macOS (Seatbelt) and Linux (Landlock).
search
grep in-process, with ripgrep’s own libraries: rg’s regex engine and semantics, .gitignore respected (in a git repository, as rg does), binary files skipped, and rg’s line format (path:line:text with the path as searched, or line:text for a single file). Results are sorted by path, so the same search always returns the same text. No process is spawned: two spawns per grep cost about 110 ms locally and 345 ms in a container (harness_bench).
shell
Where commands actually run. A seam, not a hardcoded bash -lc.
state
Execution state, split by authority rather than by who happens to write.
tools
The tool surface, and the one rule that shapes it: everything executes synchronously.