contracts

March 21, 2026 ยท View on GitHub

Community contract library for AgentContract.

Ready-to-use .contract.yaml files for common agent types. Pick one, adapt it, and enforce it on your agent in minutes.

Spec License Contributions Welcome


Use a Contract

pip install agentcontract
curl -O https://raw.githubusercontent.com/agentcontract/contracts/main/customer-support/basic.contract.yaml
from agentcontract import load_contract, enforce

@enforce(load_contract("basic.contract.yaml"))
def run_agent(user_input: str) -> str:
    return my_llm.run(user_input)

Available Contracts

CategoryContractDescription
customer-support/basic.contract.yamlTier-1 support agent, no PII, escalation policy
coding-agent/basic.contract.yamlCoding assistant with filesystem access
research-agent/basic.contract.yamlResearch agent with citation requirements
data-pipeline/basic.contract.yamlData processing agent with schema validation
regulated/gxp.contract.yamlGxP/pharma agent (21 CFR Part 11, GAMP5)

More contracts added weekly. Submit yours.


Contributing

Submit a contract for any agent type:

  1. Fork this repo
  2. Create <category>/<name>.contract.yaml
  3. Add a brief comment header explaining the use case
  4. Open a PR

Every merged contract is credited to its author. See CONTRIBUTING.md.


License

Apache 2.0 โ€” Part of the AgentContract open standard.