Skip to content

SearchAgentContextRequest

Source code in docs_src/capo_context/types/search_agent_context_request.py
class SearchAgentContextRequest(TypedDict, closed=True):
    max_results: NotRequired["int"]
    """<p>Maximum number of results to return per page.</p>"""
    next_token: NotRequired["str"]
    """<p>Opaque continuation token from a prior response. Omit on the first page.</p>"""
    agent_context_id: (
        "capo_context.types.agent_context_identifier.AgentContextIdentifier"
    )
    """<p>The agent context to search, by ID or full Amazon Resource Name (ARN).</p>"""
    query: "capo_context.types.search_query.SearchQuery"
    """<p>The natural-language query or keywords to search for in the agent context. AWS Context interprets it based on <code>searchType</code>: as literal text for <code>KEYWORD</code>, as a semantic concept for <code>SEMANTIC</code>, or as both for <code>AUTO</code>.</p>"""
    filter: NotRequired["capo_context.types.search_filter.SearchFilter"]
    """<p>Optional filter on node attributes: a single comparison, or <code>andAll</code> of comparisons that must all match.</p>"""
    search_type: "capo_context.types.search_agent_context_type.SearchAgentContextType"
    """<p>The search strategy to use. Valid values:</p> <ul> <li> <p> <code>KEYWORD</code> - Full-text keyword matching (BM25).</p> </li> <li> <p> <code>SEMANTIC</code> - Vector similarity of embeddings.</p> </li> <li> <p> <code>AUTO</code> - Keyword matches first, then semantic matches for the remaining results.</p> </li> </ul>"""

agent_context_id instance-attribute

agent_context_id: AgentContextIdentifier

The agent context to search, by ID or full Amazon Resource Name (ARN).

filter instance-attribute

filter: NotRequired[SearchFilter]

Optional filter on node attributes: a single comparison, or andAll of comparisons that must all match.

max_results instance-attribute

max_results: NotRequired[int]

Maximum number of results to return per page.

next_token instance-attribute

next_token: NotRequired[str]

Opaque continuation token from a prior response. Omit on the first page.

query instance-attribute

query: SearchQuery

The natural-language query or keywords to search for in the agent context. AWS Context interprets it based on searchType: as literal text for KEYWORD, as a semantic concept for SEMANTIC, or as both for AUTO.

search_type instance-attribute

The search strategy to use. Valid values:

  • KEYWORD - Full-text keyword matching (BM25).

  • SEMANTIC - Vector similarity of embeddings.

  • AUTO - Keyword matches first, then semantic matches for the remaining results.