Fixing Failed Builds with an AI Agent on Amazon Bedrock
A developer tools company added an AI agent on Amazon Bedrock that fixes failed builds inside the product. 15 of its 18 rebuilds left the app live, and nothing changes without the user's tap.
The problem.
Our client's product writes an application's backend from a plain-English description and lets users run the generated project in a hosted sandbox. When a project failed to build or crashed, the user had to download it and fix it by hand, which is the work the product sells to remove. None of those failures were fixed inside the product.
Users wanted help that does the work, not only explains it. Any agent also had to fit the business model: every model call paid in credits, a stop when the credits run out, and no change to a user's data or credits without their consent.
What we built.
An agent that does the work
Users talk to the agent in plain English. On each step the model on Amazon Bedrock decides which tools to call, the application runs them, and the loop repeats until the job is done. To fix a failed run, the agent reads the log, opens the file it points to, edits it, rebuilds, then sends the same request again to check the fix. Multi-step fixes run on the Claude Sonnet line, and prompt caching keeps long loops affordable.
Consent built into the tools
A schema change or a sandbox run only produces a plain-English confirm card, and nothing happens until the user taps it. Each sandbox run sits in its own AWS Lambda MicroVM with no AWS permissions, the agent's tools reach only the user's own run, and there is no tool for billing, plans or other users' projects.
Credits checked before every call
Chat runs on a short tool loop on the Amazon Bedrock Converse API that reserves credits before each model call and streams every step to the browser. Background tasks run on the Strands Agents SDK and pause for approval at every 150 credits. Each message is capped at 24 model calls, 5 rebuilds and 12 minutes.
Run inside the existing product
The agent runs inside the existing API on Amazon Elastic Container Service (Amazon ECS) with AWS Fargate, behind Amazon CloudFront and AWS WAF, with task state in Amazon Relational Database Service (Amazon RDS) for PostgreSQL so any task can resume a paused job. Model invocation logging records every call, and Amazon CloudWatch alarms notify the team. We run it as a managed service.
AWS services in this engagement
The results.
Over the agent's first 20 days in production, with our own test traffic left out, 15 of its 18 rebuilds left the app live (83%), where before every failed run was fixed by hand. None of the 19 actions that change data or spend credits ran without the user's tap, 99.7% of model calls succeeded, and 84.8% of input tokens came from the prompt cache. The company has told us they are satisfied with the agent and with progress.
What we learned.
Safety settings written for one kind of AI do not always suit another. The filter we first used for generated content blocked an ordinary repair step because it sounded dangerous. For an agent that takes actions, the real protection is asking the user before anything changes, giving the agent only the tools it needs, and setting clear limits. We now design agents that way from day one.
About Manthic.
Manthic Technologies is an AWS Advanced Tier Services Partner based in Lagos, Nigeria. We design, build and run solutions on AWS for our clients.
Tell us what you're trying to ship.
A 30-minute scoping call with the engineers who would do the work.