Star on GitHub ★

AgentAssert · AI Reliability Engineering

Contracts and examples

Start with a supplied-signal runtime check, then adapt a contract template or inspect an integration example. This catalog covers 12 YAML contract templates and 9 Python examples.

Installation and first steps → · Browse the source catalog →

Source snapshot: 9debcc02252c. Catalog reviewed 1 October 2026. Requirements and limitations accompany every entry.

Devtools

  • Contract template · Shipped template; adapt before deployment

    Code generation

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Customer Support

  • Contract template · Shipped template; adapt before deployment

    Customer support

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Ecommerce

  • Contract template · Shipped template; adapt before deployment

    Ecommerce customer service

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →
  • Contract template · Shipped template; adapt before deployment

    Ecommerce order management

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →
  • Contract template · Shipped template; adapt before deployment

    Ecommerce product recommendation

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Finance

  • Contract template · Shipped template; adapt before deployment

    Financial advisor

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Healthcare

  • Contract template · Shipped template; adapt before deployment

    Healthcare triage

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Mcp

  • Contract template · Shipped template; adapt before deployment

    Mcp tool server

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Rag

  • Contract template · Shipped template; adapt before deployment

    Rag agent

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Research

  • Contract template · Shipped template; adapt before deployment

    Research assistant

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Retail

  • Contract template · Shipped template; adapt before deployment

    Retail shopping assistant

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Telecom

  • Contract template · Shipped template; adapt before deployment

    Telecom customer support

    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")
    Before you start
    Install agentassert-abc[yaml,math] and download or clone the linked YAML file. Supply the observation fields required by the contract.
    Scope and limitations
    Checks evaluate caller-supplied observations. A template does not itself detect PII, hallucinations or medical risk, and does not certify regulatory compliance.
    Read the source →

Python examples

  • Python example · Shipped Python example; requirements vary

    Synthetic structured-signal proof; no network or agent framework required.

    Demonstrates the API usage in the linked Python example.

    python examples/00_quick_proof.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    An example demonstrates its declared observations and API path. Framework integrations can need additional packages; these listings do not claim every example was executed in this website build.
    Read the source →
  • Python example · Shipped Python example; requirements vary

    Example 01: Basic Contract Monitoring.

    Demonstrates the API usage in the linked Python example.

    python examples/01_basic_monitoring.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    An example demonstrates its declared observations and API path. Framework integrations can need additional packages; these listings do not claim every example was executed in this website build.
    Read the source →
  • Python example · Shipped Python example; requirements vary

    Example 02: E-Commerce Product Recommendation – Full Session.

    Demonstrates the API usage in the linked Python example.

    python examples/02_ecommerce_session.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    An example demonstrates its declared observations and API path. Framework integrations can need additional packages; these listings do not claim every example was executed in this website build.
    Read the source →
  • Python example · Shipped Python example; requirements vary

    Example 03: Drift Detection – JSD-Based Behavioral Drift.

    Demonstrates the API usage in the linked Python example.

    python examples/03_drift_detection.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    An example demonstrates its declared observations and API path. Framework integrations can need additional packages; these listings do not claim every example was executed in this website build.
    Read the source →
  • Python example · Shipped Python example; requirements vary

    Example 04: synthetic SPRT demonstration

    Explore sequential testing through the synthetic observations in the linked example.

    python examples/04_sprt_certification.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    This synthetic example demonstrates an API and statistical test. It does not certify a production agent or measure deployed reliability.
    Read the source →
  • Python example · Shipped Python example; requirements vary

    Example 05: LangGraph Integration – Contract Middleware.

    Demonstrates the API usage in the linked Python example.

    python examples/05_langgraph_middleware.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    An example demonstrates its declared observations and API path. Framework integrations can need additional packages; these listings do not claim every example was executed in this website build.
    Read the source →
  • Python example · Shipped Python example; requirements vary

    Example 06: CrewAI Integration – Task Guardrails.

    Demonstrates the API usage in the linked Python example.

    python examples/06_crewai_integration.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    An example demonstrates its declared observations and API path. Framework integrations can need additional packages; these listings do not claim every example was executed in this website build.
    Read the source →
  • Python example · Shipped Python example; requirements vary

    Example 07: Compositional Pipeline – Multi-Agent Safety Bounds.

    Demonstrates the API usage in the linked Python example.

    python examples/07_composition_pipeline.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    An example demonstrates its declared observations and API path. Framework integrations can need additional packages; these listings do not claim every example was executed in this website build.
    Read the source →
  • Python example · Shipped Python example; requirements vary

    Example 08: MCP Tool Server Monitoring.

    Demonstrates the API usage in the linked Python example.

    python examples/08_mcp_tool_monitoring.py
    Before you start
    Install agentassert-abc[yaml,math], clone the source, and review this example's imports and adapter setup before running.
    Scope and limitations
    An example demonstrates its declared observations and API path. Framework integrations can need additional packages; these listings do not claim every example was executed in this website build.
    Read the source →