A customer-support agent with refund and discount tools can create real financial damage if every tool call is treated as trustworthy. AgentGuard is a small testbed for a simple idea: the model can propose an action, but the server should decide whether that action is allowed.
The repository runs the same billing-support task in two modes. The naive version calls its tools without policy checks. The guarded version routes each call through backend rules and returns a decision receipt: what was allowed or blocked, which rules were checked, the values used, and a safe alternative the agent can offer.
Make the comparison fair
The demo is built around eight scripted adversarial customer scenarios. Both versions face the same prompt, model, customers, and clock; the guardrail is the difference. That lets the project show the cost of a missing policy layer instead of relying on a vague claim that one prompt is safer than another.
For example, a demand for an 80% discount can be blocked by a maximum-discount rule, while the agent can still offer the permitted discount. The important part is that the limit lives on the backend, outside the model's control. A transcript and a damage scoreboard make the result inspectable after the run.
The repository also documents integration paths for agent frameworks and MCP-style tool servers. That makes the core question portable: wherever an AI agent can call a tool with consequences, which system owns the final authorization?
Explore it
The project is open source under the MIT License. Start with the AgentGuard repository for its scenarios, server-side policies, and demo. This is an engineering demonstration, not a production billing service or a formal safety guarantee. It is a way to make policy enforcement concrete and testable before connecting an agent to real customer accounts.
Top comments (0)