12 contract templates and 9 Python examples for runtime behavioral checks. Connect your observation fields, adapt the contract and inspect violations.
Choose a task, inspect its requirements and open the linked source before running it. Examples describe declared checks and inputs; they do not certify broader outcomes.
Catalog reviewed 1 October 2026. Source snapshot · Repository
Contract template
Contract template for code generation; includes declared checks for no secrets in output, no malicious code patterns, license compliance.
import agentassert_abc as aa
contract = aa.load("contracts/examples/code-generation.yaml")Contract template
Contract template for customer support; includes declared checks for no pii disclosure, no false commitments, escalation on legal threats.
import agentassert_abc as aa
contract = aa.load("contracts/examples/customer-support.yaml")Contract template
Contract template for ecommerce customer service; includes declared checks for no pii disclosure, no unauthorized account changes, no false promises.
import agentassert_abc as aa
contract = aa.load("contracts/examples/ecommerce-customer-service.yaml")Contract template
Contract template for ecommerce order management; includes declared checks for no unauthorized refunds, no price override, order status accuracy.
import agentassert_abc as aa
contract = aa.load("contracts/examples/ecommerce-order-management.yaml")Contract template
Contract template for ecommerce product recommendation; includes declared checks for no competitor products, no false availability, no unauthorized discounts.
import agentassert_abc as aa
contract = aa.load("contracts/examples/ecommerce-product-recommendation.yaml")Contract template
Contract template for financial advisor; includes declared checks for no unauthorized trades, suitability requirement, risk disclosure mandatory.
import agentassert_abc as aa
contract = aa.load("contracts/examples/financial-advisor.yaml")Contract template
Contract template for healthcare triage; includes declared checks for no diagnosis, emergency detection mandatory, no medication dosage advice.
import agentassert_abc as aa
contract = aa.load("contracts/examples/healthcare-triage.yaml")Contract template
Contract template for mcp tool server; includes declared checks for tool schema compliance, no unauthorized resource access, input validation required.
import agentassert_abc as aa
contract = aa.load("contracts/examples/mcp-tool-server.yaml")Contract template
Contract template for rag agent; includes declared checks for no hallucination beyond context, source citation required, chunk relevance threshold.
import agentassert_abc as aa
contract = aa.load("contracts/examples/rag-agent.yaml")Contract template
Contract template for research assistant; includes declared checks for source attribution required, no fabricated citations, no plagiarism.
import agentassert_abc as aa
contract = aa.load("contracts/examples/research-assistant.yaml")Contract template
Contract template for retail shopping assistant; includes declared checks for no counterfeit promotion, price accuracy, return policy compliance.
import agentassert_abc as aa
contract = aa.load("contracts/examples/retail-shopping-assistant.yaml")Contract template
Contract template for telecom customer support; includes declared checks for no unauthorized plan changes, billing accuracy, no pii exposure.
import agentassert_abc as aa
contract = aa.load("contracts/examples/telecom-customer-support.yaml")Python example
Demonstrates the API usage in the linked Python example.
python examples/00_quick_proof.pyPython example
Demonstrates the API usage in the linked Python example.
python examples/01_basic_monitoring.pyPython example
Demonstrates the API usage in the linked Python example.
python examples/02_ecommerce_session.pyPython example
Demonstrates the API usage in the linked Python example.
python examples/03_drift_detection.pyPython example
Explore sequential testing through the synthetic observations in the linked example.
python examples/04_sprt_certification.pyPython example
Demonstrates the API usage in the linked Python example.
python examples/05_langgraph_middleware.pyPython example
Demonstrates the API usage in the linked Python example.
python examples/06_crewai_integration.pyPython example
Demonstrates the API usage in the linked Python example.
python examples/07_composition_pipeline.pyPython example
Demonstrates the API usage in the linked Python example.
python examples/08_mcp_tool_monitoring.py