An agent rule that lives in the prompt is a suggestion. AWS Greenlight, announced at re:Invent on December 1, moves the rule out of the agent and into an engine that checks every action before it runs. That fixes where the rule is enforced. It doesn't fix what the rule says, and that is where a refund agent still gets talked past its limit. If you're putting an agent in front of money, bookings or customer records, you'll see why the rule has to be written against a running total, and how to test it before any engine enforces it.
What AWS announced
AWS calls Greenlight "a first-of-its-kind automated reasoning service, now in preview, that keeps agents within bounds and on task." Teams write rules in plain language and, in AWS's words, "AWS Greenlight uses automated reasoning to turn them into deterministic rules that get followed every time."
The design choice that matters is where those rules run. AWS's announcement: "If rules live inside the agent's reasoning loop, the agent can find its way around them or even choose to ignore them as it optimizes for completing a given task. Instead, AWS Greenlight deploys rules to an enforcement engine that sits outside the agent's harness where the agent can't see or change them." The engine runs in Strands Box, AWS's open-source agent sandbox, and blocks any action that breaks a rule. AWS says developers can reach it as a power for Kiro and as a plugin for Claude Code and Codex. Delta Air Lines and LoanLogics are named as planning to use it. It's a preview, so treat the details as subject to change.
An enforced rule can still be the wrong rule
eWeek's write-up works through an example: a rule like "refunds over $200 require approval," and an agent that tries to issue $201. The engine blocks it. Then eWeek adds the catch: "If a team means $200 per order, its policy needs to account for two $150 refunds against the same order."
That's the gap. An engine can prove every action obeys the rule as written. It can't tell you the rule matches the policy you meant. A per-call limit passes two $150 refunds, three $100 refunds, or one refund per message across a long chat, because no single call crosses $200. A customer who argues well, or an agent that splits a task to finish it, finds that path without trying to.
Write the rule against the total
Here is a sketch of how we would write the refund rule. It's ours, not AWS's, and it's plain TypeScript, so it works as the gate in front of a tool today and as the spec you'd turn into a Greenlight rule later. The point is the input: the check sees what has already been refunded on the order, not only the call in front of it.
type Refund = { orderId: string; cents: number };
type Verdict = "allow" | "needs_approval" | "deny";
const LIMIT = 200_00; // per order, in cents
function checkRefund(
call: Refund,
refundedCents: number, // already refunded
paidCents: number, // order total
): Verdict {
if (call.cents <= 0) return "deny";
const total = refundedCents + call.cents;
if (total > paidCents) return "deny";
return total > LIMIT ? "needs_approval" : "allow";
}
// The cases a per-call rule gets wrong.
const cases: [number, number, Verdict][] = [
[0, 201_00, "needs_approval"], // one big refund
[150_00, 150_00, "needs_approval"], // split in two
[100_00, 100_00, "allow"], // exactly at the limit
];
for (const [done, ask, want] of cases) {
const got = checkRefund({ orderId: "o1", cents: ask }, done, 500_00);
if (got !== want) throw new Error(`${done}+${ask}: ${got}`);
}
What to notice: refundedCents comes from your order system, never from the agent, and the second case is eWeek's split refund. Keep a list like cases for every rule. When you move a rule into an enforcement engine, these become the questions you check it answers the way you meant.
Where this breaks
A rule only covers actions that pass through the engine. eWeek says it plainly: "The rule applies to actions that go through the enforcement engine." If the agent can also call your payments API directly, through a second tool or a stored credential, the engine never sees that refund. List every route to the money before trusting any single gate.
The running total has to be correct too. If two refunds land at the same moment and both read the old total, both pass. Read and update the total in one transaction, or hold a lock per order.
And every needs_approval sends work to a person. AWS's pitch is fewer of those over time: as the agent handles new situations, Greenlight "studies its behavior and proposes better rules for teams to compare and approve." That's still a person deciding which rule changes are right, so keep someone who knows the policy on the approvals, and keep the case list in version control next to the rules.
If you're designing these limits for a support or finance agent, our AI agent guardrails page covers how we put approvals, limits and logs around agents that act on real accounts.
What to remember
- Greenlight moves agent rules out of the prompt into an engine the agent can't see or change. Getting the rule's wording right is still your job.
- Write limits against the running total for the order, account or day, never the single call.
- Keep test cases next to each rule, including the split case, and check any enforcement engine against them.
- An engine only sees the actions routed through it. Close every other path to the same API.
If an agent of yours is about to touch money or customer records and you want a second pair of eyes on its limits, book a conversation with us.
Sources
- Amazon Staff, About Amazon, "AWS Greenlight lets organizations trust AI agents with their most complex work", December 1, 2026: https://www.aboutamazon.com/news/aws/aws-greenlight-automated-reasoning-ai-agents
- Corey Noles, eWeek, "AWS re:Invent 2026: AWS Context, Greenlight and Ergo", December 1, 2026: https://www.eweek.com/news/aws-reinvent-2026-keynote-ai/



