ThisCalculator

Everyday

AWS Ambient Agents: How Automatic Runs Pause for Human Input

Updated · Standard formula, shown below

AWS Ambient Agents: How Automatic Runs Pause for Human Input

AWS Ambient Agents are a new class of AI agents that operate alongside human workflows, and their automatic runs pause for human input at defined decision points, approval gates, or when the agent lacks confidence or required permissions. When a run pauses, the agent packages its current state, context, and a set of proposed next actions, then sends a notification through Amazon Bedrock’s agent runtime or an integrated channel like Slack or email. The human reviews the request, provides an approval, a correction, or additional instructions, and the agent resumes from exactly where it stopped—no loss of progress and no need to restart the workflow.

Background: What Are Ambient Agents?

Ambient agents, introduced as part of Amazon Bedrock’s agentic capabilities, are designed to work in the background of a user’s daily tasks, rather than requiring a dedicated chat interface. They monitor events, process data, and take actions on your behalf—but they are deliberately built to hand control back to a person at moments that matter. This is a fundamental difference from fully autonomous agents: ambient agents are “human-in-the-loop by default,” meaning they are not meant to run unattended for long periods. Instead, they pause whenever a decision has business, safety, or cost implications that a human should weigh in on.

The pause-and-resume mechanism is not a single feature but a combination of several AWS services: Amazon Bedrock for the agent’s reasoning, AWS Lambda for executing actions, Amazon EventBridge for event triggers, and the Bedrock Agent Runtime API for managing the conversation state. When a pause occurs, the agent’s session state is persisted, so the human’s input can be injected back into the same reasoning thread without the agent losing its train of thought.

How the Pause-and-Resume Flow Works

The pause mechanism is triggered by one of three conditions, which you configure when you build the agent:

  • Explicit approval step: You add a step in the agent’s Lambda function that calls the returnControl API. This tells Bedrock: “Stop here, ask the human for a decision.”
  • Low confidence: The agent’s internal scoring indicates that the next action has a high chance of being wrong (for example, interpreting a vague email request). The agent can be configured to pause rather than guess.
  • Missing permissions: The agent tries to perform an action that requires a permission it does not have (e.g., writing to a production database). Instead of failing, it pauses to ask for a one-time grant.

When a pause is triggered, the agent returns a structured payload containing the current conversation context, the proposed next actions, and any data the human needs to make a decision. The human’s response is sent back via the invokeAgent API or through a pre-built integration like a Slack message with buttons. The response can be an approval, a rejection with a reason, or a modification of the proposed action (e.g., “approve but change the email recipient”). The agent then continues its run, incorporating that feedback into its next steps.

Configuring Pause Conditions and Approval Gates

You control exactly when and how a pause happens through the agent’s configuration in the Bedrock console or via the AWS SDK. The key settings are:

  • Action groups: Each action group (a set of Lambda functions) can be marked as requiring human approval. If you mark an action group as “requires confirmation,” the agent will always pause before executing any action in that group.
  • Confidence threshold: You can set a numerical threshold (e.g., 0.8 on a 0–1 scale). If the agent’s confidence in its next action falls below that, it pauses.
  • Permission boundaries: Using AWS Identity and Access Management (IAM) roles, you can deliberately omit permissions for certain actions. When the agent attempts such an action, it receives an access-denied error, which you can configure to trigger a pause instead of a failure.

For example, an ambient agent that processes expense reports might have an action group for “approve reimbursement” that is marked as requiring human confirmation. The agent will scan receipts, calculate totals, and then pause with a summary: “I found three receipts totaling $245.30. Approve?” The human clicks “Approve,” and the agent proceeds to create the payment record. If the human clicks “Reject,” the agent logs the rejection and stops that run.

Common Problems and How to Avoid Them

Several issues commonly trip up developers when implementing pause-and-resume:

  • Session timeout: Bedrock agent sessions have a maximum idle time (default 15 minutes). If a human takes longer to respond, the session expires and the agent cannot resume. Fix: set a longer session timeout or implement a mechanism to save and restore the conversation state externally.
  • Lost context: If you do not properly pass the sessionState object back when resuming, the agent may lose track of what it was doing. Always include the full session state returned by the pause API.
  • Infinite pause loops: If the human’s response is not structured as the agent expects (e.g., free text instead of a yes/no), the agent may pause again with the same question. Fix: validate the human’s input before sending it back, and provide clear instructions in the notification.
  • Notification fatigue: If you set the confidence threshold too high, the agent will pause constantly, making it more annoying than helpful. Start with a threshold around 0.7 and adjust based on real usage.

Costs and Performance Considerations

Pausing does not incur extra charges by itself, but the underlying services do. Each pause and resume consumes an API call to Bedrock, and the session state is stored in memory (or in an optional Amazon DynamoDB table if you enable persistence). The cost of a paused run is essentially the cost of the tokens used up to that point, plus the cost of the human’s response being processed. There is no charge for the idle time while waiting for a human, but you are paying for the storage of the session state if you use persistence.

Performance-wise, resuming a run is fast—typically under a second—because the agent does not need to redo its reasoning. It simply receives the new input and continues from the last token. This makes the pause-and-resume pattern far more efficient than restarting a workflow from scratch.

Alternatives to Ambient Agents with Pause

If the pause-and-resume model does not fit your use case, AWS offers other approaches:

  • Fully autonomous agents: Configure the agent without any approval gates. The agent runs to completion, and you only get a final report. This is suitable for low-risk, reversible actions.
  • Step Functions with human approval: AWS Step Functions has a built-in .waitForTaskToken pattern that pauses a workflow until an external process (like a human clicking a link) sends a token back. This is more rigid but gives you full control over the workflow graph.
  • EventBridge with manual triggers: Instead of an agent, you can set up an event-driven system where actions are only taken after a human manually triggers them. This is not ambient, but it is simpler for one-off tasks.

Frequently Asked Questions

Can an ambient agent pause multiple times in one run?

Yes. A single run can pause and resume as many times as needed. Each pause is independent, and the agent can be designed to ask for human input at several different steps—for example, first to approve a data query, then to approve a financial transfer.

What happens if the human never responds to a pause?

If the human does not respond before the session timeout (default 15 minutes), the run is terminated and the session state is discarded. You can configure a notification to be sent to a fallback channel (like email) after a certain period, but the agent will not wait indefinitely.

How do I test the pause behavior?

You can test it in the Bedrock console by using the “Test” tab and simulating a human response. For automated testing, you can call the invokeAgent API and inspect the returnControl payload to verify that the pause is triggered at the right point.

Can the human’s response be a free-form text instead of a button click?

Yes. The human can respond with any text, and that text is passed back to the agent as a new user message. However, for best results, you should design your notification to include structured options (like buttons) and instruct the human to use them, because free text can be ambiguous.

Does pausing affect the agent’s memory of earlier steps?

No. The agent’s memory is preserved in the session state. When the run resumes, the agent has full access to the conversation history and any variables it computed before the pause.

Is the pause feature available in all AWS regions?

The pause-and-resume capability is part of Amazon Bedrock’s agent runtime, which is available in the regions where Bedrock’s agent features are offered. Check the AWS Regional Services list for the latest availability, as new capabilities roll out gradually.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.