async def iter_search_agent_context(
self,
agent_context_id: "capo_context.types.agent_context_identifier.AgentContextIdentifier",
query: "capo_context.types.search_query.SearchQuery",
search_type: "capo_context.types.search_agent_context_type.SearchAgentContextType",
*,
config_overrides: Optional[AsyncContextClientConfig] = None,
max_results: Optional[int] = None,
next_token: Optional[str] = None,
filter: Optional["capo_context.types.search_filter.SearchFilter"] = None,
) -> "AsyncIterator[capo_context.types.search_agent_context_result_entity.SearchAgentContextResultEntity]":
_token = next_token
while True:
_response = await self.search_agent_context(
agent_context_id,
query,
search_type,
config_overrides=config_overrides,
max_results=max_results,
next_token=_token,
filter=filter,
)
_page = _resolve_path(_response, ("items",))
for _item in _page or []:
yield _item
_token = _resolve_path(_response, ("next_token",))
if not _token:
break