Three AI agent experiments on AWS, and what we learned about control
A document app, an academic lending demo and an AWS remediation agent we are building raised the same four questions: where model calls are controlled, how spending is limited, when a person must decide, and what evidence remains.
When we start building an AI application, the model usually gets most of the attention. We compare answers, try different prompts and check how quickly it responds. Then the engineering questions begin. What will each request cost? What happens when a response is wrong? Can the software take an action that nobody intended? I think these questions need to be part of the first design discussion. On AWS, choosing the services is only part of the work. We also have to decide what the application is allowed to do.
Three experiments helped us look at these questions from different sides. DocuPal was an early learning project for simplifying documents, with its engineering lessons described in Building with Claude: AI-Native Software Engineering. AECC is an academic demo using synthetic companies and data to explore a credit assessment workflow. Agent Cloud Remedy is an AWS security tool we are building to investigate risky settings and prepare fixes for human approval. These are separate efforts at different stages. Comparing them is useful because the controls each one needs depend on what could go wrong.
What the DocuPal tests taught us
One result from DocuPal shows why measurement matters. As the book describes, the test campaign ran 2,114 tests against 17 endpoints, using 20 documents across seven languages and eight analysis modes. The total test cost was $7.88. Within that campaign, the most expensive model did not give the best results, while the cheapest performed best in the most-used analysis modes. Those results helped inform the model cascade, which decided where requests went. Easier requests could go to cheaper models when testing showed they were suitable. Other tasks could go to models that performed better on those tasks.
The book also describes a Lambda backend with per-user cost tracking. The cost of one request tells us very little about the cost of serving someone over a month. A feature may look inexpensive until it is used repeatedly. The historical deployment lessons included a staging account, tests for each Lambda function, health checks with CloudWatch alarms, and pinned versions behind API Gateway. Along with checking model quality, the team needed to understand running costs and check the application after deployment.
AECC: deciding where the model belongs
AECC, the academic demo, runs on AWS using Lambda, DynamoDB and CloudFront. Its model calls go through one adapter layer built for several providers, including Anthropic's Claude API, Amazon Bedrock and Microsoft Foundry, formerly Azure AI Foundry, under daily spend caps. The workflow has 13 steps. Four use an AI model, one is a mandatory human review, and the rest use fixed rules. Identity and sanctions checks never use a model. The AI proposes a track, such as secured lending, a guarantor or a small unsecured step-up. A formula sets the limit, rate and tenor. The demo uses synthetic data only. It is not a bank's system and does not make real lending decisions.
Agent Cloud Remedy: checking before changing
With Agent Cloud Remedy, we are working on a different risk: changing a live AWS configuration. The intended workflow finds a risky setting, prepares a fix plan, shows a dry run and waits for human approval. Our design goal is single-use authority for each approved job, limited to its agreed targets and actions. A separate check verifies the result. We are also designing evidence retention and legal holds, so a held record cannot be disposed of. Every model call is intended to pass through one gateway, built for several providers including Amazon Bedrock. The product is still under development and has no customer use.
Four patterns worth comparing
These experiments do not share one framework, and they do not all implement the same controls. DocuPal gives us historical engineering lessons, AECC provides an academic demonstration, and Cloud Remedy is still being built. Four questions keep coming up: where model calls are controlled, how spending is limited, when a person must decide, and what evidence remains.
1. Put model calls through a controlled route
When different parts of an application call models independently, it becomes harder to understand why a model was selected or what a request cost. A common route gives the team a place to manage those decisions.
AECC has its adapter layer. Cloud Remedy's design uses one gateway for every model call. DocuPal's related lesson was the cascade, which brought model selection into a routing decision based on testing. Having a defined place for these decisions makes it easier to review model use as the application grows. Support for several providers should not be confused with automatic failover, which remains a target for AECC.
2. Decide how spending will be limited
Daily spend caps are part of AECC. DocuPal's published account covers per-user tracking and cost planning. Cloud Remedy's planned gateway refuses a model call if no price has been configured for that model. If a call's outcome is unknown, it is counted as spent and is not retried automatically.
The three handle cost in different ways. The question for a new application is what should happen when usage exceeds expectations. A dashboard may help explain the bill, but the workflow also needs rules about whether it can continue spending. This matters when an agent can make repeated calls without someone watching each one.
3. Make human review specific to the decision
AECC includes a mandatory human review. Cloud Remedy is being designed to require approval before a cloud change. The useful question is what information the reviewer receives and what their decision authorizes.
A request to “approve the fix” is too vague if the person cannot see the affected resource or understand the proposed action. In an academic credit workflow, the reviewer needs to distinguish the model's suggestion from the fixed rules and calculations. Adding an approval button is the easy part. Giving someone enough information to make a decision takes more work.
4. Keep evidence while the work happens
If a workflow fails, someone will need to establish which step ran, what information it used and what happened next. Trying to reconstruct this later from scattered logs can take longer than the original task.
In AECC, each model call must refer to evidence IDs that identify supplied documents and facts. This is intended to keep its reasoning tied to the material provided. The references still need checking; an evidence ID alone does not prove that a conclusion is correct. Cloud Remedy's design includes retaining evidence for a defined period and supporting legal holds.
For a new application, I would decide early what each step must record, who may read it and how long it should be kept. This also needs a privacy review. Useful evidence should help explain a decision without collecting unnecessary sensitive information.
A short checklist for your own build
Before allowing an agent to do useful work in an AWS account, I would ask:
- Do model calls pass through a route where model choice and cost can be checked?
- What stops spending from exceeding the limit we agreed?
- Which steps need a model, and which should remain fixed rules?
- What exactly does a person approve before a change?
- How will we verify the result separately from the agent's own report?
- What evidence will remain if someone questions the action later?
The model will probably change as better options become available. The team will still have to explain its costs, permissions and decisions. That is why I would make room for these controls in the first version, while the workflow is still small enough to understand.
About the author
Srini Ramakichenane is the founder of Viran Digital Labs, with 25 years of experience across Asia Pacific.
He holds the AWS Certified AI Practitioner and AWS Certified AI Business Strategist certifications and writes about AI engineering and governed agents.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article