Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

RunEconomy

RunEconomy identifies inference waste on the critical path of an agent workflow and tests whether a change improves successful-task performance. Its controlled before-and-after methodology and report are called NegativeSplit.

The latest frozen real-agent proof is invalid, not verified. The candidate increased cache reuse, reduced TTFT, and had a favorable latency interval among task pairs where both variants succeeded. However, the baseline's absolute task-success lower bound and the paired task-success non-inferiority bound missed their predeclared gates. RunEconomy therefore declined to verify the change. The 40-task workload has been consumed and cannot be rerun or retuned as fresh held-out evidence.

The default CPU-only demo is this quality-gated rejection. It is generated from a checked-in, aggregate-only artifact and contains no prompts, task answers, generated output, raw traces, endpoints, credentials, or private workload records. The earlier static request experiment remains available as an explicitly selected historical case. Treat both as narrow, pinned evidence—not general benchmarks.

The project focuses on critical-path workflow experiments rather than trying to replace prompt-cache collectors or general observability systems. It consumes normalized evidence from those layers and tests application or serving interventions under explicit quality and performance gates.

The current implementation analyzes exact prompt token sequences, models vLLM's full-block prefix-cache eligibility, attributes divergence only where segment evidence supports it, and separates potential reuse from observed cached tokens. It imports structural OpenInference traces and Prefixwise ledger findings without inventing missing evidence, captures server-rendered prompts, and runs controlled paired comparisons.

Choose the right workflow

  • runeconomy experiment runs static request-level baseline/candidate manifests against vLLM. negative-split is its backward-compatible alias.
  • runeconomy compare executes complete baseline and candidate agent processes with variant-local state, real tools, an evaluator, and imported OpenTelemetry/OpenInference traces.
  • Compatibility trials validate the integration contract. Calibration tasks are used for development. Neither is held-out performance evidence.
  • A frozen held-out proof is executed once after the agent, evaluator, gates, workload, environment, and sample size are fixed. Failed gates remain failed; observed tasks are never recycled as fresh evidence.

Installation

Install RunEconomy from PyPI:

pip install runeconomy

The 0.2.0a1 prerelease is intended for invited testers. After it is published, install that exact alpha with:

pip install --pre runeconomy==0.2.0a1

RunEconomy requires Python 3.11 or newer. Trace analysis and the bundled demo run locally without a GPU or network connection.

Run the flagship rejection demo

The default demo shows a real candidate that improved cache reuse, TTFT, and measured successful-pair latency, but was rejected because the predeclared task-quality gates failed. It makes no network or GPU calls.

runeconomy demo --open

This writes runeconomy-demo.html, a self-contained NegativeSplit report. The invalid verdict and failed quality gates are visually dominant. Favorable mechanism and latency effects are labelled conditional because latency uses only the 36 task pairs where both variants succeeded.

The earlier static-request demo is retained for compatibility:

runeconomy demo --case historical --open

See the alpha guide and migration notes for the complete feature and privacy boundary.

Check a vLLM deployment

Inspect a normal vLLM deployment without generating text or clearing its cache:

runeconomy doctor \
  --base-url "$VLLM_BASE_URL" \
  --api-key-env VLLM_API_KEY

The report distinguishes advertised support from capabilities that remain unknown until a generation is observed. It also states which experiment modes are safe. A cache salt prevents reuse across salt namespaces; it does not evict cache blocks or eliminate capacity and eviction effects.

Both Responses and Chat Completions requests are supported. Chat Completions uses its render endpoint when available and falls back to the standard chat-form /tokenize endpoint for exact prompt token IDs:

runeconomy capture-vllm chat-request.json \
  --api-dialect chat_completions \
  --base-url "$VLLM_BASE_URL" \
  --api-key-env VLLM_API_KEY

Validate static experiments from a checkout

The commands below use repository fixtures and tests; they are not included in an installed wheel.

uv run runeconomy analyze examples/traces/repository-unused-tools.json
uv run pytest -q

Validate the example experiment manifest locally (no GPU call is made):

uv run runeconomy experiment validate \
  examples/experiments/timestamp-placement.json

experiment is the primary command. negative-split remains a compatible alias, while NegativeSplit remains the name of the paired methodology and report.

Turn a finding into an experiment

Analysis reports contain stable finding IDs, affected requests, evidence quality, critical-path membership, impact estimates, optimization targets, required capabilities, and structured experiment templates:

runeconomy analyze trace.json --format json --output analysis.json
runeconomy experiment init \
  --from-finding analysis.json \
  --finding-id finding-0123456789abcdef \
  --output experiment.json

Normalized traces intentionally omit replayable request bodies, tool definitions, datasets, and evaluators. An ordinary finding therefore produces an explicit unresolved skeleton listing the missing evidence. RunEconomy emits a runnable manifest only when a safe template has every required input and the normal manifest validator accepts the result. It does not substitute guessed requests or thresholds.

See the trace format. The experiment format documents the vLLM flags, reproducibility controls, and result semantics.

Experiment manifests can execute local Python or commands when those evaluator kinds are enabled. Review a manifest like a script; the CLI requires an explicit --allow-exec-evaluators flag before using them.

Compare real agent workflows

Run a paired, seeded comparison of two complete agent processes:

runeconomy compare \
  --baseline "python agent_v1.py" \
  --candidate "python agent_v2.py" \
  --dataset tasks.json \
  --evaluator evaluator.py \
  --output comparison.json \
  --repetitions 3

Each process owns one task's full workflow state. RunEconomy measures process wall time, imports the agent's OpenInference/OpenTelemetry trace, evaluates the final output, and pairs only matching task/repetition attempts. Failed tasks, timeouts, infrastructure failures, invalid traces, and evaluator failures stay separate and cannot be silently pooled into successful-task latency.

See the closed-loop comparison contract for the dataset, environment variables, evaluator protocol, explicit DAG evidence, statistics, artifacts, and privacy boundary.

Exact-token captures can be converted into a normalized trace without manually writing the trace schema:

uv run runeconomy import-vllm-jsonl captures.jsonl \
  --output trace.json \
  --trace-id coding-agent-001 \
  --workload coding-agent \
  --model Qwen/Qwen2.5-1.5B-Instruct
uv run runeconomy analyze trace.json

Structured OpenInference/OpenTelemetry exports can be normalized even when they contain token counts but not rendered token IDs. Prefixwise JSONL exports become structured findings that can seed an honest unresolved experiment skeleton:

uv run runeconomy import-openinference otlp-trace.json \
  --output trace.json \
  --workload coding-agent

uv run runeconomy import-prefixwise-jsonl prefixwise.jsonl \
  --output findings.json
uv run runeconomy experiment init \
  --from-finding findings.json \
  --finding-id FINDING_ID \
  --output experiment-skeleton.json

Exact token boundaries, block-level attribution, structural attribution, and unknown attribution are distinct in the trace format. RunEconomy does not reconstruct prompt text or token arrays from Prefixwise hashes and counts.

Modal validation

The private Modal deployment is defined in deploy/modal_vllm.py. It pins the model and serving stack, preloads model weights on CPU, verifies required vLLM capabilities before GPU allocation, uses one A10 replica, and persists Hugging Face, vLLM, and FlashInfer caches in separate v2 volumes.

Modal commands require a repository checkout with the locked development dependencies installed by uv sync --locked.

Credentials belong only in the ignored .env.local file. A validation window must end by explicitly stopping the app:

uv run modal app stop -y runeconomy-vllm
uv run modal container list --json

The opt-in Real vLLM integration GitHub workflow only contacts an already-running endpoint configured in the protected vllm-integration environment. It never provisions GPU resources and runs only when manually dispatched.

Metadata

Release files for runeconomy 0.2.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runeconomy 0.2.0a1
File Size Uploaded Provenance Actions
runeconomy-0.2.0a1.tar.gz 179.6 kB With provenance Details for runeconomy-0.2.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for runeconomy 0.2.0a1
File Interpreter ABI Platform Actions
runeconomy-0.2.0a1-py3-none-any.whl Python 3 none any Details for runeconomy-0.2.0a1-py3-none-any.whl

Total release size: 273.4 kB

Release files / runeconomy-0.2.0a1.tar.gz

Download URL runeconomy-0.2.0a1.tar.gz
Size 179.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4fc3545ce39987a18651c294eedfc46e0f3fa3366cfdfb0179b4c54b34046aaf
BLAKE2b-256 checksum
How to use checksums
8c0064421054fa1e60acc3659074940d508ea871cb4e9a7c8262fab7a1f41156
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 Nov 14, 2026.

Transparency log

Release files / runeconomy-0.2.0a1-py3-none-any.whl

Download URL runeconomy-0.2.0a1-py3-none-any.whl
Size 93.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1ee841619f97658c4e2ef737de4eb32df059f41f2a5e3333c778a849d30e878
BLAKE2b-256 checksum
How to use checksums
8e5b8d872b57ac00373200bccc7fbe6b1492c9f88da04df6b915266b6356f889
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 Nov 14, 2026.

Transparency log

Security for runeconomy 0.2.0a1

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.

Select from 2 files

Attestation for runeconomy-0.2.0a1.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 Nov 14, 2026.

Transparency log

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

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page