Readonly
bodyThe response object that defines the response from execution of the function.
Optional
Readonly
knowledgeOptional field to configure knowledge bases for the agent.
Bedrock Agent Knowledge Bases for more details.
Readonly
promptOptional field to instruct the agent to prompt attributes and their values.
Bedrock Agent Session State Attributes for more details.
Optional
Readonly
responseOptional field to indicate the whether the response is a failure or a reprompt. If not provided, the default is undefined, which means no specific response state is set.
FAILURE
: The agent throws a DependencyFailedException
for the current session.REPROMPT
: The agent passes a response string to the model to reprompt it.Readonly
sessionOptional field to store session attributes and their values.
Bedrock Agent Session State Attributes for more details.
Builds the Bedrock function response object according to the Bedrock agent function response format.
The options for building the response.
The action group of the function, this comes from the event.actionGroup
field in the Bedrock agent function event.
The name of the function being invoked by the agent, this comes from the event.function
field in the Bedrock agent function event.
Class representing a response from a Bedrock agent function.
You can use this class to customize the response sent back to the Bedrock agent with additional fields like:
FAILURE
orREPROMPT
)When working with the BedrockAgentFunctionResolver class, this is built automatically when you return anything from your function handler other than an instance of this class.