r/Python • u/AutoModerator • 25d ago
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
32
Upvotes
r/Python • u/AutoModerator • 25d ago
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
View all comments
2
u/tom_mathews 14d ago
Attest: pytest plugin for testing AI agents on what they did, not just what they said
Source: https://github.com/attest-framework/attest (Apache-2.0, I'm the author)
Web Page: https://attest-framework.github.io/
What My Project Does
Attest is a testing framework for LLM agents. In Python it's a pytest plugin with an
attestfixture and a chainableexpect()API; evaluation runs in a small Go engine the SDK starts as a subprocess. Checks run cheapest first: JSON schema, cost/token/latency limits, which tools ran, in what order and with which arguments, content patterns. All of those are deterministic and free. Embedding similarity and LLM judges come last and are optional.attest capture -- python my_agent.pyrecords a real run (model calls, trace, secrets redacted). Tests then replay the agent's current code against it, so CI makes zero model calls. 1.1 came out on November 10; it also fails anyexpect()chain you built but forgot to evaluate, and pytest-xdist runs now produce a complete report.Try it, no API key needed:
Target Audience
Teams putting agents into production or CI, in Python 3.10+ (a TypeScript/Vitest SDK exists too). The capture/replay merge gate and behavior contracts are marked stable; several other features are beta or experimental, and the README labels each one. It has no external users yet, so expect rough edges.
Comparison
DeepEval and promptfoo are strong at scoring outputs with metrics and rubrics. Attest focuses on the trace and its side effects: per-key call counts, effects on a simulated backend, record/replay with no model calls, and mutation testing that tells you what your suite misses. Compared with vcrpy or pytest-recording, the recorder understands model APIs (streaming, templated ids, redaction) and drafts contracts from the run. Most of the code was written with coding agents (Claude Code, Codex) from plans I wrote and reviewed.