AWS Tools for Windows PowerShell
Command Reference

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.

Synopsis

Calls the Amazon Bedrock Agent Runtime InvokeInlineAgent API operation.

Syntax

Invoke-BARInlineAgent
-SessionId <String>
-ActionGroup <AgentActionGroup[]>
-AgentCollaboration <AgentCollaboration>
-AgentName <String>
-StreamingConfigurations_ApplyGuardrailInterval <Int32>
-CollaboratorConfiguration <CollaboratorConfiguration[]>
-Collaborator <Collaborator[]>
-CustomerEncryptionKeyArn <String>
-EnableTrace <Boolean>
-EndSession <Boolean>
-PromptCreationConfigurations_ExcludePreviousThinkingStep <Boolean>
-InlineSessionState_File <InputFile[]>
-FoundationModel <String>
-GuardrailConfiguration_GuardrailIdentifier <String>
-GuardrailConfiguration_GuardrailVersion <String>
-IdleSessionTTLInSecond <Int32>
-InputText <String>
-Instruction <String>
-InlineSessionState_InvocationId <String>
-KnowledgeBases <KnowledgeBase[]>
-Executor_Lambda <String>
-PerformanceConfig_Latency <PerformanceConfigLatency>
-ConversationHistory_Message <Message[]>
-OrchestrationType <OrchestrationType>
-PromptOverrideConfiguration_OverrideLambda <String>
-PromptCreationConfigurations_PreviousConversationTurnsToInclude <Int32>
-PromptOverrideConfiguration_PromptConfiguration <PromptConfiguration[]>
-InlineSessionState_PromptSessionAttribute <Hashtable>
-InlineSessionState_ReturnControlInvocationResult <InvocationResultMember[]>
-InlineSessionState_SessionAttribute <Hashtable>
-StreamingConfigurations_StreamFinalResponse <Boolean>
-Select <String>
-Force <SwitchParameter>
-ClientConfig <AmazonBedrockAgentRuntimeConfig>

Description

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.

Parameters

