AWS Partner Network (APN) Blog
Governing Agent Loops on Amazon Bedrock
By: Serge Shevchenko, Co-Founder and Head of Revenue – Blunom Inc.
By: Marina Novikova, Sr. Partner Solution Architect – AWS
![]() |
| Blunom |
![]() |
Somewhere in your organization, an agent is reasoning, calling tools, and retrying. The question is not whether it works but whether you can prove what it did, how much it cost, and what its limits are. That gap defines where agentic AI stands today. Teams have proven that agent loops can automate real multi-step work. The open question is no longer capability. It is control: how to run agents safely, at scale, in your own environment, without spiraling cost or risk. This post explains how agent loops work, how to build and govern them with AWS-native services, and when governance needs its own control plane.
What are agent loops?
An agent loop is the execution pattern behind most agentic AI. The agent takes a goal, reasons about the next step, calls a tool or API, observes the result, and repeats until the task is done. Unlike a single prompt and response, the loop continues across many steps, and the agent makes decisions at runtime that nobody scripted.
On AWS, your organization can build agent loops with Amazon Bedrock for model access and reasoning, Amazon Bedrock AgentCore for running agents and connecting them to tools, AWS Lambda for tools, AWS Step Functions for deterministic workflow stages, Amazon S3 and your data services for context, and AWS Identity and Access Management (IAM), Amazon CloudWatch, AWS CloudTrail, Amazon VPC, and AWS Key Management Service (AWS KMS) for access, observability, audit, isolation, and encryption.
A concrete example: a managed service provider packages a cloud operations agent for its clients. The agent reviews AWS cost anomalies, queries cost and usage data, checks the client’s internal policy, drafts a remediation plan, opens a ticket for human approval, and tracks completion. It is also where governance becomes the hard part.
The risks of ungoverned loops
Agent loops fail differently from traditional software, because they reason, choose tools, and retry. Cost: a looping agent calls models repeatedly and pulls large context. Without budgets and stop conditions, token spend compounds and can erase the return on investment (ROI) of the application. Actions: once an agent can call APIs or modify infrastructure, a hallucinated or manipulated action has real consequences. Prompt injection raises the stakes, because an agent that reads documents, tickets, or web pages can ingest malicious instructions. Organization: business units build agents faster than central IT can review them. Shadow AI brings inconsistent logging, duplicate tools, unknown data flows, and audit gaps.
Governing agent loops with AWS-native controls
AWS gives you a strong foundation. From working with customers building agents on Amazon Bedrock, we’ve learned that the fastest teams apply these controls from the first prototype. Retrofitting governance later is expensive and risky. The principle: treat agents as production systems, not demos. Recommended best practices based on AWS Well-Architected Framework Generative AI Lens and AWS documentation:
- Least privilege for every tool. Give each tool its own IAM role, scoped by task, account, and data domain, and avoid wildcards.
- Guardrails for content and policy boundaries. Amazon Bedrock Guardrails control what the agent says by filtering harmful content, personally identifiable information (PII), and prompt injection. Because they rely on classifiers, they are probabilistic. AgentCore Policy controls what the agent does. It checks each call against Cedar (open-source language) policies, and the check is deterministic: the same request always gets the same allow or deny, so a manipulated prompt can’t override a deny. You need both. Guardrails handle open-ended language, and policies enforce hard limits like refund caps or no deletes in production.
- Log every step. Capture the request, model selected, tool calls and outputs, intermediate decisions, cost and token usage, and approvals. CloudWatch, CloudTrail, and a centralized log pipeline create the audit trail production requires.
- Hard cost boundaries. Maximum loop iterations, token budgets per task, spend caps per user, department, client, or tenant, and automatic stop conditions.
- Deterministic stages where determinism belongs. Let the agent reason and plan; let Step Functions hold workflow state, approvals, and retries; let Lambda execute tools under scoped IAM.
- Keep sensitive data inside controlled boundaries. VPC isolation, private endpoints, and encryption with AWS KMS around regulated data and production systems.
- Human-in-the-loop gates for anything that modifies infrastructure, sends external communications, touches customer records, or moves money.
Build this and you are well on your way to governing your first agent loop.
Where it gets hard: everyone becomes a software company
AI has compressed the cost of writing software. Any team with an AI coding assistant can now build its own agents, and increasingly its own agent governance: a logging pipeline here, a budget script there, a custom approval flow per project. The real cost is maintenance: keeping policies current as models change, maintaining evals, holding audit consistency across accounts and tenants, and repeating it all for each new agent. When every team builds its own controls, the result is many bespoke control planes, each slightly different. Shared infrastructure is more efficient to operate and frees your teams to focus on what differentiates your business. You can build and operate your own governance layer or adopt a shared one. Which is right depends on scale, skills, and how many agents you expect to govern.
Owning your AI governance layer
Industry analysts point to governing agents at runtime rather than reviewing them after the fact. Organizations moving agents into production often want ownership of that layer: their own evals, their own model routing per API, agent, and application, and policy, identity, cost, and audit controls, deployed in their own environment on AWS, where their data already lives. This is what Blunom was built for. Blunom is a Sovereign AI OS for building, governing, and running AI agents, apps, and workflows. The Blunom platform deploys into your AWS account and runs on the AWS services described above, including Amazon Bedrock for model access. It is a layer built on top of and extending AWS-native controls, not a replacement for them. Developers connect existing agents through a drop-in API, keep their frameworks, and bring their own access keys, gaining identity, policy enforcement, TokenOps cost governance, and observability at runtime. Business users get Agent Studio for designing governed apps and workflows without code. You choose which models, data sources, and deployment model (multi-tenant, single-tenant, or private VPC) fit your needs.
“AG Consulting Partners has built a proven AI practice helping clients turn agents into real business results. Now we’re bringing that practice to AWS. When clients need sovereign control over their AI, we deliver it with Blunom as the runtime operating system. Their agents run in their own AWS environment with their own identity, enforced policy, and a full audit record. Token spend is tied back to a business outcome. We deliver the transformation. Our clients own their AI, their data, and their results.”
– Angel Evan, AI Practice Lead (AG Consulting Partners)
“SnapSoft is an AWS Premier Tier Services Partner, and many of our clients operate in regulated industries. For them, sovereignty is not optional. With Blunom deployed self-hosted as the runtime operating system, we took multiple agentic workflows across finance operations into production. Governance was in place before the first agent ran. Our clients kept full control of their AI and their data.”
– Brandon Kissinger, Executive Chairman (SnapSoft)
Native controls or a control plane? A decision framework
AWS-native controls work well for single teams with one or two prototypes. We recommend starting here—it forces you to understand your governance requirements before adding layers. Customers who need cost control by tenant or department, centralized policy, model flexibility, or private VPC deployment can extend that foundation with a control plane like Blunom. This is common once several teams or clients each run their own agents and maintaining separate controls for each one becomes ongoing work.
Production governance checklist
Before agents ship, your organization should be able to answer: Which users can invoke each agent, and which tools can each agent call, under which execution role? Where are budgets and stop conditions enforced per user, client, and tenant? Which models are approved, who controls routing, and how are evals maintained as models change? Where does every prompt, tool call, and approval get logged, and can you export the audit trail? Which actions require a human, and where does regulated data live during execution? If any answer is “it depends on the team,” that is the gap.
Get started
Agent loops are how agentic AI does real work. Governed agent loops are how it reaches production. Start with the AWS-native patterns above, and when governance becomes the bottleneck, evaluate a sovereign control plane you deploy in your own environment.
Explore Blunom on AWS Marketplace to start an evaluation or pilot. AWS Partners can contact Blunom for enablement on packaging governed agentic AI for their customers.
Blunom – AWS Partner Spotlight
Blunom is an AWS Advanced Tier and AWS Global Startup Program Partner that offers a Sovereign AI Operating System that unifies models, agents, tools, applications, data, then governs every action between them, deployed in your environment. TokenOps, AI Firewall & Security, Observability, and Benchmarking are built in at runtime.


