Amazon Bedrock Introduces Interactive Shell Support in AgentCore Runtime via WebSockets
Amazon Bedrock has enhanced its AgentCore Runtime with the release of the InvokeAgentRuntimeCommandShell API. This new capability establishes a persistent terminal session over WebSockets, backed by a pseudoterminal in the running agent environment. This allows engineers to interact directly with agent sessions in a manner similar to a standard terminal shell, facilitating deeper live inspection.
Primary source
Open AWS What's New ↗This article summarizes the source. Check the original for full details and conditions.
Comparison
| Aspect | Before / Alternative | After / This |
|---|---|---|
| Execution Pattern | Single-use command execution via InvokeAgentRuntimeCommand | Persistent, multi-turn interactive session via WebSockets |
| Terminal Backing | Standard stateless execution without a continuous context | Full pseudoterminal (PTY) backing for real-time shell feedback |
| Use Case Suitability | Simple, automated task running and script execution | Complex debugging, live environment exploration, and interactive session validation |
Action Checklist
- Verify IAM policies to control access to the new InvokeAgentRuntimeCommandShell API Ensure strict boundaries are set as this allows direct pseudoterminal access to the environment.
- Configure network settings and proxy rules to support persistent WebSocket connections WebSockets require different timeout and keep-alive handling compared to standard REST calls.
- Update development and testing toolchains to leverage the interactive shell for agent debugging Integrate the new API into developer sandboxes to accelerate testing cycles.