AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the InvokeAgentRuntime operation. Sends a request to an agent or tool hosted in an Amazon Bedrock AgentCore Runtime and receives responses in real-time.
To invoke an agent, you can specify either the AgentCore Runtime ARN or the agent ID with an account ID, and provide a payload containing your request. When you use the agent ID instead of the full ARN, you don't need to URL-encode the identifier. You can optionally specify a qualifier to target a specific endpoint of the agent.
This operation supports streaming responses, allowing you to receive partial responses as they become available. We recommend using pagination to ensure that the operation returns quickly and successfully when processing large responses.
For example code, see Invoke an AgentCore Runtime agent.
If you're integrating your agent with OAuth, you can't use the Amazon Web Services
SDK to call InvokeAgentRuntime. Instead, make a HTTPS request to InvokeAgentRuntime.
For an example, see Authenticate
and authorize with Inbound Auth and Outbound Auth.
To use this operation, you must have the bedrock-agentcore:InvokeAgentRuntime
permission. If you are making a call to InvokeAgentRuntime on behalf of a user
ID with the X-Amzn-Bedrock-AgentCore-Runtime-User-Id header, You require permissions
to both actions (bedrock-agentcore:InvokeAgentRuntime and bedrock-agentcore:InvokeAgentRuntimeForUser).
Namespace: Amazon.BedrockAgentCore.Model
Assembly: AWSSDK.BedrockAgentCore.dll
Version: 3.x.y.z
public class InvokeAgentRuntimeRequest : AmazonBedrockAgentCoreRequest IAmazonWebServiceRequest
The InvokeAgentRuntimeRequest type exposes the following members
| Name | Description | |
|---|---|---|
|
InvokeAgentRuntimeRequest() |
| Name | Type | Description | |
|---|---|---|---|
|
Accept | System.String |
Gets and sets the property Accept. The desired MIME type for the response from the agent runtime. This tells the agent runtime what format to use for the response data. Common values include application/json for JSON data. |
|
AccountId | System.String |
Gets and sets the property AccountId.
The identifier of the Amazon Web Services account for the agent runtime resource.
This parameter is required when you specify an agent ID instead of the full ARN for
|
|
AgentRuntimeArn | System.String |
Gets and sets the property AgentRuntimeArn.
The identifier of the agent runtime to invoke. You can specify either the full Amazon
Web Services Resource Name (ARN) or the agent ID. If you use the agent ID, you must
also provide the |
|
Baggage | System.String |
Gets and sets the property Baggage. Additional context information for distributed tracing. |
|
ContentType | System.String |
Gets and sets the property ContentType. The MIME type of the input data in the payload. This tells the agent runtime how to interpret the payload data. Common values include application/json for JSON data. |
|
McpProtocolVersion | System.String |
Gets and sets the property McpProtocolVersion. The version of the MCP protocol being used. |
|
McpSessionId | System.String |
Gets and sets the property McpSessionId. The identifier of the MCP session. |
|
Payload | System.IO.MemoryStream |
Gets and sets the property Payload. The input data to send to the agent runtime. The format of this data depends on the specific agent configuration and must match the specified content type. For most agents, this is a JSON object containing the user's request. |
|
Qualifier | System.String |
Gets and sets the property Qualifier. The qualifier to use for the agent runtime. This is an endpoint name that points to a specific version. If not specified, Amazon Bedrock AgentCore uses the default endpoint of the agent runtime. |
|
RuntimeSessionId | System.String |
Gets and sets the property RuntimeSessionId. The identifier of the runtime session. |
|
RuntimeUserId | System.String |
Gets and sets the property RuntimeUserId. The identifier of the runtime user. |
|
TraceId | System.String |
Gets and sets the property TraceId. The trace identifier for request tracking. |
|
TraceParent | System.String |
Gets and sets the property TraceParent. The parent trace information for distributed tracing. |
|
TraceState | System.String |
Gets and sets the property TraceState. The trace state information for distributed tracing. |
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5