Amazon Bedrock Agents (now Amazon Bedrock Agents Classic) is no longer open to new customers¶
Description¶
Amazon Bedrock Agents (now Amazon Bedrock Agents Classic) is no longer open to new customers. For capabilities similar to Bedrock Agents Classic, explore Amazon Bedrock AgentCore. Existing customers can continue to use the service as normal. For more information, see Amazon Bedrock Agents Classic availability change.
Sends a prompt for the agent to process and respond to. Note the following fields for the request:
- To continue the same conversation with an agent, use the same
sessionIdvalue in the request. - To activate trace enablement, turn
enableTracetotrue. Trace enablement helps you follow the agent's reasoning process that led it to the information it processed, the actions it took, and the final result it yielded. For more information, see Trace enablement. - End a conversation by setting
endSessiontotrue. - In the
sessionStateobject, you can include attributes for the session or prompt or, if you configured an action group to return control, results from invocation of the action group.
The response contains both chunk and trace attributes.
The final response is returned in the bytes field of the chunk object. The invoke_agent returns one chunk for the entire interaction.
- The
attributionobject contains citations for parts of the response. - If you set
enableTracetotruein the request, you can trace the agent's steps and reasoning process that led it to the response. - If the action predicted was configured to return control, the response returns parameters for the action, elicited from the user, in the
returnControlfield. - Errors are also surfaced in the response.
Usage¶
bedrockagentruntime_invoke_agent(agentAliasId, agentId,
bedrockModelConfigurations, enableTrace, endSession, inputText,
memoryId, promptCreationConfigurations, sessionId, sessionState,
sourceArn, streamingConfigurations)
Arguments¶
-
agentAliasId[required] The alias of the agent to use.
-
agentId[required] The unique identifier of the agent to use.
-
bedrockModelConfigurationsModel performance settings for the request.
-
enableTraceSpecifies whether to turn on the trace or not to track the agent's reasoning process. For more information, see Trace enablement.
-
endSessionSpecifies whether to end the session with the agent or not.
-
inputTextThe prompt text to send the agent.
If you include
returnControlInvocationResultsin thesessionStatefield, theinputTextfield will be ignored. -
memoryIdThe unique identifier of the agent memory.
-
promptCreationConfigurationsSpecifies parameters that control how the service populates the agent prompt for an
invoke_agentrequest. 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. -
sessionId[required] The unique identifier of the session. Use the same value across requests to continue the same conversation.
-
sessionStateContains parameters that specify various attributes of the session. For more information, see Control session context.
If you include
returnControlInvocationResultsin thesessionStatefield, theinputTextfield will be ignored. -
sourceArnThe ARN of the resource making the request.
-
streamingConfigurationsSpecifies the configurations for streaming.
To use agent streaming, you need permissions to perform the
bedrock:InvokeModelWithResponseStreamaction.
Value¶
A list with the following syntax:
list(
completion = list(
accessDeniedException = list(
message = "string"
),
badGatewayException = list(
message = "string",
resourceName = "string"
),
chunk = list(
attribution = list(
citations = list(
list(
generatedResponsePart = list(
textResponsePart = list(
span = list(
end = 123,
start = 123
),
text = "string"
)
),
retrievedReferences = list(
list(
content = list(
audio = list(
s3Uri = "string",
transcription = "string"
),
byteContent = "string",
row = list(
list(
columnName = "string",
columnValue = "string",
type = "BLOB"|"BOOLEAN"|"DOUBLE"|"NULL"|"LONG"|"STRING"
)
),
text = "string",
type = "TEXT"|"IMAGE"|"ROW"|"AUDIO"|"VIDEO",
video = list(
s3Uri = "string",
summary = "string"
)
),
location = list(
confluenceLocation = list(
url = "string"
),
customDocumentLocation = list(
id = "string"
),
googleDriveLocation = list(
url = "string"
),
kendraDocumentLocation = list(
uri = "string"
),
oneDriveLocation = list(
url = "string"
),
s3Location = list(
uri = "string"
),
salesforceLocation = list(
url = "string"
),
sharePointLocation = list(
url = "string"
),
sqlLocation = list(
query = "string"
),
type = "S3"|"WEB"|"CONFLUENCE"|"SALESFORCE"|"SHAREPOINT"|"CUSTOM"|"KENDRA"|"SQL"|"ONEDRIVE"|"GOOGLEDRIVE",
webLocation = list(
url = "string"
)
),
metadata = list(
list()
)
)
)
)
)
),
bytes = raw
),
conflictException = list(
message = "string"
),
dependencyFailedException = list(
message = "string",
resourceName = "string"
),
files = list(
files = list(
list(
bytes = raw,
name = "string",
type = "string"
)
)
),
internalServerException = list(
message = "string",
reason = "string"
),
modelNotReadyException = list(
message = "string"
),
resourceNotFoundException = list(
message = "string"
),
returnControl = list(
invocationId = "string",
invocationInputs = list(
list(
apiInvocationInput = list(
actionGroup = "string",
actionInvocationType = "RESULT"|"USER_CONFIRMATION"|"USER_CONFIRMATION_AND_RESULT",
agentId = "string",
apiPath = "string",
collaboratorName = "string",
httpMethod = "string",
parameters = list(
list(
name = "string",
type = "string",
value = "string"
)
),
requestBody = list(
content = list(
list(
properties = list(
list(
name = "string",
type = "string",
value = "string"
)
)
)
)
)
),
functionInvocationInput = list(
actionGroup = "string",
actionInvocationType = "RESULT"|"USER_CONFIRMATION"|"USER_CONFIRMATION_AND_RESULT",
agentId = "string",
collaboratorName = "string",
function = "string",
parameters = list(
list(
name = "string",
type = "string",
value = "string"
)
)
)
)
)
),
serviceQuotaExceededException = list(
message = "string"
),
throttlingException = list(
message = "string"
),
trace = list(
agentAliasId = "string",
agentId = "string",
agentVersion = "string",
callerChain = list(
list(
agentAliasArn = "string"
)
),
collaboratorName = "string",
eventTime = as.POSIXct(
"2015-01-01"
),
sessionId = "string",
trace = list(
customOrchestrationTrace = list(
event = list(
text = "string"
),
traceId = "string"
),
failureTrace = list(
failureCode = 123,
failureReason = "string",
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
traceId = "string"
),
guardrailTrace = list(
action = "INTERVENED"|"NONE",
inputAssessments = list(
list(
contentPolicy = list(
filters = list(
list(
action = "BLOCKED",
confidence = "NONE"|"LOW"|"MEDIUM"|"HIGH",
type = "INSULTS"|"HATE"|"SEXUAL"|"VIOLENCE"|"MISCONDUCT"|"PROMPT_ATTACK"
)
)
),
sensitiveInformationPolicy = list(
piiEntities = list(
list(
action = "BLOCKED"|"ANONYMIZED",
match = "string",
type = "ADDRESS"|"AGE"|"AWS_ACCESS_KEY"|"AWS_SECRET_KEY"|"CA_HEALTH_NUMBER"|"CA_SOCIAL_INSURANCE_NUMBER"|"CREDIT_DEBIT_CARD_CVV"|"CREDIT_DEBIT_CARD_EXPIRY"|"CREDIT_DEBIT_CARD_NUMBER"|"DRIVER_ID"|"EMAIL"|"INTERNATIONAL_BANK_ACCOUNT_NUMBER"|"IP_ADDRESS"|"LICENSE_PLATE"|"MAC_ADDRESS"|"NAME"|"PASSWORD"|"PHONE"|"PIN"|"SWIFT_CODE"|"UK_NATIONAL_HEALTH_SERVICE_NUMBER"|"UK_NATIONAL_INSURANCE_NUMBER"|"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"|"URL"|"USERNAME"|"US_BANK_ACCOUNT_NUMBER"|"US_BANK_ROUTING_NUMBER"|"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"|"US_PASSPORT_NUMBER"|"US_SOCIAL_SECURITY_NUMBER"|"VEHICLE_IDENTIFICATION_NUMBER"
)
),
regexes = list(
list(
action = "BLOCKED"|"ANONYMIZED",
match = "string",
name = "string",
regex = "string"
)
)
),
topicPolicy = list(
topics = list(
list(
action = "BLOCKED",
name = "string",
type = "DENY"
)
)
),
wordPolicy = list(
customWords = list(
list(
action = "BLOCKED",
match = "string"
)
),
managedWordLists = list(
list(
action = "BLOCKED",
match = "string",
type = "PROFANITY"
)
)
)
)
),
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
outputAssessments = list(
list(
contentPolicy = list(
filters = list(
list(
action = "BLOCKED",
confidence = "NONE"|"LOW"|"MEDIUM"|"HIGH",
type = "INSULTS"|"HATE"|"SEXUAL"|"VIOLENCE"|"MISCONDUCT"|"PROMPT_ATTACK"
)
)
),
sensitiveInformationPolicy = list(
piiEntities = list(
list(
action = "BLOCKED"|"ANONYMIZED",
match = "string",
type = "ADDRESS"|"AGE"|"AWS_ACCESS_KEY"|"AWS_SECRET_KEY"|"CA_HEALTH_NUMBER"|"CA_SOCIAL_INSURANCE_NUMBER"|"CREDIT_DEBIT_CARD_CVV"|"CREDIT_DEBIT_CARD_EXPIRY"|"CREDIT_DEBIT_CARD_NUMBER"|"DRIVER_ID"|"EMAIL"|"INTERNATIONAL_BANK_ACCOUNT_NUMBER"|"IP_ADDRESS"|"LICENSE_PLATE"|"MAC_ADDRESS"|"NAME"|"PASSWORD"|"PHONE"|"PIN"|"SWIFT_CODE"|"UK_NATIONAL_HEALTH_SERVICE_NUMBER"|"UK_NATIONAL_INSURANCE_NUMBER"|"UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER"|"URL"|"USERNAME"|"US_BANK_ACCOUNT_NUMBER"|"US_BANK_ROUTING_NUMBER"|"US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER"|"US_PASSPORT_NUMBER"|"US_SOCIAL_SECURITY_NUMBER"|"VEHICLE_IDENTIFICATION_NUMBER"
)
),
regexes = list(
list(
action = "BLOCKED"|"ANONYMIZED",
match = "string",
name = "string",
regex = "string"
)
)
),
topicPolicy = list(
topics = list(
list(
action = "BLOCKED",
name = "string",
type = "DENY"
)
)
),
wordPolicy = list(
customWords = list(
list(
action = "BLOCKED",
match = "string"
)
),
managedWordLists = list(
list(
action = "BLOCKED",
match = "string",
type = "PROFANITY"
)
)
)
)
),
traceId = "string"
),
orchestrationTrace = list(
invocationInput = list(
actionGroupInvocationInput = list(
actionGroupName = "string",
apiPath = "string",
executionType = "LAMBDA"|"RETURN_CONTROL",
function = "string",
invocationId = "string",
parameters = list(
list(
name = "string",
type = "string",
value = "string"
)
),
requestBody = list(
content = list(
list(
list(
name = "string",
type = "string",
value = "string"
)
)
)
),
verb = "string"
),
agentCollaboratorInvocationInput = list(
agentCollaboratorAliasArn = "string",
agentCollaboratorName = "string",
input = list(
returnControlResults = list(
invocationId = "string",
returnControlInvocationResults = list(
list(
apiResult = list(
actionGroup = "string",
agentId = "string",
apiPath = "string",
confirmationState = "CONFIRM"|"DENY",
httpMethod = "string",
httpStatusCode = 123,
responseBody = list(
list(
body = "string",
images = list(
list(
format = "png"|"jpeg"|"gif"|"webp",
source = list(
bytes = raw
)
)
)
)
),
responseState = "FAILURE"|"REPROMPT"
),
functionResult = list(
actionGroup = "string",
agentId = "string",
confirmationState = "CONFIRM"|"DENY",
function = "string",
responseBody = list(
list(
body = "string",
images = list(
list(
format = "png"|"jpeg"|"gif"|"webp",
source = list(
bytes = raw
)
)
)
)
),
responseState = "FAILURE"|"REPROMPT"
)
)
)
),
text = "string",
type = "TEXT"|"RETURN_CONTROL"
)
),
codeInterpreterInvocationInput = list(
code = "string",
files = list(
"string"
)
),
invocationType = "ACTION_GROUP"|"KNOWLEDGE_BASE"|"FINISH"|"ACTION_GROUP_CODE_INTERPRETER"|"AGENT_COLLABORATOR",
knowledgeBaseLookupInput = list(
knowledgeBaseId = "string",
text = "string"
),
traceId = "string"
),
modelInvocationInput = list(
foundationModel = "string",
inferenceConfiguration = list(
maximumLength = 123,
stopSequences = list(
"string"
),
temperature = 123.0,
topK = 123,
topP = 123.0
),
overrideLambda = "string",
parserMode = "DEFAULT"|"OVERRIDDEN",
promptCreationMode = "DEFAULT"|"OVERRIDDEN",
text = "string",
traceId = "string",
type = "PRE_PROCESSING"|"ORCHESTRATION"|"KNOWLEDGE_BASE_RESPONSE_GENERATION"|"POST_PROCESSING"|"ROUTING_CLASSIFIER"
),
modelInvocationOutput = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
rawResponse = list(
content = "string"
),
reasoningContent = list(
reasoningText = list(
signature = "string",
text = "string"
),
redactedContent = raw
),
traceId = "string"
),
observation = list(
actionGroupInvocationOutput = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
text = "string"
),
agentCollaboratorInvocationOutput = list(
agentCollaboratorAliasArn = "string",
agentCollaboratorName = "string",
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
output = list(
returnControlPayload = list(
invocationId = "string",
invocationInputs = list(
list(
apiInvocationInput = list(
actionGroup = "string",
actionInvocationType = "RESULT"|"USER_CONFIRMATION"|"USER_CONFIRMATION_AND_RESULT",
agentId = "string",
apiPath = "string",
collaboratorName = "string",
httpMethod = "string",
parameters = list(
list(
name = "string",
type = "string",
value = "string"
)
),
requestBody = list(
content = list(
list(
properties = list(
list(
name = "string",
type = "string",
value = "string"
)
)
)
)
)
),
functionInvocationInput = list(
actionGroup = "string",
actionInvocationType = "RESULT"|"USER_CONFIRMATION"|"USER_CONFIRMATION_AND_RESULT",
agentId = "string",
collaboratorName = "string",
function = "string",
parameters = list(
list(
name = "string",
type = "string",
value = "string"
)
)
)
)
)
),
text = "string",
type = "TEXT"|"RETURN_CONTROL"
)
),
codeInterpreterInvocationOutput = list(
executionError = "string",
executionOutput = "string",
executionTimeout = TRUE|FALSE,
files = list(
"string"
),
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
)
),
finalResponse = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
text = "string"
),
knowledgeBaseLookupOutput = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
retrievedReferences = list(
list(
content = list(
audio = list(
s3Uri = "string",
transcription = "string"
),
byteContent = "string",
row = list(
list(
columnName = "string",
columnValue = "string",
type = "BLOB"|"BOOLEAN"|"DOUBLE"|"NULL"|"LONG"|"STRING"
)
),
text = "string",
type = "TEXT"|"IMAGE"|"ROW"|"AUDIO"|"VIDEO",
video = list(
s3Uri = "string",
summary = "string"
)
),
location = list(
confluenceLocation = list(
url = "string"
),
customDocumentLocation = list(
id = "string"
),
googleDriveLocation = list(
url = "string"
),
kendraDocumentLocation = list(
uri = "string"
),
oneDriveLocation = list(
url = "string"
),
s3Location = list(
uri = "string"
),
salesforceLocation = list(
url = "string"
),
sharePointLocation = list(
url = "string"
),
sqlLocation = list(
query = "string"
),
type = "S3"|"WEB"|"CONFLUENCE"|"SALESFORCE"|"SHAREPOINT"|"CUSTOM"|"KENDRA"|"SQL"|"ONEDRIVE"|"GOOGLEDRIVE",
webLocation = list(
url = "string"
)
),
metadata = list(
list()
)
)
)
),
repromptResponse = list(
source = "ACTION_GROUP"|"KNOWLEDGE_BASE"|"PARSER",
text = "string"
),
traceId = "string",
type = "ACTION_GROUP"|"AGENT_COLLABORATOR"|"KNOWLEDGE_BASE"|"FINISH"|"ASK_USER"|"REPROMPT"
),
rationale = list(
text = "string",
traceId = "string"
)
),
postProcessingTrace = list(
modelInvocationInput = list(
foundationModel = "string",
inferenceConfiguration = list(
maximumLength = 123,
stopSequences = list(
"string"
),
temperature = 123.0,
topK = 123,
topP = 123.0
),
overrideLambda = "string",
parserMode = "DEFAULT"|"OVERRIDDEN",
promptCreationMode = "DEFAULT"|"OVERRIDDEN",
text = "string",
traceId = "string",
type = "PRE_PROCESSING"|"ORCHESTRATION"|"KNOWLEDGE_BASE_RESPONSE_GENERATION"|"POST_PROCESSING"|"ROUTING_CLASSIFIER"
),
modelInvocationOutput = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
parsedResponse = list(
text = "string"
),
rawResponse = list(
content = "string"
),
reasoningContent = list(
reasoningText = list(
signature = "string",
text = "string"
),
redactedContent = raw
),
traceId = "string"
)
),
preProcessingTrace = list(
modelInvocationInput = list(
foundationModel = "string",
inferenceConfiguration = list(
maximumLength = 123,
stopSequences = list(
"string"
),
temperature = 123.0,
topK = 123,
topP = 123.0
),
overrideLambda = "string",
parserMode = "DEFAULT"|"OVERRIDDEN",
promptCreationMode = "DEFAULT"|"OVERRIDDEN",
text = "string",
traceId = "string",
type = "PRE_PROCESSING"|"ORCHESTRATION"|"KNOWLEDGE_BASE_RESPONSE_GENERATION"|"POST_PROCESSING"|"ROUTING_CLASSIFIER"
),
modelInvocationOutput = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
parsedResponse = list(
isValid = TRUE|FALSE,
rationale = "string"
),
rawResponse = list(
content = "string"
),
reasoningContent = list(
reasoningText = list(
signature = "string",
text = "string"
),
redactedContent = raw
),
traceId = "string"
)
),
routingClassifierTrace = list(
invocationInput = list(
actionGroupInvocationInput = list(
actionGroupName = "string",
apiPath = "string",
executionType = "LAMBDA"|"RETURN_CONTROL",
function = "string",
invocationId = "string",
parameters = list(
list(
name = "string",
type = "string",
value = "string"
)
),
requestBody = list(
content = list(
list(
list(
name = "string",
type = "string",
value = "string"
)
)
)
),
verb = "string"
),
agentCollaboratorInvocationInput = list(
agentCollaboratorAliasArn = "string",
agentCollaboratorName = "string",
input = list(
returnControlResults = list(
invocationId = "string",
returnControlInvocationResults = list(
list(
apiResult = list(
actionGroup = "string",
agentId = "string",
apiPath = "string",
confirmationState = "CONFIRM"|"DENY",
httpMethod = "string",
httpStatusCode = 123,
responseBody = list(
list(
body = "string",
images = list(
list(
format = "png"|"jpeg"|"gif"|"webp",
source = list(
bytes = raw
)
)
)
)
),
responseState = "FAILURE"|"REPROMPT"
),
functionResult = list(
actionGroup = "string",
agentId = "string",
confirmationState = "CONFIRM"|"DENY",
function = "string",
responseBody = list(
list(
body = "string",
images = list(
list(
format = "png"|"jpeg"|"gif"|"webp",
source = list(
bytes = raw
)
)
)
)
),
responseState = "FAILURE"|"REPROMPT"
)
)
)
),
text = "string",
type = "TEXT"|"RETURN_CONTROL"
)
),
codeInterpreterInvocationInput = list(
code = "string",
files = list(
"string"
)
),
invocationType = "ACTION_GROUP"|"KNOWLEDGE_BASE"|"FINISH"|"ACTION_GROUP_CODE_INTERPRETER"|"AGENT_COLLABORATOR",
knowledgeBaseLookupInput = list(
knowledgeBaseId = "string",
text = "string"
),
traceId = "string"
),
modelInvocationInput = list(
foundationModel = "string",
inferenceConfiguration = list(
maximumLength = 123,
stopSequences = list(
"string"
),
temperature = 123.0,
topK = 123,
topP = 123.0
),
overrideLambda = "string",
parserMode = "DEFAULT"|"OVERRIDDEN",
promptCreationMode = "DEFAULT"|"OVERRIDDEN",
text = "string",
traceId = "string",
type = "PRE_PROCESSING"|"ORCHESTRATION"|"KNOWLEDGE_BASE_RESPONSE_GENERATION"|"POST_PROCESSING"|"ROUTING_CLASSIFIER"
),
modelInvocationOutput = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
rawResponse = list(
content = "string"
),
traceId = "string"
),
observation = list(
actionGroupInvocationOutput = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
text = "string"
),
agentCollaboratorInvocationOutput = list(
agentCollaboratorAliasArn = "string",
agentCollaboratorName = "string",
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
output = list(
returnControlPayload = list(
invocationId = "string",
invocationInputs = list(
list(
apiInvocationInput = list(
actionGroup = "string",
actionInvocationType = "RESULT"|"USER_CONFIRMATION"|"USER_CONFIRMATION_AND_RESULT",
agentId = "string",
apiPath = "string",
collaboratorName = "string",
httpMethod = "string",
parameters = list(
list(
name = "string",
type = "string",
value = "string"
)
),
requestBody = list(
content = list(
list(
properties = list(
list(
name = "string",
type = "string",
value = "string"
)
)
)
)
)
),
functionInvocationInput = list(
actionGroup = "string",
actionInvocationType = "RESULT"|"USER_CONFIRMATION"|"USER_CONFIRMATION_AND_RESULT",
agentId = "string",
collaboratorName = "string",
function = "string",
parameters = list(
list(
name = "string",
type = "string",
value = "string"
)
)
)
)
)
),
text = "string",
type = "TEXT"|"RETURN_CONTROL"
)
),
codeInterpreterInvocationOutput = list(
executionError = "string",
executionOutput = "string",
executionTimeout = TRUE|FALSE,
files = list(
"string"
),
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
)
),
finalResponse = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
text = "string"
),
knowledgeBaseLookupOutput = list(
metadata = list(
clientRequestId = "string",
endTime = as.POSIXct(
"2015-01-01"
),
operationTotalTimeMs = 123,
startTime = as.POSIXct(
"2015-01-01"
),
totalTimeMs = 123,
usage = list(
inputTokens = 123,
outputTokens = 123
)
),
retrievedReferences = list(
list(
content = list(
audio = list(
s3Uri = "string",
transcription = "string"
),
byteContent = "string",
row = list(
list(
columnName = "string",
columnValue = "string",
type = "BLOB"|"BOOLEAN"|"DOUBLE"|"NULL"|"LONG"|"STRING"
)
),
text = "string",
type = "TEXT"|"IMAGE"|"ROW"|"AUDIO"|"VIDEO",
video = list(
s3Uri = "string",
summary = "string"
)
),
location = list(
confluenceLocation = list(
url = "string"
),
customDocumentLocation = list(
id = "string"
),
googleDriveLocation = list(
url = "string"
),
kendraDocumentLocation = list(
uri = "string"
),
oneDriveLocation = list(
url = "string"
),
s3Location = list(
uri = "string"
),
salesforceLocation = list(
url = "string"
),
sharePointLocation = list(
url = "string"
),
sqlLocation = list(
query = "string"
),
type = "S3"|"WEB"|"CONFLUENCE"|"SALESFORCE"|"SHAREPOINT"|"CUSTOM"|"KENDRA"|"SQL"|"ONEDRIVE"|"GOOGLEDRIVE",
webLocation = list(
url = "string"
)
),
metadata = list(
list()
)
)
)
),
repromptResponse = list(
source = "ACTION_GROUP"|"KNOWLEDGE_BASE"|"PARSER",
text = "string"
),
traceId = "string",
type = "ACTION_GROUP"|"AGENT_COLLABORATOR"|"KNOWLEDGE_BASE"|"FINISH"|"ASK_USER"|"REPROMPT"
)
)
)
),
validationException = list(
message = "string"
)
),
contentType = "string",
memoryId = "string",
sessionId = "string"
)
Request syntax¶
svc$invoke_agent(
agentAliasId = "string",
agentId = "string",
bedrockModelConfigurations = list(
performanceConfig = list(
latency = "standard"|"optimized"
)
),
enableTrace = TRUE|FALSE,
endSession = TRUE|FALSE,
inputText = "string",
memoryId = "string",
promptCreationConfigurations = list(
excludePreviousThinkingSteps = TRUE|FALSE,
previousConversationTurnsToInclude = 123
),
sessionId = "string",
sessionState = list(
conversationHistory = list(
messages = list(
list(
content = list(
list(
text = "string"
)
),
role = "user"|"assistant"
)
)
),
files = list(
list(
name = "string",
source = list(
byteContent = list(
data = raw,
mediaType = "string"
),
s3Location = list(
uri = "string"
),
sourceType = "S3"|"BYTE_CONTENT"
),
useCase = "CODE_INTERPRETER"|"CHAT"
)
),
invocationId = "string",
knowledgeBaseConfigurations = list(
list(
knowledgeBaseId = "string",
retrievalConfiguration = list(
managedSearchConfiguration = list(
filter = list(
andAll = list(
list()
),
equals = list(
key = "string",
value = list()
),
greaterThan = list(
key = "string",
value = list()
),
greaterThanOrEquals = list(
key = "string",
value = list()
),
in = list(
key = "string",
value = list()
),
lessThan = list(
key = "string",
value = list()
),
lessThanOrEquals = list(
key = "string",
value = list()
),
listContains = list(
key = "string",
value = list()
),
notEquals = list(
key = "string",
value = list()
),
notIn = list(
key = "string",
value = list()
),
orAll = list(
list()
),
startsWith = list(
key = "string",
value = list()
),
stringContains = list(
key = "string",
value = list()
)
),
numberOfResults = 123,
rerankingConfiguration = list(
bedrockRerankingConfiguration = list(
metadataConfiguration = list(
selectionMode = "SELECTIVE"|"ALL",
selectiveModeConfiguration = list(
fieldsToExclude = list(
list(
fieldName = "string"
)
),
fieldsToInclude = list(
list(
fieldName = "string"
)
)
)
),
modelConfiguration = list(
additionalModelRequestFields = list(
list()
),
modelArn = "string"
),
numberOfRerankedResults = 123
),
type = "BEDROCK_RERANKING_MODEL"
),
rerankingModelType = "CUSTOM"|"MANAGED"|"NONE"
),
vectorSearchConfiguration = list(
filter = list(
andAll = list(
list()
),
equals = list(
key = "string",
value = list()
),
greaterThan = list(
key = "string",
value = list()
),
greaterThanOrEquals = list(
key = "string",
value = list()
),
in = list(
key = "string",
value = list()
),
lessThan = list(
key = "string",
value = list()
),
lessThanOrEquals = list(
key = "string",
value = list()
),
listContains = list(
key = "string",
value = list()
),
notEquals = list(
key = "string",
value = list()
),
notIn = list(
key = "string",
value = list()
),
orAll = list(
list()
),
startsWith = list(
key = "string",
value = list()
),
stringContains = list(
key = "string",
value = list()
)
),
implicitFilterConfiguration = list(
metadataAttributes = list(
list(
description = "string",
key = "string",
type = "STRING"|"NUMBER"|"BOOLEAN"|"STRING_LIST"
)
),
modelArn = "string"
),
numberOfResults = 123,
overrideSearchType = "HYBRID"|"SEMANTIC",
rerankingConfiguration = list(
bedrockRerankingConfiguration = list(
metadataConfiguration = list(
selectionMode = "SELECTIVE"|"ALL",
selectiveModeConfiguration = list(
fieldsToExclude = list(
list(
fieldName = "string"
)
),
fieldsToInclude = list(
list(
fieldName = "string"
)
)
)
),
modelConfiguration = list(
additionalModelRequestFields = list(
list()
),
modelArn = "string"
),
numberOfRerankedResults = 123
),
type = "BEDROCK_RERANKING_MODEL"
)
)
)
)
),
promptSessionAttributes = list(
"string"
),
returnControlInvocationResults = list(
list(
apiResult = list(
actionGroup = "string",
agentId = "string",
apiPath = "string",
confirmationState = "CONFIRM"|"DENY",
httpMethod = "string",
httpStatusCode = 123,
responseBody = list(
list(
body = "string",
images = list(
list(
format = "png"|"jpeg"|"gif"|"webp",
source = list(
bytes = raw
)
)
)
)
),
responseState = "FAILURE"|"REPROMPT"
),
functionResult = list(
actionGroup = "string",
agentId = "string",
confirmationState = "CONFIRM"|"DENY",
function = "string",
responseBody = list(
list(
body = "string",
images = list(
list(
format = "png"|"jpeg"|"gif"|"webp",
source = list(
bytes = raw
)
)
)
)
),
responseState = "FAILURE"|"REPROMPT"
)
)
),
sessionAttributes = list(
"string"
)
),
sourceArn = "string",
streamingConfigurations = list(
applyGuardrailInterval = 123,
streamFinalResponse = TRUE|FALSE
)
)