Deterministic agent trajectory evaluations: step logging, tool-call precision and recall, sequence order alignment, argument correctness, step efficiency (catching cost and latency bugs where 14 calls are made when 3 would do), and bounded error recovery discipline.
Quickstart | Core Capabilities | Architecture | The Sextet | Contributing
Most agent evaluation frameworks evaluate solely the final code diff or test output. But an agent that reaches the right answer in 14 tool calls when 3 calls would suffice is a severe cost and latency bug:
"An agent that reaches the right answer in 14 calls when 3 would do is a cost and latency bug."
When agents loop through redundant file reads, blindly retry failing commands without inspecting errors, or thrash with repeated searches, token consumption explodes and latency degrades by 5x to 10x.
keel acts as the structural spine of multi-agent evaluation:
- Tool-Call Precision, Recall, and F1: Measures tool relevance against reference optimal paths, supporting semantic equivalence aliases so creative exploration is not penalized.
- Ordered Sequence Alignment: Longest Common Subsequence (LCS) alignment to ensure causal workflows (grep before read, read before edit, edit before test).
-
Argument Correctness & Protocol Compliance: RFC 6901 JSON Pointer assertions, path scoping, and protocol checks (e.g. routing test suites through
q.mjs). -
Step Efficiency & Cost/Latency Bug Detection: Mathematical ratio
$\eta = \min(1.0, S_{\text{opt}} / S_{\text{actual}})$ , flagging excess steps, wasted tokens, and wasted latency with terminal audio alerts. -
Causal State Transition Graph & Bayesian Updating: Models state transitions
$A \to \text{Error} \to \text{Repair} \to B$ with Laplace-Dirichlet smoothing and Mermaid state diagram generation. - Sequential Merkle Provenance Chaining: Cryptographically links every step with SHA-256 hash chains to guarantee tamper-proof execution provenance.
- Error Recovery & Retry Discipline: Bounded 2-attempt retry cap, penalizing blind retries and enforcing diagnostic inspection before retry.
keel is a single, zero-dependency, pure-Rust CLI tool with no -sys C libraries, no external Python runtimes, and zero LLM API calls in the verification path.
| Capability | keel (TideOS) |
LangSmith / Tracing | Promptfoo | PyTest / Unit Tests |
|---|---|---|---|---|
| Deterministic Trajectory Grading (Zero LLM) | Yes (< 10ms) | Cloud eval | Slow prompt eval | No (Code only) |
| Cost & Latency Bug Detection (14 vs 3 calls) | Yes (Built-in) | Metrics only | No | No |
| Tool Precision, Recall, F1 & LCS Alignment | Yes (Built-in) | Custom code | No | No |
| Tool Aliases & Equivalence Classes | Yes (Declared) | Manual mapping | No | No |
| Causal Error-Recovery State Machine | Yes (Dirichlet DAG) | Trace display | No | No |
| Sequential Merkle Provenance Chaining | Yes (SHA-256) | Run IDs only | No | No |
| OpenTelemetry / OpenInference Export | Yes (W3C Spans) | Native | Partial | No |
| Terminal Audio Bell on Loop Trips | Yes (\x07) |
No | No | No |
| Cryptographic Lockfile (SHA-256) | Yes (keel.lock.json) |
No | No | No |
| Single Standalone Static Binary | Pure Rust (2 MB) | Python / Cloud | Node.js | Python |
keel synthesizes Alex Cinovoj's three core engineering pillars for multi-agent systems:
- Single static compiled Rust binary (
lto = true,strip = true,panic = "abort"). - Sub-20ms evaluation with zero embedded Python or Node daemon overhead.
- Interactive audio alert: emits terminal bell character (
\x07) the instant an agent trips an expensive cost/latency loop.
- Opens the agent black box: evaluates intermediate steps, arguments, token usage, and durations.
- Tool equivalence classes: allows reference paths to accept interchangeable discovery tools (e.g.
grep$\approx$ search_code$\approx$ find_in_files) so valid creative paths are rewarded. - Native OpenTelemetry / OpenInference export: emits W3C trace context compliant spans for direct visualization in LangSmith, Phoenix, or OpenTelemetry collectors.
- Causal transition graph: models transitions between tool executions, error states, and repair actions with Bayesian Laplace-Dirichlet smoothing.
- Cryptographic Merkle provenance: sequential SHA-256 chaining across steps guarantees unbroken execution provenance.
- Fail-closed bounded recovery: strictly bounds error retries to 2 attempts and penalizes blind retries without prior diagnostic state inspection.
| # | Tool | Crate | Release Binary | Core Responsibility |
|---|---|---|---|---|
| 1 | reval |
reval |
2.07 MB |
Trace Error Analysis, Gating & MCP Server |
| 2 | gild |
gild |
2.46 MB |
Golden Dataset Governance & Stratification |
| 3 | tessel |
tessel-eval |
1.97 MB |
Combinatorial Synthetic Scenario Generator |
| 4 | assay |
assay-eval |
2.09 MB |
Deterministic Assertions First & In-Memory RLS |
| 5 | tide-rill |
tide-rill |
1.54 MB |
Offline Retrieval Quality & Answer Faithfulness |
| 6 | keel |
keel-eval |
1.91 MB |
Agent Trajectory Alignment & Step Efficiency (14 vs 3 calls) |
| 7 | temper |
temper-eval |
0.89 MB |
Multi-Trial Reliability (pass@k vs pass^k at Real Temperature) |
| 8 | parley |
parley-eval |
1.77 MB |
Simulated Users for Multi-Turn State, Memory & Policy Evals |
Appends and validates structured execution steps:
keel log --trace run.jsonl \
--step-tool run_command \
--args-json '{"cmd":"cargo check"}' \
--outcome ok \
--exit-code 0 \
--input-tokens 2400 \
--output-tokens 80 \
--duration-ms 1250Evaluates precision, recall, LCS alignment, arguments, efficiency, and recovery:
keel score --reference packs/softfactory.toml --trajectory fixtures/trajectories/optimal_3step_fix.jsonl --case sf-optimal-code-fixGenerates state transition graphs with Bayesian posterior probabilities:
keel graph --trajectory fixtures/trajectories/recovery_2step_pass.jsonl --format mermaidOutput:
stateDiagram-v2
START --> Tool_read_file: n=1 (p=0.25)
Tool_read_file --> Error_cargo_check_e0425: n=1 (p=0.25)
Error_cargo_check_e0425 --> Repair_read_file: n=1 (p=0.25)
Repair_read_file --> Tool_edit_file: n=1 (p=0.25)
Tool_edit_file --> Tool_run_command: n=1 (p=0.25)
Tool_run_command --> Terminal_success: n=1 (p=0.25)
Exports trajectories for direct ingestion into LangSmith or tracing collectors:
keel export --suite packs/softfactory.toml --root . --as-format otelCompares baseline and candidate runs to isolate excess steps, token waste, and latency regression:
keel compare \
--baseline fixtures/trajectories/optimal_3step_fix.jsonl \
--candidate fixtures/trajectories/bloated_14step_fix.jsonlExecutes multi-stratum trajectory evaluation suites with fail-closed blocker vetoes:
keel check --suite packs/softfactory.toml --root .Scans live harness runs in Tools/agent-harness/runs/ to detect cost/latency bugs and unrecovered errors:
keel harness --runs-dir Tools/agent-harness/runsGenerates and validates SHA-256 lockfiles to prevent suite drift in CI:
keel lock --suite packs/softfactory.toml --out packs/softfactory.lock.json
keel verify --suite packs/softfactory.toml --lock packs/softfactory.lock.jsoncargo build --manifest-path Tools/keel/Cargo.toml --releaseTools/keel/target/release/keel.exe check --suite Tools/keel/packs/softfactory.toml --root Tools/keelTools/keel/target/release/keel.exe check --suite Tools/keel/packs/softfactory.toml --root Tools/keel --json