ReadonlybodyThe response object that defines the response from execution of the function.
Optional ReadonlyknowledgeOptional field to configure knowledge bases for the agent.
Bedrock Agent Knowledge Bases for more details.
ReadonlypromptOptional field to instruct the agent to prompt attributes and their values.
Bedrock Agent Session State Attributes for more details.
Optional ReadonlyresponseOptional 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.ReadonlysessionOptional 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:
FAILUREorREPROMPT)When working with the
BedrockAgentFunctionResolverclass, this is built automatically when you return anything from your function handler other than an instance of this class.