Skip to content

Bedrock Agent Runtime  >  Structures  >  Observation

Observation

Structure Class

Observation dataclass

Contains the result or output of an action group or knowledge base, or the response to the user.

Attributes

action_group_invocation_output class-attribute instance-attribute
action_group_invocation_output: ActionGroupInvocationOutput | None = None

Contains the JSON-formatted string returned by the API invoked by the action group.

agent_collaborator_invocation_output class-attribute instance-attribute
agent_collaborator_invocation_output: AgentCollaboratorInvocationOutput | None = None

A collaborator's invocation output.

code_interpreter_invocation_output class-attribute instance-attribute
code_interpreter_invocation_output: CodeInterpreterInvocationOutput | None = None

Contains the JSON-formatted string returned by the API invoked by the code interpreter.

final_response class-attribute instance-attribute
final_response: FinalResponse | None = None

Contains details about the response to the user.

knowledge_base_lookup_output class-attribute instance-attribute
knowledge_base_lookup_output: KnowledgeBaseLookupOutput | None = None

Contains details about the results from looking up the knowledge base.

reprompt_response class-attribute instance-attribute
reprompt_response: RepromptResponse | None = field(repr=False, default=None)

Contains details about the response to reprompt the input.

trace_id class-attribute instance-attribute
trace_id: str | None = None

The unique identifier of the trace.

type class-attribute instance-attribute
type: Type | None = None

Specifies what kind of information the agent returns in the observation. The following values are possible.

  • ACTION_GROUP -- The agent returns the result of an action group.

  • KNOWLEDGE_BASE -- The agent returns information from a knowledge base.

  • FINISH -- The agent returns a final response to the user with no follow-up.

  • ASK_USER -- The agent asks the user a question.

  • REPROMPT -- The agent prompts the user again for the same information.