RunEconomy
Your inference got faster. Did your agent still finish the task?
Request-level benchmarks such as vllm bench serve and GuideLLM measure
tokens per second. Eval harnesses measure output accuracy. Neither tells you
whether switching BF16 to FP8, moving from a hosted API to self-hosted vLLM, or
pruning tools lowered your cost per successful multi-step agent workflow.
RunEconomy is a local-first CLI, MCP server and CI gate that:
- Audits your real OpenAI-compatible agent traffic with no code changes, naming prefix-cache breaks, repeated tool output, unused tool definitions and serialized steps.
- Verifies a serving, model or agent change with paired baseline and candidate runs under frozen task-quality, completion, identity and cost gates.
- Returns one defensible verdict:
verified,regression,inconclusiveorinvalid, with SHA-256 digests of every frozen input and an HTML report that leads with the verdict.
60-second audit of your own agent
Works in front of vLLM, SGLang, llama.cpp's llama-server or a hosted
OpenAI-compatible API. Requires Python 3.11 or newer.
python -m pip install runeconomy==0.4.0
runeconomy proxy --upstream "$OPENAI_BASE_URL" --audit
Point your agent's OPENAI_BASE_URL at the printed http://127.0.0.1:...
address, run one workflow and press Ctrl-C. RunEconomy writes
session.audit.html with observed token usage, estimated opportunities, the
affected calls and the command that prepares a paired comparison. The capture
stays on your machine and contains prompts and model output, so keep it private.
Compare two agent versions (directional)
runeconomy quick-verify \
--baseline "python agent_v1.py" \
--candidate "python agent_v2.py" \
--dataset tasks.json \
--evaluator evaluator.json \
--output first-comparison
Add --allow-exec-evaluators after reviewing a Python, command or pytest
evaluator. Child processes receive an allowlisted environment, so name any
credential they need in RUNECONOMY_PASSTHROUGH_ENV (for example
RUNECONOMY_PASSTHROUGH_ENV=OPENAI_API_KEY).
No GPU or API key? Try it offline
runeconomy demo --open # a real frozen GPU report, rendered locally
runeconomy tutorial init ./runeconomy-tutorial && runeconomy tutorial serve
The tutorial runs synthetic requests against a deterministic localhost server.
Its generated README walks through import, experiment init, validate,
run and report.
Let Claude Code or Codex drive it
claude mcp add runeconomy -- runeconomy mcp
# or install the portable agent skill
npx skills add ShreyanshMisra/runeconomy --skill runeconomy --all
The MCP server stops for your approval, through a single-use token bound to the workspace digests, before any paid run. Agents guide · MCP server
Proof on real GPUs
Every number below comes from a frozen decision record with a SHA-256 digest.
| Decision | What a request benchmark sees | Verdict | What the verdict supports |
|---|---|---|---|
| Proof 3 · Qwen2.5-14B BF16 to online FP8, 16 concurrent agents, NVIDIA L40S | Mean workflow latency −27% (−499 ms), p95 2,254 → 1,625 ms | verified · 200/200 tasks passed in both arms, cost per 1,000 successes $0.065 → $0.048 (−26%) |
The speedup, for this workload |
| Proof 4 · Remove the search tool, same model and server | Median latency halved, input tokens −56% | regression · Task success 100% → 54%, below the 80% floor |
Blocking the change |
| Study 3 · Hosted DeepSeek to self-hosted Qwen on one Modal A10G | 1.75 s faster on shared successes | regression · 75/80 tasks passed, cost per 1,000 successes $0.748 against $0.251 |
Keeping the hosted configuration |
| Study 2 · Move a request ID after a 1.8K-token system prompt (descriptive) | Server TTFT p50 935 → 96 ms | Cached tokens 1.3 → 1,741.6, cost per 1,000 successful requests $0.151 → $0.022 (−85%) | A layout change worth a preregistered test |
Scoreboard and digests · Proofs 3 and 4 · Study 3 · Open the reports
We publish the runs RunEconomy refused
A verifier that only reports wins is not checking anything. Two frozen runs
measured faster and still returned invalid:
- Proof 1 · Move dynamic metadata behind stable instructions. Mean latency fell 62.43 ms on 36 pairs where both arms succeeded, and the candidate gained 105 cached tokens. But 37/40 baseline and 38/40 candidate tasks passed, the baseline lower bound was 79.61% against an 80% floor, and paired non-inferiority also failed. Retuning on those results would reuse a consumed held-out workload, so a fresh claim needs fresh tasks. Read Proof 1 · Aggregate evidence
- Proof 2 · BF16 to FP8. Mean latency fell 391 ms on 179 successful pairs, but one shared application failure left each arm at 179/180 completions against a frozen 180/180 contract. Read Proof 2
All published proofs use synthetic multi-step workloads on pinned models, GPUs and engine versions. They show what RunEconomy decides, not results for every model.
Run an experiment on your deployment
Start in a fresh private directory outside version control. Save a read-only probe of the server first:
runeconomy doctor --base-url "$VLLM_BASE_URL" --api-key-env VLLM_API_KEY --json > doctor.json
For a serving or prompt-layout change you can test with captured requests, use
static replay. For changes to tools, retries or multi-turn decisions, run both
complete agents with --mode agent-process.
runeconomy proxy --upstream "$VLLM_BASE_URL" --record session.jsonl
runeconomy import session.jsonl --type proxy --replay-context replay-context.json --output evidence.json
runeconomy experiment init --from-evidence evidence.json --output experiment/
runeconomy experiment validate experiment/ --doctor-report doctor.json
runeconomy experiment plan experiment/
runeconomy experiment run experiment/ --output results/
runeconomy experiment report results/result.json --output report.html --open
replay-context.json supplies your serving identity, evaluator and replay
design, as shown in the capture guide.
Agent-process workspaces also need --allow-exec-agents on experiment run.
To turn a reviewed design into a held-out CI gate, prepare fresh tasks, run
runeconomy experiment freeze experiment/, then run with --require-frozen.
Already have OpenInference/OTLP, Phoenix, vLLM or Prefixwise evidence? Start
with runeconomy import SOURCE --output evidence.json. An unresolved
workspace means import succeeded but a required input, such as a pinned model
revision or task evaluator, is still missing.
Quickstart · Evidence formats · Experiment contract · CLI reference · GitHub Action · JSON contracts
Troubleshooting and bug reports
Record the displayed runeconomy.* error code. To collect diagnostics locally:
runeconomy support-bundle experiment/ --output runeconomy-support.zip
Inspect the archive before sharing it. Keep raw captures and experiment artifacts private. Troubleshooting · Privacy and support bundles
Preview: staging canary gateway
Testing two live serving stacks with prefix-affinity routing and rollback on a
regression verdict? The Rust staging ingress under gateway/ is
a preview. The staging pilot guide includes a
credential-free fixture, measured Q8 and Q4 results and rollback instructions.
Current scope (0.4.0)
A local-first CLI and MCP server for operator-reviewed experiments and CI gates. Prompts, traces and artifacts stay on your machine, RunEconomy sends no telemetry, and no hosted dashboard is required. There is no managed OTLP collector or framework-specific SDK yet, and raw prompts, traces, evaluator data and experiment artifacts remain the operator's responsibility.
Scope and migration notes · 0.4.0 release notes · Development and validation · Documentation · PyPI
The documentation site is generated from the
version-controlled sources under site/.
Metadata
Release files for runeconomy 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| runeconomy-0.4.0.tar.gz | 646.8 kB | With provenance | Details for runeconomy-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| runeconomy-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for runeconomy-0.4.0-py3-none-any.whl |
Total release size: 1.1 MB
Release files / runeconomy-0.4.0.tar.gz
| Download URL | runeconomy-0.4.0.tar.gz |
|---|---|
| Size | 646.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d9f43ec147f96abb299089ffaed8d4d7698a8d8d145ac059f021cf845c25f7a
|
|
BLAKE2b-256 checksum How to use checksums |
c154aaee8db89e9bc82fba1d5b5ef6324495a72655b7c8a69de0199e0437ea3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / runeconomy-0.4.0-py3-none-any.whl
| Download URL | runeconomy-0.4.0-py3-none-any.whl |
|---|---|
| Size | 432.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cca1345eb30c46762994ba0ba5ee53baf55600ed0e546083a9eb069a9afbc033
|
|
BLAKE2b-256 checksum How to use checksums |
b840eb786c2b4d6b02285d5b533aa0d8b211354e8baddb5cb879cb138ecee688
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for runeconomy 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for runeconomy-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.