Use Cases
Use Case: Financial Agent Protection
Implementing risk budgets and anomaly detection for a fintech bot
Protecting a Financial Agent
This guide demonstrates how to use ABS Core to govern a Customer Support Agent that has the power to issue refunds and process payments.
The Problem
A generative AI agent might be manipulated via prompt injection to issue a refund that exceeds its authority or violates AML (Anti-Money Laundering) policies.
The Solution: Bonded Execution
With ABS Core, we define a Policy Pack that acts as a financial firewall.
1. Define the Policy
We create a policy that checks the refund_amount and the user_tier.
// financial-gateway.js
{
"rule": "max_refund_limit",
"condition": "event.payload.amount > 500",
"action": "DENY",
"reason": "Refund limit exceeded for standard tier"
}2. Configure the Risk Budget
The agent is assigned a Monthly Risk Budget of $5,000. Each refund subtracts from this budget. If the budget hit 0, the agent is automatically Slashed (halted).
3. Verification in the Ledger
Every blocked transaction is recorded with a unique trace_id.
{
"trace_id": "trc_9a2f1b",
"verdict": "DENY",
"policy": "financial-gateway",
"reason": "Risk Budget Depleted"
}Results
- Prevented Liability: The company is protected from "hallucinated" refunds.
- Real-time Enforcement: Decisions are made in <20ms at the edge.
- Verifiable Compliance: Auditors can see exactly why every refund was allowed or denied.