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 één dag 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:
  • issue_refund
  • send_invoice
  • delete_user
  • change_subscription
  • create_wire_transfer
The tool name in Stacksona Gate must match the name your agent sends in the API request.
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.
Common rule types
  • 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.
Create a tool rule
  1. Go to Admin → Tools.
  2. Select the tool.
  3. Click to add a rule.
  4. Choose the rule type.
  5. Enter the payload parameter name.
  6. Enter the threshold, value, range, or pattern.
  7. Choose the action: AllowReview, or Reject.
  8. Save the rule.
Important rule tips
  • 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.
Example policy
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.


 

Was this article helpful?

0 out of 0 liked this article