

This service is in preview release and is subject to change.

# What is AWS Greenlight for Agents?

**Important**  
AWS Greenlight for Agents is provided as a Preview under the [AWS Service Terms](https://aws.amazon.com/service-terms/).

AWS Greenlight for Agents turns your business rules into policies that control which tool calls an artificial intelligence (AI) agent can make, then uses automated reasoning to verify the policies do what you intended before you turn them on.

Tests only cover the cases that you think to write. Automated reasoning translates the policies into formal logic, and a solver searches every possible sequence of calls in a session for one that breaks a rule. If it finds none, the rule is verified. That’s how it finds the gaps that tests miss. It’s the same kind of reasoning AWS uses in [IAM Access Analyzer](https://docs.aws.amazon.com/IAM/latest/UserGuide/what-is-access-analyzer.html) to show who can reach your resources.

Each result lists the assumptions it relies on, so you know exactly what was verified. A check comes back **Verified**, **Not verified**, or **Inconclusive**. For details, see [Limitations of AWS Greenlight for Agents](limitations.md).

For example, say your refund procedure requires a manager’s approval for any refund over USD $500.00. AWS Greenlight writes a policy that denies a larger refund until the approval call has happened. It replays last week’s calls to show which refunds the policy would have stopped. Then it verifies that no sequence of calls in a session lets a refund over USD $500.00 through without that approval.

You give AWS Greenlight your documented procedures and rules, or describe them in plain English, and it learns from the calls your agent has already made. It runs inside your coding agent (Kiro, Claude Code, or Codex), and works with agents behind an Amazon Bedrock AgentCore gateway or in a Strands Box. To check policies, it calls the AWS Greenlight service, which runs the automated reasoning checks in AWS.

**Topics**
+ [How AWS Greenlight checks policies](#greenlight-checks)
+ [What AWS Greenlight changes](#greenlight-does)
+ [Terms used in this guide](#greenlight-terms)

## How AWS Greenlight checks policies
<a name="greenlight-checks"></a>

Before you turn any policy on, AWS Greenlight checks the policies in up to five ways, depending on your sources and policies.
+  **Validation** – Checks every policy against your tools' schema, so that a policy can’t name a tool or field that doesn’t exist.
+  **Simulation** – Replays your agent’s recorded tool calls against the policies, and shows which calls each policy would have denied. It runs when your agent has recorded calls.
+  **Analysis** – Uses automated reasoning to verify facts about the whole policy set. It finds policies that change nothing because others already cover them, tools that no call can reach, and tools that any input can reach.
+  **Property checks** – Verifies whether something can ever happen, for every possible call, not only the calls you recorded. For example, it can check whether the agent can ever reset a password without verifying the user first.
+  **Test cases** – For a policy that depends on earlier calls, writes two example sessions, one that follows the rule and one that breaks it. It checks that the policy allows the first and denies the second.

## What AWS Greenlight changes
<a name="greenlight-does"></a>
+ It writes the policies in Dogwood, an open source policy language for AI agents.
+ It changes nothing on your gateway or box until you approve a policy set and confirm the change. Then it applies only what you approved.
+ Your gateway’s policy engine or your Strands Box enforces the policies. AWS Greenlight is used only to write and check them, so your agent keeps working even if the AWS Greenlight service is unavailable.
+ On a gateway, it changes only its own policies, and whether the policy engine is in **log only** or **enforce** mode. The mode is one setting for the whole engine. AWS Greenlight’s policies are named `pb_<project id>_…​`. If your gateway also has a model target, which lets your agent call its AI model through the gateway, it adds a `pbmc_<project id>_…​` policy that allows those calls, so they still work when the engine enforces. During an update, it adds temporary `pbtmp_<project id>_…​` policies and removes them when it finishes. After each change, it updates an Amazon CloudWatch dashboard for the gateway. It doesn’t change your other policies.
+ If your gateway also passes requests through to an HTTP endpoint, such as an AgentCore Runtime, AWS Greenlight leaves those requests to you. Once the engine enforces, the gateway denies them unless one of your own policies allows them. AWS Greenlight warns you first.
+ In a Strands Box, it changes only its own marked block of the box’s policy file. If the box has no policy file yet, it asks you first. Then it can create `policy.dw` and list it in the box profile.
+ A rollback undoes the last change to your policies and the engine’s mode. It doesn’t remove the dashboard, the results bucket, or the network check’s queries. To remove those, see [Clean up AWS Greenlight for Agents](clean-up.md).
+ In your account, it creates an S3 bucket for test results only if you ask it to. If you run the network check, it creates Network Access Analyzer queries, saved as Network Access Scopes and tagged with your Runtime’s ID, and keeps them for later checks.
+ It doesn’t change your credentials or AWS Identity and Access Management (IAM) permissions. It doesn’t store your keys, and your coding agent doesn’t open your credential files.

## Terms used in this guide
<a name="greenlight-terms"></a>
+  **Dogwood** – An open source policy language for AI agents. A Dogwood policy can depend on earlier calls in a session, such as "deny a password reset unless the user’s identity was verified first." Dogwood extends Cedar, the policy language that AWS uses for authorization.
+  **AgentCore gateway** – An Amazon Bedrock AgentCore gateway, which puts your agent’s tools behind one endpoint. Its **policy engine** decides whether each tool call is allowed.
+  **Strands Box** – An open source sandbox that runs an agent and decides each action that it takes, such as a shell command or a tool call, with Dogwood policies in its policy file, `policy.dw`.
+  **Session** – One task that your agent works on, such as one help desk ticket. On a gateway, your agent names each session with the `x-amzn-bedrock-agentcore-policy-session-id` header. Policies that depend on earlier calls look only at calls in the same session.
+  **Recorded tool calls** – The calls that your agent already made, from your gateway’s logs or your box’s decision log. AWS Greenlight learns from them and replays them in simulation.
+  **Log only and enforce** – The two modes on a gateway. In log only mode, the gateway records which calls a policy would deny, but doesn’t deny them. In enforce mode, it denies them. Each policy has a mode, and so does the policy engine as a whole.
+  **Property** – A claim about every possible sequence of calls, such as "the agent never resets a password without an identity check first." AWS Greenlight checks properties with automated reasoning.
+  **Trace** – A sequence of calls that shows how a property can fail under your policies.
+  **Check result** – What a property check found: **Verified**, **Verified, assuming**, **Verified, not replayed**, **Holds only for these spellings**, **Not verified**, or **Inconclusive**. For what each means, see [Limitations of AWS Greenlight for Agents](limitations.md).
+  **Requirement status** – Whether the policy set enforces a rule from your sources: **In proposal**, **Not enforced**, **Not in proposal**, **Not enforceable**, or **From a dropped source**. For what each means, see [Read the report (Approval)](getting-started.md#getting-started-report).
+  **Version** – A policy set that you approved. AWS Greenlight numbers each version and can put an earlier one back.