API Reference
Unified Search
Search across all entity types in a single call.
searchmethodSearch across all entity types (profiles, agent_playbooks, user_playbooks) in a single call. The server runs query reformulation and searches all entity types in parallel.
Async counterpart
Async applications can call
await client.search_async(...) with the same request fields and response model. It uses native async HTTP, applies the client's total timeout, and preserves task cancellation.Info
When an agent playbook is returned,
user_playbooks omits source user playbooks already represented by that agent playbook. The server does not refill suppressed user playbooks, so user_playbooks may contain fewer than top_k items.response = client.search( query="user preferences", user_id="user_123", source="api", top_k=5, threshold=0.45, tags=["preferences", "support"],)| Prop | Type |
|---|---|
queryrequired | string |
top_k | integer |
threshold | float |
agent_version | string |
playbook_name | string |
user_id | string |
source | string |
request_id | string |
session_id | string |
interaction_id | integer |
tags | list[string] |
entity_types | list[string] |
agent_playbook_status_filter | list[PlaybookStatus | string] |
enable_reformulation | boolean |
enable_agent_answer | boolean |
conversation_history | list[ConversationTurn] |
search_mode | SearchMode | string |
Returns UnifiedSearchResponse — see Search Models.
Example
search-examples.py
# Basic unified searchresponse = client.search(query="response quality issues") print(f"Profiles: {len(response.profiles)}")print(f"Agent Playbooks: {len(response.agent_playbooks)}")print(f"User Playbooks: {len(response.user_playbooks)}")if response.reformulated_query: print(f"Reformulated query: {response.reformulated_query}") for profile in response.profiles: print(f" Profile: {profile.content[:80]}...") for playbook in response.agent_playbooks: print(f" Playbook: {playbook.content[:80]}...") # Search with filtersresponse = client.search( query="handling edge cases", agent_version="v2.1.0", tags=["reliability", "support"], top_k=10, threshold=0.4) # Search filtered by userresponse = client.search( query="product preferences", user_id="user_123", top_k=5)