Skip to content
TechTideOhioPublic

About

TideOS Eval Kit (Tool 6): Deterministic agent trajectory evaluation, tool precision/recall, 14 vs 3 step efficiency, causal DAGs, and error recovery

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

keel: TideOS Eval Kit (Tool 6)

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.

CI Release License: MIT Rust: 2021 / 1.82+ Zero-FFI

Quickstart | Core Capabilities | Architecture | The Sextet | Contributing


Why keel?

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:

  1. Tool-Call Precision, Recall, and F1: Measures tool relevance against reference optimal paths, supporting semantic equivalence aliases so creative exploration is not penalized.
  2. Ordered Sequence Alignment: Longest Common Subsequence (LCS) alignment to ensure causal workflows (grep before read, read before edit, edit before test).
  3. Argument Correctness & Protocol Compliance: RFC 6901 JSON Pointer assertions, path scoping, and protocol checks (e.g. routing test suites through q.mjs).
  4. 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.
  5. 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.
  6. Sequential Merkle Provenance Chaining: Cryptographically links every step with SHA-256 hash chains to guarantee tamper-proof execution provenance.
  7. 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.


Feature Comparison

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

Three Engineering Pillars (Alex Cinovoj / TechTideAI)

keel synthesizes Alex Cinovoj's three core engineering pillars for multi-agent systems:

1. Ruthless Speed & Desktop Ergonomics (Alex Cinovoj)

  • 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.

2. Trajectory Observability & Ecosystem Interop (Alex Cinovoj)

  • 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.

3. Causal State Machines & Lineage Ledgers (Alex Cinovoj)

  • 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.

The Complete TideOS Eval Kit

# 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

Core Capabilities

1. Step-Level Logging & Provenance Chaining

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 1250

2. Trajectory Scoring Against Reference Paths

Evaluates 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-fix

3. Causal State Transition Graph

Generates state transition graphs with Bayesian posterior probabilities:

keel graph --trajectory fixtures/trajectories/recovery_2step_pass.jsonl --format mermaid

Output:

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)
Loading

4. OpenTelemetry / OpenInference Span Export

Exports trajectories for direct ingestion into LangSmith or tracing collectors:

keel export --suite packs/softfactory.toml --root . --as-format otel

5. Head-to-Head Trajectory Comparison

Compares 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.jsonl

6. Full Stratified Suite Check

Executes multi-stratum trajectory evaluation suites with fail-closed blocker vetoes:

keel check --suite packs/softfactory.toml --root .

7. Multi-Agent Harness Run Audits

Scans live harness runs in Tools/agent-harness/runs/ to detect cost/latency bugs and unrecovered errors:

keel harness --runs-dir Tools/agent-harness/runs

8. Cryptographic Lockfile Verification

Generates 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.json

60-Second Quickstart

1. Build or Install

cargo build --manifest-path Tools/keel/Cargo.toml --release

2. Run Soft Factory Suite Check

Tools/keel/target/release/keel.exe check --suite Tools/keel/packs/softfactory.toml --root Tools/keel

3. Inspect JSON Output

Tools/keel/target/release/keel.exe check --suite Tools/keel/packs/softfactory.toml --root Tools/keel --json

About

TideOS Eval Kit (Tool 6): Deterministic agent trajectory evaluation, tool precision/recall, 14 vs 3 step efficiency, causal DAGs, and error recovery

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages