Skip to content

Observation

Source code in docs_src/capo_bedrock_agent_runtime/types/observation.py
class Observation(TypedDict, closed=True):
    trace_id: NotRequired["capo_bedrock_agent_runtime.types.trace_id.TraceId"]
    """<p>The unique identifier of the trace.</p>"""
    type: NotRequired["capo_bedrock_agent_runtime.types.type.Type"]
    """<p>Specifies what kind of information the agent returns in the observation. The following values are possible.</p> <ul> <li> <p> <code>ACTION_GROUP</code> – The agent returns the result of an action group.</p> </li> <li> <p> <code>KNOWLEDGE_BASE</code> – The agent returns information from a knowledge base.</p> </li> <li> <p> <code>FINISH</code> – The agent returns a final response to the user with no follow-up.</p> </li> <li> <p> <code>ASK_USER</code> – The agent asks the user a question.</p> </li> <li> <p> <code>REPROMPT</code> – The agent prompts the user again for the same information.</p> </li> </ul>"""
    action_group_invocation_output: NotRequired[
        "capo_bedrock_agent_runtime.types.action_group_invocation_output.ActionGroupInvocationOutput"
    ]
    """<p>Contains the JSON-formatted string returned by the API invoked by the action group.</p>"""
    agent_collaborator_invocation_output: NotRequired[
        "capo_bedrock_agent_runtime.types.agent_collaborator_invocation_output.AgentCollaboratorInvocationOutput"
    ]
    """<p>A collaborator's invocation output.</p>"""
    knowledge_base_lookup_output: NotRequired[
        "capo_bedrock_agent_runtime.types.knowledge_base_lookup_output.KnowledgeBaseLookupOutput"
    ]
    """<p>Contains details about the results from looking up the knowledge base.</p>"""
    final_response: NotRequired[
        "capo_bedrock_agent_runtime.types.final_response.FinalResponse"
    ]
    """<p>Contains details about the response to the user.</p>"""
    reprompt_response: NotRequired[
        "capo_bedrock_agent_runtime.types.reprompt_response.RepromptResponse"
    ]
    """<p>Contains details about the response to reprompt the input.</p>"""
    code_interpreter_invocation_output: NotRequired[
        "capo_bedrock_agent_runtime.types.code_interpreter_invocation_output.CodeInterpreterInvocationOutput"
    ]
    """<p>Contains the JSON-formatted string returned by the API invoked by the code interpreter.</p>"""

action_group_invocation_output instance-attribute

action_group_invocation_output: NotRequired[ActionGroupInvocationOutput]

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

agent_collaborator_invocation_output instance-attribute

agent_collaborator_invocation_output: NotRequired[AgentCollaboratorInvocationOutput]

A collaborator's invocation output.

code_interpreter_invocation_output instance-attribute

code_interpreter_invocation_output: NotRequired[CodeInterpreterInvocationOutput]

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

final_response instance-attribute

final_response: NotRequired[FinalResponse]

Contains details about the response to the user.

knowledge_base_lookup_output instance-attribute

knowledge_base_lookup_output: NotRequired[KnowledgeBaseLookupOutput]

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

reprompt_response instance-attribute

reprompt_response: NotRequired[RepromptResponse]

Contains details about the response to reprompt the input.

trace_id instance-attribute

trace_id: NotRequired[TraceId]

The unique identifier of the trace.

type instance-attribute

type: NotRequired[Type]

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.