pytest-agentest
A pytest plugin for AiEnsured agentest, an Agentic AI Testing platform.
It runs agentest's 165 tests over an agent's recorded OpenTelemetry traces during a pytest session, so you can gate CI on what the agent actually did, not only what it said.
Install
pip install agentest-ai
pip install pytest-agentest
pytest-agentest 0.1.0 is published to PyPI on the first GitHub Release, after trusted publishing is connected. Until that release is live, install the plugin from this repository:
pip install git+https://github.com/srpadmanabhuni/pytest-agentest.git
Once it is on PyPI, the automated pytest plugin list at https://docs.pytest.org/en/stable/reference/plugin_list.html will pick it up from the pytest- package name. There is no separate submit form.
Usage
Call agentest from a test with the agentest_run fixture:
def test_recorded_trace(agentest_run):
result = agentest_run(otlp="traces/run.otlp.jsonl", ids="T1-018", fmt="md")
assert result.returncode == 0
Or pass traces on the command line. With --agentest-strict, pytest fails if any check fails:
pytest --agentest-otlp traces/run.otlp.jsonl --agentest-ids T1-018 --agentest-strict
Options
--agentest-otlp PATH— OTLP trace file (repeatable)--agentest-ids IDS— limit to test IDs or classes, comma-separated (for exampleT1-018)--agentest-strict— fail the pytest session if any agentest check fails
Links
- PyPI (agentest): https://pypi.org/project/agentest-ai/
- PyPI (this plugin, after the first release): https://pypi.org/project/pytest-agentest/
- Plugin repo: https://github.com/srpadmanabhuni/pytest-agentest
- agentest repo: https://github.com/srpadmanabhuni/agentest
- Docs: https://srpadmanabhuni.github.io/agentest/
Try it on your own agent and tell us what it caught or missed.
Metadata
Release files for pytest-agentest 0.1.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 |
|---|---|---|---|---|
| pytest_agentest-0.1.0.tar.gz | 8.6 kB | With provenance | Details for pytest_agentest-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_agentest-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pytest_agentest-0.1.0-py3-none-any.whl |
Total release size: 17.0 kB
Release files / pytest_agentest-0.1.0.tar.gz
| Download URL | pytest_agentest-0.1.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
498ac44782ceb6a0951c91f34214fd1e2411388fdf21f9c7327b905f1b5dbfd2
|
|
BLAKE2b-256 checksum How to use checksums |
ac4cd3e98b9908ecc143ad0d242b8d130513f57ab5d9240d3437c0127052220e
|
| 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 24, 2026.
Transparency logRelease files / pytest_agentest-0.1.0-py3-none-any.whl
| Download URL | pytest_agentest-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a169d4418c768511b6b23a13a3fdaece1e492c9b99ae286d61fbe59431f3e919
|
|
BLAKE2b-256 checksum How to use checksums |
61af47fc98ee1f6601662e8663e3d5e3d0dbbb4a871fae60a38f88377c8cd31e
|
| 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 24, 2026.
Transparency logSecurity for pytest-agentest 0.1.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 pytest_agentest-0.1.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 Nov 24, 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.