SuperAPIAI Directory

Runledger

github.com · AI developer platforms

RunLedger is a deterministic CI testing tool for tool-calling AI agents, in pytest style, supporting record/replay of tool calls, JSON Schema and tool call order assertions, tool call budgets, and baseline regression merge gates. It communicates with the agent under test via the stdio JSON protocol, can run in replay mode without API keys, and outputs CI artifacts such as JUnit and HTML reports. The project is MIT licensed, self-hostable, and offers commercial support services.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

RunLedger is a CI testing and regression gate tool for "AI agents that call tools", with the core goal of catching tool-call-level regressions at the pull request (PR) stage, such as skipped tools, changed tool call order, outputs no longer conforming to JSON Schema, and tool call counts exceeding budget.

Purpose and positioning RunLedger is positioned as a "replay testing framework" used to make CI checks fail, rather than scoring quality like DeepEval or evaluating prompts and model outputs like promptfoo; the official documentation states it can be used together with both.

Key capabilities

  1. Record/replay tool calls: record tool results to cassettes (JSONL) in local or development environments, and replay them in CI, making tests deterministic and fast; recorded tools require no API keys during replay.
  2. Deterministic assertions: supports json_schema (validate final output), required_fields (keys present), must_call (a tool must be called), must_not_call (a tool must not be called), call_order (tool order, not required to be adjacent).
  3. Budget gates: max_tool_calls, max_wall_ms, max_tool_errors, etc.; comparison of average or p95 latency against a baseline is optional (max_avg_wall_ms_delta_pct, max_p95_wall_ms_delta_pct).
  4. Baseline and regression checks: a baseline can be established from known-good runs, and success rate drops or latency growth are compared and failed in PRs.
  5. Artifact output: run.jsonl (append-only event log), summary.json, junit.xml (CI native), report.html (static shareable report).
  6. Production incident replay: can import supported production JSON exports or RunLedger JSONL logs, redact locally, and replay by matching in order; unrecorded paths stop as divergences; --gate can fail CI when reproduction rule violations occur or evidence is uncertain.
  7. Auxiliary commands: runledger doctor performs static setup checks and optional replay probes; runledger verify performs repeated passing runs, explicit regression checks, and recovery checks.
  8. Initialization template: runledger init generates evals/demo/ (replay kit, cassette, JSON Schema, small Python agent), baselines/demo.json, .github/workflows/runledger.yml; --language node generates a Node agent; --force regenerates.

Usage The agent under test is launched as a subprocess (language-agnostic) and communicates with the runner over a newline-delimited JSON protocol on stdin/stdout; the agent may only write protocol JSON to stdout, and human-readable logs must go to stderr. In record mode the runner writes a cassette; in replay mode it returns tool results from the cassette; the agent outputs final JSON, and the runner applies assertions and budgets, compares against baselines, writes artifacts, and exits with a non-zero code on regression. Suites are defined by suite.yaml and cases/*.yaml. Installation: install or upgrade the CLI from PyPI; example files require checking out the v0.5.0 repository or the optional full source ZIP, as pip will not install examples into the current directory. A portable support package is also available that uses only the Python standard library and requires no installation.

Use cases PR regression gates for tool-calling agents, failure reproduction and fix acceptance for business flows such as refunds, production incident replay, and deterministic CI for multi-language agents (Python, Node/TS, LangGraph/LangChain and other templates).

Limitations and caveats Replay only covers requests issued through the RunLedger JSONL tool protocol; model or network calls made independently by the agent still execute live, so for offline testing these calls should be routed through the protocol or replaced with fixtures in the adapter. Replay freezes the JSONL tool boundary. The recording is the exporter's historical evidence, not a simulated new provider action. Review shared redacted packages before distribution; custom fields may require additional redaction paths. Deterministic CI also requires the agent's model calls and other inputs to be fixed or replayable. The public examples are fictional.

License and support MIT licensed, free to self-host; commercial support is offered via Hardening Sprint (fixed-scope implementation) and Assurance (monthly maintenance); contact details are on the official website's community page.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools