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
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
# 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
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
# 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]}...")