AWS Builder Center

Why I Built an AI Agent That Refuses to Submit Your Forms

Inside EVA, an evidence-first AI system built for the AWS First Commit hackathon that separates reasoning from execution and won't submit anything without a human's explicit approval.

Learning and building stuff
Three days before the WeMakeDevs × AWS First Commit hackathon started, I sat down and read through projects that had actually won hackathons: AWS, Google, GitLab, Anthropic, ETHGlobal, TreeHacks, HackMIT, PennApps. Not to copy anything, but to find the pattern under the pattern. What do judges reward when a hundred teams all show up with some version of "AI agent that does X"?
The pattern was almost always the same. The winning projects weren't the ones with the smartest model. They were the ones that were honest about what a model can't do.
So I started from that constraint instead of an idea.

The scenario that broke my first design

Picture an intern uploading three documents to start their onboarding: a personal profile, an offer letter, a college NOC. Somewhere in there, a location field disagrees with itself. The profile says Mumbai. The offer letter says Bangalore.
A normal LLM agent looks at both, picks one, and moves on. Maybe it goes with whichever document it read last. Maybe it just picks the more plausible-sounding one. Either way, it's guessing, and the user has no idea a guess just happened somewhere in a form that's about to get submitted with their name on it.
That's the failure mode I wanted EVA to be structurally incapable of.

Reasoning and enforcement are different jobs

The design that came out of that constraint splits the system into two halves that don't trust each other.
One half is language models: an orchestrator that reads intent, an evidence agent that pulls structured fields out of documents, a form-filling agent that maps evidence to a target form's schema. These are useful, and they're also probabilistic, which means they're wrong sometimes. I wanted the architecture to assume that from the start instead of patching it in later.
The other half is deterministic code that doesn't care how confident the model sounded. A string-normalization comparator catches the Mumbai/Bangalore mismatch, handles regional aliases like Bengaluru versus Bangalore, and halts the workflow the moment it finds a contradiction on a critical field. Cedar, AWS's policy language, evaluates every consequential action against declarative rules that live entirely outside the model. The rule that actually matters looks like this:
forbid (
principal,
action == Eva::Action::"submit_form",
resource
)
unless {
context.human_approved == true &&
context.action_hash_valid == true
};

The form-filling agent can propose a population plan and explain its reasoning for every mapped field. It cannot authorize its own submission, because  submit_form  denies by default and only flips to allow once a human has signed off on a cryptographic hash of the exact form state at that moment. Change the form after the approval was requested, and the hash stops matching. The old approval is dead. Nobody can replay a stale yes against new data.

What "evidence" actually means here

The part that took longer to get right than I expected was treating every extracted field as evidence, not truth. A value coming out of Bedrock isn't just  work_location: "Bangalore" . It carries its own receipt:
{
"evidenceId": "ev_01",
"field": "work_location",
"value": "Bangalore",
"sourceDocumentId": "doc_offer",
"sourceDocumentName": "Internship_Offer_Letter.pdf",
"sourceLocation": "page:1",
"confidence": 0.96,
"provenanceStatus": "SOURCE_BACKED"
}

Which document, where on the page, how confident the model was. When a user resolves a conflict manually by picking one source over the other, that override gets tagged  USER_ASSERTED  instead of  SOURCE_BACKED , so the audit trail can always tell the difference between "the document said this" and "the human said this." That distinction sounds small until you're staring at a hash-chained log six steps later, trying to figure out why a field has the value it has.

The part I'm least sure about

The deterministic layer doesn't solve everything. Cedar is only as good as the policies I write for it, and a fail-closed system is only safe if every action actually has an explicit deny rule attached to it. Halfway through the build I found I'd authorized  populate_form  for a new domain agent and forgotten to write a default-deny for it. Nothing catches that automatically. You have to read your own policy file slowly, twice, and assume you missed something the first time.
The bigger limitation: EVA can tell you two documents disagree. It can't tell you a document is lying. Hand it two forged offer letters that happen to agree with each other, and the comparator sees no conflict, and it moves straight through. Evidence-first architecture protects against silent LLM guessing. It doesn't protect against bad evidence that all points the same wrong direction.

Where it landed

By the end, EVA does one thing start to finish: internship onboarding, from three uploaded documents to a submitted sandboxed form, with a human approving the exact moment before anything irreversible happens. No login, session data encrypted client-side and gone the moment the tab closes, an audit trail you can actually replay step by step.
The line I kept coming back to while building it: AI can fill forms. EVA knows when it shouldn't. That's a smaller claim than "AI agent for bureaucracy," and it was the right one to make. The interesting problem was never getting a model to fill out a form. It was building the parts around the model that refuse to trust it, and figuring out exactly where that boundary needs to sit.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article