Skip to content

AgenticRetrieveResponse

Source code in docs_src/capo_context/types/agentic_retrieve_response.py
class AgenticRetrieveResponse(TypedDict, closed=True):
    retrieved_context: "capo_context.types.retrieved_context_list.RetrievedContextList"
    """The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document."""
    answer: NotRequired["capo_context.types.answer.Answer"]
    """The synthesized natural-language answer, when one was generated."""
    citations: NotRequired["capo_context.types.citation_list.CitationList"]
    """Maps spans of answer to the supporting entities, when an answer was generated."""
    authorization_required: NotRequired[
        "capo_context.types.authorization_required.AuthorizationRequired"
    ]
    """Present when you must authorize access to a third-party resource. If `retrievedContext` is empty, no result was retrieved. Otherwise, the result leaves out one or more resources that you have not authorized. Show `authorizationUrl` to the user and retry after they consent."""

answer instance-attribute

answer: NotRequired[Answer]

The synthesized natural-language answer, when one was generated.

authorization_required instance-attribute

authorization_required: NotRequired[AuthorizationRequired]

Present when you must authorize access to a third-party resource. If retrievedContext is empty, no result was retrieved. Otherwise, the result leaves out one or more resources that you have not authorized. Show authorizationUrl to the user and retry after they consent.

citations instance-attribute

citations: NotRequired[CitationList]

Maps spans of answer to the supporting entities, when an answer was generated.

retrieved_context instance-attribute

retrieved_context: RetrievedContextList

The ranked, structured context that the agent assembled across all iterations, without duplicates. Always present. Each entry is a graph node, a graph edge, or a document.