The deterministic layer
Testing AWS Greenlight for Agents alongside open source Dogwood and Strands Box, with a Kiro research agent running real web research inside the box. The result supports one design choice for C=US: the model can propose, but a deterministic policy layer has to decide.
Counted from the box's own records (records.jsonl) for runs b-73d1…, b-8a3e…, b-96e7…, b-d637… and b-f554…, not from the agent's account of what it did.
Two kinds of control
An AI agent is steered by things it reads: a system prompt, steering files, a brief. Those work most of the time. A policy layer is different in kind: it sees each action and returns the same answer for the same input, every time, whatever the model believes.
What the model is told
- Agent prompt: the Research Lab cycle protocol
- Campaign brief: allowed sources, sub-questions
- Steering file: send a User-Agent with curl
Followed well in these runs. Nothing guarantees it next time, and the agent's report of what happened can be wrong.
What the box decides
- Routes: which hosts can be reached at all
research_sites_read_only: only GET and HEAD to research hosts- Default deny: anything unlisted is refused and recorded
Checked on every connection and request, with the rule's name in the record.
Where the layer sits in C=US
C=US already makes identity and authorization deterministic before an agent acts: who the agent is, who is accountable, and what it may do, failing closed. Dogwood in a Strands Box adds the same property to each action the agent takes once it is running. Greenlight sits beside the loop, turning recorded actions and stated requirements into policies and checking them.
The link between C=US grants and the box's policy is a proposal. In these tests the box ran on its own, without a C=US grant check.
What was tested
| Tool | Version | Role | Status |
|---|---|---|---|
| AWS Greenlight for Agents (plugin) | — | Onboarding, account checks, sample agent scaffold | PARTIAL |
| AgentCore CLI | 1.5.0 | Built the refundbox sample locally; never deployed | LOCAL ONLY |
| Dogwood CLI | 1.1.0 | format, check-parse, validate, lower, replay, explain | INSTALLED |
| Strands Box | 0.3.3 | Sandbox and Dogwood enforcement for the agent | TESTED |
| Kiro CLI + kirocrew-research agent | 3.8.1 | The research agent under test | TESTED |
Greenlight's own analysis (Analyze, Simulate, Verify) was not run. It needs AWS, and its pricing was not available locally, so the sample stack was built but not deployed. The Dogwood policies here were written by hand and checked by Strands Box when the profile loaded.
Controls test
Three requests from inside the box, each checked against the box's records afterwards.
| Request | Decision | Rule | Note |
|---|---|---|---|
GET en.wikipedia.org | ALLOW | route_research-reference | First returned 403 from Wikipedia: the shell's built-in curl user agent. Fixed with a steering file; then 200. |
POST api.github.com | DENY | research_sites_read_only | Connection allowed, request refused at the method. |
GET example.com | DENY | default-deny | No route, no permit. |
The read-only rule
// research.dw, listed in the box profile after the starter policy.dw @id("research_sites_read_only") forbid (principal, action == Box::Action::"http:request", resource) when { [ "en.wikipedia.org", "arxiv.org", "github.com", "docs.aws.amazon.com", … /* 25 hosts */ ] .contains(context.input.host) && !(["GET", "HEAD"].contains(context.input.method)) };
Five research cycles
The Kiro agent ran a five-cycle Research Lab campaign on the question "What is the Dogwood policy language, how does it relate to Cedar, and how is it used to govern AI agent tool calls?" It answered all four sub-questions and wrote an executive summary.
| Cycle | Topic | Research reads | Refused | Decisions |
|---|---|---|---|---|
| 0 | What Dogwood is | 1 | aws.amazon.com, docs.aws.amazon.com ×2, app.kiro.dev ×2 | 57 |
| 1 | Dogwood and Cedar, temporal operators | 8 | dev.to, app.kiro.dev ×2 | 88 |
| 2 | AgentCore Gateway enforcement | 5 | app.kiro.dev ×2 | 84 |
| 3 | Strands Box as a Dogwood runtime | 2 | app.kiro.dev ×2 | 57 |
| 4 | Executive summary | 0 | app.kiro.dev ×2 | 42 |
AWS sites were added to the allowed list after cycle 0. Each run also made between 17 and 29 calls to Kiro's own service for the model and web search (115 in all), all allowed by Kiro's route.
What the record showed that the agent did not
In cycle 0 the agent wrote that AWS documentation "returns 403". The box's record shows the site was never contacted: the connection was refused by default-deny because the host was not yet allowed.
Cycle 2 concluded that Strands Box "is not a policy engine". Cycle 3 read the Strands Box launch post and reversed it. The model's beliefs moved between runs; the box enforced the same rules in both.
Every cycle, Kiro tried to reach app.kiro.dev twice. Nobody asked for it, the work finished without it, and the only reason it is visible is that an unlisted host is refused and recorded.
The User-Agent fix is a steering file: the agent followed it, but could forget. The read-only rule is a forbid: it holds whether or not the agent remembers it, and its name appears in every refusal.
Session timeline
Greenlight sample agent
Checked the AWS account, installed AgentCore CLI 1.5.0 in a project folder without touching global npm, and built the refundbox sample locally. Stopped before deploying: the stack would create billable AWS resources, and the profile signed in as the account root user.
Asked to stay local
Greenlight needs AWS for policy checks, so the work moved to the open source pieces that run locally: the Dogwood CLI and Strands Box. The unused sample was deleted.
Boxed the research agent
Created a scoped Strands Box profile for kirocrew-research, with its two MCP servers, 23 research hosts as routes, and the read-only Dogwood rule.
Controls test
Signed in to Kiro inside the box, then confirmed allow, method-deny and default-deny against the records.
Research campaign
Ran five cycles. Added AWS sites after cycle 0 showed the agent needed them. Marked the campaign done.
Limits of these results
- One workstation, one agent, one campaign. No load, no adversarial testing.
- Greenlight's Analyze, Simulate and Verify were not run, so no policy here has been proved. No temporal (history-based) Dogwood rule was exercised.
- Box policy decides network, HTTP, shell and MCP actions. The agent's own file tools reach their granted folders without a policy decision, so file writes are limited by grants, not by rules.
- The research-host list is written twice, in the routes and in the read-only rule. A host added to one but not the other is either unreachable or writable.
- Kiro CLI 3.8.1 is newer than the 3.5.0 the box pack was tested with. Kiro reported running as root inside the box; its own sandbox was off, and the box enforced instead.
- The research findings come from the pages the agent read and were not independently fact-checked.
Proposed next steps
- Use the box's 328 recorded decisions as input to Greenlight's Learn step and compare its proposed policies with the hand-written ones.
- Run Greenlight's Verify on one property, for example "no request to a research site ever writes", once AWS costs are known.
- Add a temporal rule, such as a per-hour request cap per host, and test it with
dogwood replayagainst these traces. - Gate
box runon a C=US grant check, so a run starts only with a valid certificate, an active grant and a current window. - Sign the box's decision records into C=US evidence, so the kill switch and the audit trail cover per-action decisions too.