Repository navigation
test(benchmark): measure live-model native Rust, Rig and Deep Agents - #1203
Merged
Merged
Conversation
…-20261116 docs(design): evaluate local-first Rust architecture and agent runtimes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a reproducible minimum comparison of a handwritten Rust tool loop, Rig 0.46.0
AgentBuilder, and the real Deep Agents 0.7.32create_deep_agent. Each fresh process completes the same livegpt-6.1-soltask: model-selected echo, one execution, then an exact final answer. Measure local resources separately from the common model relay.Final batch: 9/9 correct cases, 18/18 successful real model calls, three processes per implementation in balanced execution order. Each run has the same normalized 120-character system prompt, identical tool schema, and 184 input / 28 output tokens. No model response is mocked or replayed.
CPU includes initialization and teardown. Remote request duration dominates wall time; these three trials do not establish a latency ranking or framework maturity equivalence.
Evidence and intent
The custom Rust loop is a baseline, not a delivered framework. Deep Agents uses its beta harness profile to hide built-in tools and disable the default subagent; required middleware remains. Rig uses single-thread Tokio, while native uses blocking reqwest. Both Rust builds enable rustls. Provider authentication and conversion reuse the existing OSS Codex handler in an unmeasured common Python parent. Its own 182.19–195.93 MiB RSS and CPU are recorded separately; this is not an entirely Rust authentication stack or whole-system RAM result.
End-to-end verification statement
Built both feature-specific release executables with
cargo +1.97.1 build --locked --release --no-default-features --features <case> --manifest-path benchmark/agent-runtime/Cargo.toml, and ran both correspondingcargo clippy ... -- -D warningscommands, all under/home/catow/.local/bin/with-build-slot. Ranbenchmark/agent-runtime/.venv/bin/python tests/agent_runtime_measure.py --bin-dir benchmark/agent-runtime/target --trials 3 --output benchmark/agent-runtime/results.jsonunder that same coordinator: all nine actual tool loops and all 18 model requests passed. Verified every recorded source and binary hash against the measured files at 5a85add. The later CodeQL response adds only an explanatory sampler comment (parsed AST unchanged); preserve the raw original hashes and explicitly identify their source commit. Ran all three candidate executables against a closed loopback endpoint and observed nonzero failure before tool/final output. Calibrated the profiler with a real 32 MiB allocation, added descriptors/thread and CPU work; confirmed why inherited pre-execwait4max RSS cannot be the headline metric. The relay rejected an invalid tool surface before any provider call; a real sleeping child hit the deadline.Ruff check/format, Rust fmt, uv lock check, focused Basedpyright (zero errors/warnings), Markdownlint (zero issues),
git diff --checkand skill audit (329 files, zero violations) passed locally. The connection/preflight used 3 extra live calls; an initial 18-call experiment with unmatched native TLS was excluded and preserved locally. 39 live requests total, 18 in the final comparison.Scope, dependencies and review
Ten files; 187 lines in the Rust/Python case implementations, isolated manifests, generated locks/raw evidence, and a standalone measurement harness under tests. No production manifest or deployment path changes. The separate uv/Cargo projects are required to run the actual frameworks without adding them to product dependencies; the existing provider adapter is reused rather than copied. Rig's agent/core crates avoid the facade's optional database integrations.
Package manifests and lockfiles require supply-chain review even though this experiment is isolated. This PR is ready for review; no merge or publication is performed. No full product suite, Docker build,
make quality,make smokeor CI success is claimed. GitHub Actions remains constrained by the user's account billing limit; repository protections are preserved.Integration review: fetched current main78cae5c5 and resolved only the CHAGELOG conflict with merged #1202, retaining both entries. All ten changed files and connected relay/measurement behavior reviewed, including isolated supply-chain locks (99 Python packages /625 hashed artifacts and236 Cargo packages, only canonical registries). Independently recomputed all nine sample outcomes,18 successful request records, seven original source hashes and reported medians. Frozen offline uv lock check, Python compilation, Ruff check/format, Rust formatting and diff checks pass. No benchmark executable behavior changed and no additional paid model calls were made. The sole CodeQL Empty except thread is addressed with an explanation of the expected child-exit sampling race; pipe EOF/deadline failures remain fatal. No current hosted CI pass or product suite/build/release is claimed.