Contract tab on AI Agent asset pages

The Contract tab on AI Agent asset pages shows the combined set of rules currently governing that agent, drawn from the global agent contract and any additional, specialized Agent Contract assets related to it, and lets you compile them so that Guardian uses them.

For a view across every Agent Contract asset in your environment, go to the Agent contracts page.

Contract tab components

The Contract tab of an AI Agent asset page, showing the Guardian stats cards, the Combined contract panel with numbered rules, and the Details sidebar with the Contract status panel and the Apply changes button.

Component Description
Guardian stats

A row of three cards with Guardian statistics for this agent over the last 30 days:

  • Number of Guardian invocations: the number of turns Guardian checked. A turn is one run of the agent, from the user's request to its final answer.
  • Issues: the number of turns in which Guardian found at least one violation.
  • Guardian pass rate: the percentage of turns with no violation.
Combined contract The full set of rules currently applying to this agent, combined from the global agent contract and any specialized agent contracts related to it. A toggle switches between a plain-language rules view and the compiled YAML of the agent's enforcement bundle, the machine-checkable form of those rules that Guardian actually evaluates. In the rules view, the rules are numbered and grouped under a heading for the Agent Contract they come from, for example the global agent contract.
Contract status

An Apply changes button compiles the agent's rules so that Guardian uses the latest Agent Contract updates.

  • Guardian doesn't recompile an agent's rules automatically when an Agent Contract changes, so click Apply changes after you update or delete an Agent Contract.
  • Compiling takes a few minutes. Only one compilation for an agent version runs at a time, and a second request waits for the first one to finish.
  • Each compilation creates a new version of the compiled rules, even when nothing has changed.
  • An agent can only be compiled if Guardian recognizes it and it has an AI Use Case that documents it. Without an Agent Contract that applies to it, or with a contract that has no usable rules, there's nothing to compile.

The panel shows the state of the compilation:

  • When the agent or its contracts have changed: A banner says "The agent and the linked contracts changed recently. Time to recompile, so Guardian uses the latest changes." The panel also shows "Last compiled on {date}". Click Apply changes to compile the rules.
  • While the rules compile: The button is disabled and shows a spinner and the text "We're compiling your contract." If an earlier compilation exists, the panel shows "Last compiled on {date}", and Guardian keeps using those earlier rules until the new compilation finishes. If this is the first compilation, the panel shows "Applies the most recent changes, so Guardian uses them going forward." The YAML toggle in the Combined contract panel is disabled, with the tooltip "The contract YAML can't be viewed until it finishes compiling."
  • When the compilation is finished: The panel shows the date that the rules were last compiled, and tells you to update the contract reference in your SDK so that Guardian uses the new rules.
  • If the compilation fails: A red alert that you can dismiss says "We couldn't compile the contract on {date}. Try again." The date is left out if there isn't one. If a compilation succeeded before, the panel shows "Last compiled on {date}". The button is enabled so that you can try again.
Contract structure Summarizes how many rules the agent follows and how many Agent Contracts they're combined from, for example "This agent follows 11 rules combined from 1 contract". It appears in the Details sidebar, together with the contract status. Below the summary, it lists each Agent Contract contributing rules to this agent, for example the global agent contract plus any specialized agent contracts related to it, along with the number of rules each one contributes.

How rules are combined

Guardian merges the rules of the global and specialized Agent Contracts when it compiles them. If two rules conflict:

A rule that is dropped because another rule takes precedence isn't enforced. The product doesn't flag conflicts. To see which rules were overridden, switch the Combined contract panel to the YAML view. An overridden rule shows the outcome unbound and the reason.

Rules that Guardian can't enforce

The text of a rule isn't checked when you save it. When Guardian compiles the rules, it works out for each rule whether it can enforce it. A rule isn't enforced, or is only partly enforced, in the following cases:

Some rules need no enforcement. Rules that only allow something, and rules that don't apply to this agent, don't produce an enforcement check. A rule that can't be enforced never stops the other rules from being compiled and enforced. If none of the agent's rules can be enforced, no rules file is created.

Note To see which rules Guardian enforces, switch the Combined contract panel to the YAML view after the rules have been compiled. Each rule is listed with its outcome and the reason: bound means enforced, and partially_bound means partly enforced. If another rule took precedence, the outcome is unbound, and the reason names that rule and its contract. When two rules only partly overlap, both are enforced, and the product doesn't show the overlap. When you create a contract with your AI assistant, it also tells you which rules can't be checked while the agent runs.

What's next