Documentation
AgentSearchResource
Access via client.agent_search - AI-powered search without chat sessions
Direct Agent Access
Use this for standalone AI searches. For conversational search with context, use ChatResource instead.
Tip: More Token-Efficient Than Chat
These standalone search methods consume significantly fewer tokens than running searches through agentic chat. If you only need to find images or documents without multi-turn conversation, use these directly.
images()
Execute AI-powered image search with intelligent reasoning
python
async def images( query: str, *, limit: int = 50, # 1-500 folder_id: Optional[str] = None, image_ids: Optional[list[str]] = None,) -> ImageSearchAgentResultReturns: ImageSearchAgentResult - Full results with metadata, summary, and result refs
Example
python
# Search for imagesresult = await client.agent_search.images( "damaged utility poles in residential areas")print(f"Found {result.count} images")print(f"Summary: {result.summary}")
for img in result.results[:5]: print(f"- {img.filename}: score={img.score:.2f}")
# Search within a folderresult = await client.agent_search.images( "safety equipment", folder_id="folder_abc123")documents()
Execute AI-powered document search with intelligent reasoning
python
async def documents( query: str, *, limit: int = 50, # 1-500 document_types: Optional[list[str]] = None, # pdf, docx, txt document_ids: Optional[list[str]] = None,) -> DocumentSearchAgentResultReturns: DocumentSearchAgentResult - Chunks with text, scores, and document references
Example
python
# Search documentsresult = await client.agent_search.documents( "safety inspection procedures", document_types=["pdf"])
print(f"Found {result.count} sections in {len(result.document_ids)} documents")for chunk in result.results: print(f"{chunk.document_filename} p{chunk.page_numbers}: {chunk.text[:100]}...")videos()
Execute AI-powered video search with scene-level matching. Returns matched videos and the specific scenes (with start/end timestamps) inside each that correspond to the query.
python
async def videos( query: str, *, limit: int = 50, # 1-500 folder_id: Optional[str] = None, video_ids: Optional[list[str]] = None, domain: Optional[str] = None, # general, civil_engineering, maps, mining) -> VideoSearchAgentResultReturns: VideoSearchAgentResult — Videos with matched_scenes, summary, and result refs
Example
python
result = await client.agent_search.videos( "closeup of a fire truck at night")print(f"Found {result.count} videos")print(f"Summary: {result.summary}")
for video in result.results: print(f"- {video.video_filename} score={video.score:.2f}") for scene in video.matched_scenes or []: print(f" scene {scene.scene_index} " f"{scene.time_range_formatted} {scene.description}")
# Search within specific videosresult = await client.agent_search.videos( "sparks during grinding", video_ids=["vid_550e8400", "vid_660f9500"],)
