Skip to content

InvokeAgentRequest

Source code in docs_src/capo_bedrock_agent_runtime/types/invoke_agent_request.py
class InvokeAgentRequest(TypedDict, closed=True):
    session_state: NotRequired[
        "capo_bedrock_agent_runtime.types.session_state.SessionState"
    ]
    """<p>Contains parameters that specify various attributes of the session. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-session-state.html">Control session context</a>.</p> <note> <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p> </note>"""
    agent_id: "capo_bedrock_agent_runtime.types.agent_id.AgentId"
    """<p>The unique identifier of the agent to use.</p>"""
    agent_alias_id: "capo_bedrock_agent_runtime.types.agent_alias_id.AgentAliasId"
    """<p>The alias of the agent to use.</p>"""
    session_id: "capo_bedrock_agent_runtime.types.session_id.SessionId"
    """<p>The unique identifier of the session. Use the same value across requests to continue the same conversation.</p>"""
    end_session: NotRequired["bool"]
    """<p>Specifies whether to end the session with the agent or not.</p>"""
    enable_trace: NotRequired["bool"]
    """<p>Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-test.html#trace-events">Trace enablement</a>.</p>"""
    input_text: NotRequired["capo_bedrock_agent_runtime.types.input_text.InputText"]
    """<p>The prompt text to send the agent.</p> <note> <p>If you include <code>returnControlInvocationResults</code> in the <code>sessionState</code> field, the <code>inputText</code> field will be ignored.</p> </note>"""
    memory_id: NotRequired["capo_bedrock_agent_runtime.types.memory_id.MemoryId"]
    """<p>The unique identifier of the agent memory.</p>"""
    bedrock_model_configurations: NotRequired[
        "capo_bedrock_agent_runtime.types.bedrock_model_configurations.BedrockModelConfigurations"
    ]
    """<p>Model performance settings for the request.</p>"""
    streaming_configurations: NotRequired[
        "capo_bedrock_agent_runtime.types.streaming_configurations.StreamingConfigurations"
    ]
    """<p> Specifies the configurations for streaming. </p> <note> <p>To use agent streaming, you need permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action.</p> </note>"""
    prompt_creation_configurations: NotRequired[
        "capo_bedrock_agent_runtime.types.prompt_creation_configurations.PromptCreationConfigurations"
    ]
    """<p>Specifies parameters that control how the service populates the agent prompt for an <code>InvokeAgent</code> request. You can control which aspects of previous invocations in the same agent session the service uses to populate the agent prompt. This gives you more granular control over the contextual history that is used to process the current request.</p>"""
    source_arn: NotRequired[
        "capo_bedrock_agent_runtime.types.aws_resource_arn.AWSResourceARN"
    ]
    """<p>The ARN of the resource making the request.</p>"""

agent_alias_id instance-attribute

agent_alias_id: AgentAliasId

The alias of the agent to use.

agent_id instance-attribute

agent_id: AgentId

The unique identifier of the agent to use.

bedrock_model_configurations instance-attribute

bedrock_model_configurations: NotRequired[BedrockModelConfigurations]

Model performance settings for the request.

enable_trace instance-attribute

enable_trace: NotRequired[bool]

Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.

end_session instance-attribute

end_session: NotRequired[bool]

Specifies whether to end the session with the agent or not.

input_text instance-attribute

input_text: NotRequired[InputText]

The prompt text to send the agent.

If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

memory_id instance-attribute

memory_id: NotRequired[MemoryId]

The unique identifier of the agent memory.

prompt_creation_configurations instance-attribute

prompt_creation_configurations: NotRequired[PromptCreationConfigurations]

Specifies parameters that control how the service populates the agent prompt for an InvokeAgent request. You can control which aspects of previous invocations in the same agent session the service uses to populate the agent prompt. This gives you more granular control over the contextual history that is used to process the current request.

session_id instance-attribute

session_id: SessionId

The unique identifier of the session. Use the same value across requests to continue the same conversation.

session_state instance-attribute

session_state: NotRequired[SessionState]

Contains parameters that specify various attributes of the session. For more information, see Control session context.

If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.

source_arn instance-attribute

source_arn: NotRequired[AWSResourceARN]

The ARN of the resource making the request.

streaming_configurations instance-attribute

streaming_configurations: NotRequired[StreamingConfigurations]

Specifies the configurations for streaming.

To use agent streaming, you need permissions to perform the bedrock:InvokeModelWithResponseStream action.