Describe the feature
Add a bedrock-agentcore invoke-harness command to the AWS CLI that calls the InvokeHarness API and prints the agent's streamed response to the terminal.
Example of the desired usage:
aws bedrock-agentcore invoke-harness \
--harness-arn arn:aws:bedrock-agentcore:eu-central-1:123456789012:harness/my_harness-AbCdEf1234 \
--runtime-session-id "$(uuidgen)" \
--message "Hello, what can you do?"
Use Case
The AWS CLI already supports the harness control plane (bedrock-agentcore-control create-harness, get-harness, etc.), but there is no way to send a message to a harness from it. Today the options are:
- The AgentCore CLI (
agentcore invoke --harness-arn ...), which requires Node.js and npm. This is a problem on servers and in organizations that don't allow Node, or where the CDK-based tooling is restricted.
- boto3 (
invoke_harness), which requires writing a script.
- Raw HTTPS requests with SigV4 signing.
For quick tests, shell scripts, and CI pipelines, a native AWS CLI command would remove the need for extra runtimes or custom code.
Proposed Solution
- A
bedrock-agentcore invoke-harness command mapped to the InvokeHarness API.
- A convenience
--message (or similar) parameter for a single user text message, in addition to the full --messages JSON structure.
- Streamed text output (
contentBlockDelta text) printed to stdout as it arrives, with an option to output the raw event stream as JSON.
Other SDK-generated tools already expose this API; for example, AWS Tools for PowerShell has Invoke-BACHarness.
Other Information
No response
Acknowledgements
CLI version used
aws-cli/2.36.49 Python/3.14.6 Linux/6.1.186-228.374.amzn2023.x86_64 exec-env/CloudShell exe/x86_64.amzn.2023
Environment details (OS name and version, etc.)
AWS CloudShell (eu-central-1)
Describe the feature
Add a
bedrock-agentcore invoke-harnesscommand to the AWS CLI that calls the InvokeHarness API and prints the agent's streamed response to the terminal.Example of the desired usage:
Use Case
The AWS CLI already supports the harness control plane (
bedrock-agentcore-control create-harness,get-harness, etc.), but there is no way to send a message to a harness from it. Today the options are:agentcore invoke --harness-arn ...), which requires Node.js and npm. This is a problem on servers and in organizations that don't allow Node, or where the CDK-based tooling is restricted.invoke_harness), which requires writing a script.For quick tests, shell scripts, and CI pipelines, a native AWS CLI command would remove the need for extra runtimes or custom code.
Proposed Solution
bedrock-agentcore invoke-harnesscommand mapped to the InvokeHarness API.--message(or similar) parameter for a single user text message, in addition to the full--messagesJSON structure.contentBlockDeltatext) printed to stdout as it arrives, with an option to output the raw event stream as JSON.Other SDK-generated tools already expose this API; for example, AWS Tools for PowerShell has
Invoke-BACHarness.Other Information
No response
Acknowledgements
CLI version used
aws-cli/2.36.49 Python/3.14.6 Linux/6.1.186-228.374.amzn2023.x86_64 exec-env/CloudShell exe/x86_64.amzn.2023
Environment details (OS name and version, etc.)
AWS CloudShell (eu-central-1)