How to Configure Tools and Rules
Tools and rules control when AI agent actions are allowed, rejected, or sent to human review.
Stacksona Support
Last Update 2 maanden geleden
Who this article is for
Use this article if you are an admin configuring approval policy.
What is a tool?
A tool is an action your AI agent may request permission to run.
Examples:
What is a rule?
A rule checks a value in the request payload and chooses an action.
A rule can:
For a refund tool:
Use this article if you are an admin configuring approval policy.
What is a tool?
A tool is an action your AI agent may request permission to run.
Examples:
- issue_refund
- send_invoice
- delete_user
- change_subscription
- create_wire_transfer
What is a rule?
A rule checks a value in the request payload and chooses an action.
A rule can:
- Allow the action.
- Send the action to review.
- Reject the action.
- Upper limit: Match when a numeric value exceeds a threshold.
- Example: Review refunds over 250.
- Lower limit: Match when a numeric value is below a threshold.
- Example: Review confidence scores below 0.80.
- Between: Match when a number is within a range.
- Example: Review transfer amounts from 500 to 2,000.
- Contains: Match when text contains a word or phrase.
- Example: Reject reasons containing fraud.
- Regex: Match text against a pattern.
- Example: Review emails sent to certain domains.
- Go to Admin → Tools.
- Select the tool.
- Click to add a rule.
- Choose the rule type.
- Enter the payload parameter name.
- Enter the threshold, value, range, or pattern.
- Choose the action: Allow, Review, or Reject.
- Save the rule.
- Parameter names must match the keys in the agent’s request payload.
- Use clear and predictable payload fields such as amount, currency, customer_id, email, or risk_score.
- Start with conservative rules, then loosen them after observing real review patterns.
- Use Review for ambiguous cases and Reject for clearly prohibited cases.
For a refund tool:
- Allow refunds below $50.
- Review refunds from $50 to $500.
- Reject refunds over $500 unless handled by a separate escalation process.
