The AgentCore - Invoke Agent Runtime (Streaming) operation invokes an agent runtime as a Server-Sent Events (SSE) stream, piping the raw response bytes straight through to the operation payload. Response metadata (session IDs, content type, status code, and tracing headers) is surfaced as message attributes through #[attributes].
To configure the AgentCore - Invoke Agent Runtime (Streaming) operation:
-
Select the operation on the Anypoint Code Builder or Studio canvas.
-
In the General properties tab for the operation, enter these values:
-
Agent Runtime Arn
The ARN of the agent runtime to invoke.
-
Runtime Session Id
The identifier of the runtime session to invoke against.
-
Payload
The JSON payload to send to the agent runtime.
-
Qualifier
An optional runtime qualifier such as a version alias. Defaults to the DEFAULT endpoint when unset.
-
Content Type
An optional request content type. When unset, the AWS SDK default applies.
This is the XML for this operation:
<ms-bedrock:agentcore-invoke-agent-runtime
doc:name="AgentCore invoke agent runtime"
config-ref="AWS"
agentRuntimeArn="#[payload.agentRuntimeArn]"
runtimeSessionId="#[payload.sessionId]"
payload='#[output application/json --- { prompt: payload.question, stream: true }]'
/>
Output Configuration
This operation streams the raw SSE response bytes as the payload. The session IDs, content type, HTTP status code, and tracing headers are available through #[attributes].