Replies: 1 comment
-
Will this update address use cases where the request for user input is coming from an agent-as-tool? Meaning not the main agent that is in direct contact with the user (chatbot UI, for example), but a sub-agent of the main agent. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Return of Control
Overview
We're designing a "Return of Control" pattern to enable human-in-the-loop workflows in Strands Agents. This will allow agents to pause execution for external approval, input, or review, then resume seamlessly.
The Problem
Currently, once an agent's event loop starts, it runs to completion without interruption. This prevents scenarios like:
Proposed Solution
The following are ideas we have begun to explore (not final decisions):
1. Pause - Exception-Based Interruption
Hooks can raise special
AgentInterruptException
types to cleanly interrupt execution:2. Resume - Null Prompt Detection
Resume by calling the agent with no prompt (
agent()
) - this triggers automatic resume detection:3. State Check - Agent Status Property
Track agent state with a simple status property:
Complete Example
Session Persistence
Paused agents can be resumed across different processes or sessions:
Beta Was this translation helpful? Give feedback.
All reactions