5 min read
AWS launches Greenlight to formally verify AI agent rules

- Reading
- 5 min
Greenlight takes rules such as refund limits out of the model's prompt and turns them into mathematically verified policies before they apply in production. But AWS itself admits that formal proof has well-defined limits.
AWS has announced Greenlight, an automated reasoning service that writes policies for an AI agent's tool calls, verifies those policies formally and then enforces them outside the agent itself. The service is available as a Kiro feature and as a plugin for Claude Code and Codex, with approved policies being deployed to Amazon Bedrock AgentCore Gateway or to Strands Box.
The appeal for developers is easy to grasp: a rule such as "deny any refund above $500", one of the two rules in the sample refunds agent published by AWS itself, no longer lives only in the system prompt, where the model can simply ignore it. A command such as "govern my agent" is enough to start a review cycle.
How Greenlight writes and proves the rules
The service analyzes procedures, regulations and recorded traces of previous runs, including rules that were never formally written down, and drafts policies from that. Next, it looks for gaps, conflicts and risky access combinations. Nothing is enforced until a person approves the policy set.
The policies are written in Dogwood, an open source language that extends Cedar with temporal conditions over previous calls within the same session. According to AWS, an LLM writes the draft of the rules and then an automated reasoning technique (the same family used in IAM Access Analyzer) translates the set into formal logic. A solver then searches, among all possible sequences of calls in a session, for one that breaks a rule.
Before activating a policy set, Greenlight can validate it against the tools' schema, replay already recorded calls and run property checks that return one of three results: Verified, Not verified or Inconclusive.
Where enforcement happens
Policy enforcement runs on the gateway or inside Strands Box, not in the agent itself. That means the agent keeps working normally even if the Greenlight service becomes unavailable, since the decision to block a call or not does not depend on a real-time query to the service.
An AgentCore Gateway can start in log-only mode, recording violations without blocking anything, which is useful to observe behavior before locking the agent down. Strands Box, on the other hand, has no log-only mode: there, the approved policy applies from the very first moment.
The limits of formal proof
Greenlight's proofs are narrower than some launch announcements suggest. AWS's own official limitations documentation states that the analyzer treats a tool's inputs as any possible value of their type, does not read IAM or a company's corporate directory, and assumes that any well-typed tool return is possible. In practice, a trace showing a failure indicates that the policies would not prevent that sequence of calls, not that it will actually happen.
Checks can also time out and return Inconclusive instead of a definitive answer. In AgentCore Gateway, monetary values are rounded to four decimal places, and temporal policies typically look back only 24 hours within the same session, not across a customer's full history.
What the first independent test found
In a first-impressions analysis, developer Fabio Douek ran AWS's sample refunds agent in his own account. The $500 limit was verified (Verified) without trouble. But a second rule, which required a prior lookup before the refund, did not pass on the first attempt: the initial draft only checked the existence of the lookup response, so a request made just outside the 24-hour window still counted as valid.
Douek had to add a fourth policy requiring that the request itself, and not just the response, fall within the time window. Only after that did the checks pass. He also tested whether the policy set blocked a second refund for the same order: the service showed that the rule "never more than $500" is not equivalent to "never refund the same order twice", a reminder that formally verified policies still depend on whoever writes them thinking of every case. According to him, most of the test time was spent setting up the preview environment, not using Greenlight itself.
What experts outside AWS point out
André Platzer, a professor at the Karlsruhe Institute of Technology, commented to IEEE Spectrum on the structural limit of any system that translates natural language into formal logic:
There is no formal way to go from the informal to the formal, so you're never really sure whether the informal natural English language was rendered correctly in logic.
André Platzer, professor at the Karlsruhe Institute of Technology
Platform engineer Aditya Aggarwal, in a post on X, raised a question about the level at which rule enforcement actually happens:
AWS says Greenlight checks every tool call and enforces the policy outside the harness, on AgentCore Gateway or Strands Box. Does that mean it sees the bash command, or the API call the command turns into? An agent with a shell can reach the same action ten ways.
Aditya Aggarwal, platform engineer
Where Greenlight fits in the rest of the stack
Greenlight was not born in isolation. It is built on top of AgentCore Policy, which already authorizes tool calls at the gateway using Cedar and, since August, Dogwood as well. The difference is that Greenlight automates the drafting and the formal verification of the policies, instead of requiring teams to write everything manually.
It is worth noting that this is different from Amazon Bedrock Guardrails Automated Reasoning checks, which evaluate what a model says, not whether a tool call may proceed. They are complementary layers, not competing ones.
For those who prefer to write policies by hand, AWS provides the Dogwood CLI; more generic engines such as Open Policy Agent remain as alternatives outside the AWS ecosystem. NVIDIA NeMo Guardrails, in turn, takes a programmable approach that mostly depends on the model at runtime (model-in-the-loop), instead of running a solver over all possible sequences of calls as Greenlight does.
What changes for those building agents in Brazil
For teams already running AI agents in production, especially in regulated sectors such as finance and healthcare, the practical gain is having auditing and compliance that do not depend on the model "behaving". The policy lives outside the agent, is versioned, and can be tested against real traces before going live.
But the distance between "formally verified" and "safe in practice" still exists, as the duplicate refund case itself showed. Anyone adopting Greenlight needs to treat the LLM-generated draft as a starting point, not as a finished rule, and manually review the cases the solver does not cover, such as reading corporate directories or IAM rules.
Translated from the Brazilian Portuguese original · Read the original
The cost of computing is still what stops an out-of-control AI
Security researchers say the biggest brake on out-of-control AI agents isn't a lack of model intelligence, but the difficulty of paying for servers without going through identity verification.





