invokeAgentRuntimeCommand
abstract suspend fun <T> invokeAgentRuntimeCommand(input: InvokeAgentRuntimeCommandRequest, block: suspend (InvokeAgentRuntimeCommandResponse) -> T): T
Executes a command in a runtime session container and streams the output back to the caller. This operation allows you to run shell commands within the agent runtime environment and receive real-time streaming responses including standard output and standard error.
To invoke a command, you must specify the agent runtime ARN and a runtime session ID. The command execution supports streaming responses, allowing you to receive output as it becomes available through contentStart, contentDelta, and contentStop events.
To use this operation, you must have the bedrock-agentcore:InvokeAgentRuntimeCommand permission.