Agent Reliability
AI agents can finish successfully while still doing the wrong thing. Agent Reliability provides vendor-neutral Python primitives for measuring whether agents meet explicit reliability objectives.
It brings evaluations, SLOs, error budgets, burn rates, and measurement provenance to agent applications—and refuses to produce a misleading number when evaluation methodologies are incompatible.
Status: GA (1.0.0). Public APIs documented as stable in
GA_CONTRACT.md follow Semantic Versioning.
See compatibility.
Why this exists
Traces explain what an agent did. Reliability answers whether it consistently achieved a defined outcome. Agent Reliability connects one logical execution to an explicit evaluation method, then calculates exact local reliability against an SLO.
The OSS package works offline and without a hosted service. It does not automatically capture prompts, responses, tool arguments, credentials, or arbitrary application payloads. The base install has no runtime dependencies and sends nothing over the network.
30-second example
python -m pip install agent-reliability
This standalone example instruments four agent-like calls, evaluates
task_success, records attributable results, and applies a 75% SLO:
from fractions import Fraction
from agent_reliability.domain import ObjectiveDirection, Slo, UnknownPolicy
from agent_reliability.evaluation import (
EqualityEvaluator,
EvaluationResult,
EvaluatorIdentity,
)
from agent_reliability.reliability import (
AggregationConflict,
ReliabilityObservation,
evaluate_reliability,
)
from agent_reliability.sdk import AgentReliability, EvaluatorRunner
sdk = AgentReliability()
runner = EvaluatorRunner()
evaluator = EqualityEvaluator(EvaluatorIdentity("expected-answer", "1"), "approved")
observations = []
for actual in ("approved", "approved", "needs-review", "approved"):
with sdk.run(agent_id="approval-agent", name="Approval Agent", version="1") as run:
result = runner.evaluate(evaluator, actual)
if not isinstance(result, EvaluationResult):
raise RuntimeError("evaluation did not produce an observation")
run.record_evaluation(indicator="task_success", result=result)
observations.append(
ReliabilityObservation.from_evaluation(
indicator="task_success", result=result
)
)
report = evaluate_reliability(
indicator="task_success",
observations=observations,
slo=Slo("task-success", Fraction(3, 4), ObjectiveDirection.AT_LEAST),
unknown_policy=UnknownPolicy.EXCLUDE,
)
if isinstance(report, AggregationConflict):
raise RuntimeError("incompatible measurement methodologies")
print(f"Reliability: {float(report.ratio.pass_ratio):.2%}")
print(f"SLO status: {report.slo_evaluation.status.value.upper()}")
Output:
Reliability: 75.00%
SLO status: MET
This block runs in CI. The canonical example also shows the error budget. Follow the 5–10 minute quickstart for interpretation and next steps.
What it measures
- An indicator says what is measured, such as
task_success. - An evaluator says how it is judged and returns
PASS,FAIL, orUNKNOWN. - Provenance records evaluator name, behavior version, configuration, and determinism.
- An SLI is the observed ratio; an SLO is the desired target.
- The error budget is permitted unreliability; burn rate compares an observed bad-event rate with that allowance.
UNKNOWN means evaluation completed but was indeterminate. An
EvaluationExecutionFailure means the evaluator or its timestamping failed;
it is not an agent failure and creates no observation.
If evaluator v1 and v2 measured the same indicator, the engine returns an
AggregationConflict instead of averaging them. A changed measurement method
is not automatically comparable. See Core concepts.
Installation
Python 3.11–3.13 is supported. The distribution and import names differ:
pip install agent-reliability
import agent_reliability
The only optional runtime extra is the OpenTelemetry API bridge:
python -m pip install "agent-reliability[otel]"
Framework compatibility
Any Python agent can use the explicit sync or async context manager. Wrap one logical task execution, evaluate the relevant output, and retain observations for the window your application chooses. No framework adapter, monkey patch, API key, storage layer, or network service is required. See Integrations and the async example.
The local engine calculates one supplied collection at a time; it does not retain history or select rolling windows.
OpenTelemetry
OpenTelemetryRunContextBridge activates the agent span in an existing host
trace. Your application owns the TracerProvider, sampling, processors,
propagation, exporter, collector, and backend. Agent Reliability configures
none of them and exports nothing by itself. See the
OTel example and
mapping reference.
Project status and scope
M1–M5 established the domain, sync/async instrumentation, optional OTel
context interoperability, evaluator provenance, and local aggregation. M6 adds
the adoption path and installed-artifact verification. M7 defines the GA
contract and release gates, released as 1.0.0 after 1.0.0rc1 was
published and independently reinstalled from PyPI.
No remote ingestion, dashboard, LLM judge, persistence, auto-instrumentation, or framework-specific adapter is included. See the roadmap.
Documentation
- New developer: Quickstart → Concepts
- Integrator: Integration guide
- Advanced user: Evaluator framework and local engine
- Architecture reader or contributor: documentation index
Development and contributing
See CONTRIBUTING.md for setup and quality gates. Security vulnerabilities belong in the private process in SECURITY.md, not a public issue.
License
Apache License 2.0. See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_reliability-1.0.1.tar.gz.
File metadata
- Download URL: agent_reliability-1.0.1.tar.gz
- Upload date:
- Size: 169.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccaf701d47c60fc802b6925eaed8893b44f13e3726db423cd52af17de12c55a3
|
|
| MD5 |
1ea58af37845114b0b003b4a1bf9f7f0
|
|
| BLAKE2b-256 |
89db96a316d8b1c1ccf68d62bab30d0ba843e41906534b25235c60e77acb4e7c
|
Provenance
The following attestation bundles were made for agent_reliability-1.0.1.tar.gz:
Publisher:
release.yml on kamleshd07/agent-reliability
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_reliability-1.0.1.tar.gz -
Subject digest:
ccaf701d47c60fc802b6925eaed8893b44f13e3726db423cd52af17de12c55a3 - Sigstore transparency entry: 2593944758
- Sigstore integration time:
-
Permalink:
kamleshd07/agent-reliability@0526addaa510826b9516e59305904ad6dad6a8eb -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/kamleshd07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0526addaa510826b9516e59305904ad6dad6a8eb -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent_reliability-1.0.1-py3-none-any.whl.
File metadata
- Download URL: agent_reliability-1.0.1-py3-none-any.whl
- Upload date:
- Size: 51.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c8076069cb1ba67b662f35de871a90a5fbe8b73b8ba50575ab3500c5ba0f1b1
|
|
| MD5 |
94842e5a7110ac817b612337a2f5d3d9
|
|
| BLAKE2b-256 |
4d34afb55d9c6920ccdf40a3c85438ac47cbac9f3bd853625194a71752aa4b30
|
Provenance
The following attestation bundles were made for agent_reliability-1.0.1-py3-none-any.whl:
Publisher:
release.yml on kamleshd07/agent-reliability
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_reliability-1.0.1-py3-none-any.whl -
Subject digest:
4c8076069cb1ba67b662f35de871a90a5fbe8b73b8ba50575ab3500c5ba0f1b1 - Sigstore transparency entry: 2593944853
- Sigstore integration time:
-
Permalink:
kamleshd07/agent-reliability@0526addaa510826b9516e59305904ad6dad6a8eb -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/kamleshd07
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0526addaa510826b9516e59305904ad6dad6a8eb -
Trigger Event:
push
-
Statement type: