API stability¶
AgentProbe follows semantic versioning: within a major version (1.x), upgrading shouldn't break your fault tests. This page says what that promise covers, and how changes are made.
What's covered¶
Stable — everything exported in __all__ of these modules:
| Module | What's in it |
|---|---|
agentprobe.testing |
probe(), Probe, ProbeResult and its assertions, scenarios (p.on(...)), records, scripted models, the built-in faults |
agentprobe.faults |
ToolCallError and the built-in faults |
agentprobe.script |
Script steps for scripted models: tool_call, tool_calls, reply, repeat |
agentprobe.errors |
ProbeError, HarnessLimitation, ParallelToolCallsUnsupported |
For these, the names, the parameters of public functions and methods, and the public attributes of results and records are part of the API. A snapshot test (tests/test_api_snapshot.py) guards their structure: exported names, base classes, parameter names, order, kinds and defaults, whether a function or method is async, properties, and public fields of results and records. Changing any of these makes it fail. It doesn't check types, return values or behaviour; those are covered by the rest of the test suite and by review, not by the snapshot.
The JSON report from result.to_dict() carries schema_version (currently 1.4). Within 1.x, fields are only added, never removed, renamed or retyped. Each added field bumps the minor schema version and is listed in the changelog.
The research toolkit (agentprobe.benchmark, agentprobe.injector, agentprobe.observer, agentprobe.agents, python -m agentprobe.demo and the top-level agentprobe exports) is supported and follows the same versioning, but isn't checked by the snapshot test. Framework adapters have their own support levels (#97), and the pyautogen 0.1.14 adapter is kept for reproducing the paper.
Not covered:
- Modules and names starting with _, and anything not in a module's __all__.
- Constructors of classes AgentProbe builds for you: results, records, ToolScenarios (from p.on(...)) and ScriptedModel (from p.model(...)). Use their attributes and methods, not their constructors.
- Exact wording of messages, summaries and repr() output.
- The research/ directory (experiment scripts and paper material).
How changes are made¶
- Patch releases (1.6.1) fix bugs and security issues only.
- Minor releases (1.7.0) add features. They may also fix a bug that let a test pass without testing anything, such as a fault that never fired or an assertion that checked nothing. Such a fix can turn a test that passed by accident into a failing one. Every one is called out in an Upgrading note at the top of that release's changelog entry.
- Major releases (2.0.0) may remove or change stable API, but only after a deprecation.
Deprecation¶
A stable name or parameter is removed only after it has been deprecated:
- It keeps working, and using it emits a
DeprecationWarningthat names the replacement. - The changelog lists it under Deprecated.
- It stays for at least one minor release and at least 60 days, whichever is longer, and is removed only in the next major release.
To see deprecation warnings in your own test suite, run pytest with -W error::DeprecationWarning, or add it to filterwarnings in your pytest config.
Python versions¶
AgentProbe supports Python 3.11 to 3.14. CI tests all four on Linux, and Python 3.12 on macOS. Windows isn't tested yet. Support for a Python version is dropped only in a minor release after that version reaches its end of life, and the changelog says so in advance.
Type hints¶
The package ships a py.typed marker, so type checkers use AgentProbe's annotations. mypy --strict passes on the whole package, and CI enforces it.