v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1433660423.8 KB

Invokes an inline Amazon Bedrock agent using the configurations you provide with the request.

  • Specify the following fields for security purposes.

    • (Optional) customerEncryptionKeyArn – The Amazon Resource Name (ARN) of a KMS key to encrypt the creation of the agent.

    • (Optional) idleSessionTTLinSeconds – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent InvokeInlineAgent request begins a new session.

  • To override the default prompt behavior for agent orchestration and to use advanced prompts, include a promptOverrideConfiguration object. For more information, see Advanced prompts.

  • The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.

post/agents/{sessionId}

Path parameters

sessionIdstring required

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

Request body

agentCollaboration'SUPERVISOR' | 'SUPERVISOR_ROUTER' | 'DISABLED'

Defines how the inline collaborator agent handles information across multiple collaborator agents to coordinate a final response. The inline collaborator agent can also be the supervisor.

agentNamestring password

The name for the agent.

customerEncryptionKeyArnstring

The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent.

enableTraceboolean

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/trace-events.html">Using trace</a>.

endSessionboolean

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

foundationModelstring required

The <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">model identifier (ID)</a> of the model to use for orchestration by the inline agent. For example, <code>meta.llama3-1-70b-instruct-v1:0</code>.

idleSessionTTLInSecondsinteger
<p> The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent <code>InvokeInlineAgent</code> request begins a new session. </p> <p>A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and the data provided before the timeout is deleted.</p>
inputTextstring password
<p> The prompt text to send to 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>
instructionstring password required

The instructions that tell the inline agent what it should do and how it should interact with users.

orchestrationType'DEFAULT' | 'CUSTOM_ORCHESTRATION'

Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.

Response

Success