Agent Framework
Sign Up Now →Sign Up Now

Control actions with rules

The agent proposes a tool call. The decision engine checks governed calls, and a person handles calls that require approval.

Available

Start with a governed tool#

The refund example declares get_order as a read tool and issue_refund as governed, with a manager approval role:

tools:
  - name: get_order
    reads: true
  - name: issue_refund
    governed: true
    approval: manager

Add the rules and context binding in rules.yaml, then check and deploy the application. The YAML reference’s rules.yaml example shows the full sample configuration. These declarations alone do not install a refund policy.

The sample checks the requested amount plus the order’s previous refunds: above $500 is denied; above $100 asks for approval; otherwise it is allowed. These are sample policy thresholds, not product prices or a suggested business policy.

Test a call in Rules#

  1. Open the deployed agent’s Rules tab.
  2. Under Try a call, supply an order ID, amount, and reason.
  3. Select Decide and read the outcome, matched rule, and context.
  4. Try values on both sides of each boundary. Check prior refunds when interpreting the cumulative total.

The tester can read current context through read-only tools. It does not issue a refund or create a recorded live decision. The exact outcome depends on the order’s current facts.

Allow#

A live governed call may proceed after the checks pass.

Ask#

A live call is held for the authorized reviewer. A draft test shows a hold without adding an Inbox item.

Deny#

The effect does not run. Inspect the rule and facts rather than changing the prompt to bypass it.

Cannot decide#

Missing context, invalid required values, or an unavailable engine prevent execution and return a diagnostic.

Review a live held call#

  1. Open Inbox → Held tool calls.
  2. Confirm the application, agent, conversation, tool arguments, and rule that requested approval.
  3. As the authorized reviewer, enter the required note and select Approve and run, or reject the call.
  4. Inspect the resulting decision and tool outcome. Approval and successful execution are separate facts.

A second attempt to approve the same item is refused. Refresh the record if someone else has handled it. If an interrupted call has an unknown effect outcome, investigate the external result before attempting any new action.

When context is unavailable#

GATE_CONTEXT_UNAVAILABLE means a required context read failed. POLICY_RULE_EVALUATION_FAILED can indicate an unresolved required value. Missing facts are not silently treated as zero or as permission. Fix the source or binding, then test the rule again.

Skill instructions can explain a policy, but the governed-tool rule is what enforces it. An agent’s explanation is not a human sign-off or proof of execution.