-ActionGroup <AgentActionGroup[]>
A list of action groups with each action group defining the action the inline agent needs to carry out. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesActionGroups
-AgentCollaboration <AgentCollaboration>
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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-AgentName <String>
The name for the agent.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
Amazon.PowerShell.Cmdlets.BAR.AmazonBedrockAgentRuntimeClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Collaborator <Collaborator[]>
List of collaborator inline agents. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesCollaborators
-CollaboratorConfiguration <CollaboratorConfiguration[]>
Settings for an inline agent collaborator called with InvokeInlineAgent. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesCollaboratorConfigurations
-ConversationHistory_Message <Message[]>
The conversation's messages. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInlineSessionState_ConversationHistory_Messages
-CustomerEncryptionKeyArn <String>
The Amazon Resource Name (ARN) of the Amazon Web Services KMS key to use to encrypt your inline agent.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EnableTrace <Boolean>
Specifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Using trace.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-EndSession <Boolean>
Specifies whether to end the session with the inline agent or not.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Executor_Lambda <String>
The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesCustomOrchestration_Executor_Lambda
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-FoundationModel <String>
The model identifier (ID) of the model to use for orchestration by the inline agent. For example, meta.llama3-1-70b-instruct-v1:0.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-GuardrailConfiguration_GuardrailIdentifier <String>
The unique identifier for the guardrail.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-GuardrailConfiguration_GuardrailVersion <String>
The version of the guardrail.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-IdleSessionTTLInSecond <Int32>
The number of seconds for which the inline agent should maintain session information. After this time expires, the subsequent InvokeInlineAgent request begins a new session. 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.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesIdleSessionTTLInSeconds
-InlineSessionState_File <InputFile[]>
Contains information about the files used by code interpreter. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInlineSessionState_Files
-InlineSessionState_InvocationId <String>
The identifier of the invocation of an action. This value must match the invocationId returned in the InvokeInlineAgent response for the action whose results are provided in the returnControlInvocationResults field. For more information, see Return control to the agent developer.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-InlineSessionState_PromptSessionAttribute <Hashtable>
Contains attributes that persist across a session and the values of those attributes. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInlineSessionState_PromptSessionAttributes
-InlineSessionState_ReturnControlInvocationResult <InvocationResultMember[]>
Contains information about the results from the action group invocation. For more information, see Return control to the agent developer. If you include this field in the sessionState field, the inputText field will be ignored. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInlineSessionState_ReturnControlInvocationResults
-InlineSessionState_SessionAttribute <Hashtable>
Contains attributes that persist across a session and the values of those attributes. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesInlineSessionState_SessionAttributes
-InputText <String>
The prompt text to send to the agent. If you include returnControlInvocationResults in the sessionState field, the inputText field will be ignored.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Instruction <String>
The instructions that tell the inline agent what it should do and how it should interact with users.
Required?True
Position?Named
Accept pipeline input?True (ByPropertyName)
-KnowledgeBases <KnowledgeBase[]>
Contains information of the knowledge bases to associate with. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-OrchestrationType <OrchestrationType>
Specifies the type of orchestration strategy for the agent. This is set to DEFAULT orchestration type, by default.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PerformanceConfig_Latency <PerformanceConfigLatency>
To use a latency-optimized version of the model, set to optimized.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesBedrockModelConfigurations_PerformanceConfig_Latency
-PromptCreationConfigurations_ExcludePreviousThinkingStep <Boolean>
If true, the service removes any content between <thinking> tags from previous conversations in an agent session. The service will only remove content from already processed turns. This helps you remove content which might not be useful for current and subsequent invocations. This can reduce the input token count and potentially save costs. The default value is false.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPromptCreationConfigurations_ExcludePreviousThinkingSteps
-PromptCreationConfigurations_PreviousConversationTurnsToInclude <Int32>
The number of previous conversations from the ongoing agent session to include in the conversation history of the agent prompt, during the current invocation. This gives you more granular control over the context that the model is made aware of, and helps the model remove older context which is no longer useful during the ongoing agent session.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PromptOverrideConfiguration_OverrideLambda <String>
The ARN of the Lambda function to use when parsing the raw foundation model output in parts of the agent sequence. If you specify this field, at least one of the promptConfigurations must contain a parserMode value that is set to OVERRIDDEN. For more information, see Parser Lambda function in Amazon Bedrock Agents.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-PromptOverrideConfiguration_PromptConfiguration <PromptConfiguration[]>
Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts. Starting with version 4 of the SDK this property will default to null. If no data for this property is returned from the service the property will also be null. This was changed to improve performance and allow the SDK and caller to distinguish between a property not set or a property being empty to clear out a value. To retain the previous SDK behavior set the AWSConfigs.InitializeCollections static property to true.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesPromptOverrideConfiguration_PromptConfigurations
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is '*'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse). Specifying the name of a property of type Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-SessionId <String>
The unique identifier of the session. Use the same value across requests to continue the same conversation.
Required?True
Position?1
Accept pipeline input?True (ByValue, ByPropertyName)
-StreamingConfigurations_ApplyGuardrailInterval <Int32>
The guardrail interval to apply as response is generated. By default, the guardrail interval is set to 50 characters. If a larger interval is specified, the response will be generated in larger chunks with fewer ApplyGuardrail calls. The following examples show the response generated for Hello, I am an agent input string.Example response in chunks: Interval set to 3 characters'Hel', 'lo, ','I am', ' an', ' Age', 'nt'Each chunk has at least 3 characters except for the last chunkExample response in chunks: Interval set to 20 or more charactersHello, I am an Agent
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-StreamingConfigurations_StreamFinalResponse <Boolean>
Specifies whether to enable streaming for the final response. This is set to false by default.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns an Amazon.BedrockAgentRuntime.Model.InvokeInlineAgentResponse object containing multiple properties.

Supported Version

AWS Tools for PowerShell: 2.x.y.z