agents.memory_reorganized.search.quick_search.agent¶
Quick Search Agent implementation.
Provides fast, basic search responses optimized for speed and concise answers. Similar to Perplexity’s Quick Search feature.
Classes¶
Agent for fast, basic search responses. |
Module Contents¶
- class agents.memory_reorganized.search.quick_search.agent.QuickSearchAgent(name='quick_search_agent', engine=None, search_tools=None, **kwargs)¶
Bases:
haive.agents.memory.search.base.BaseSearchAgent
Agent for fast, basic search responses.
Optimized for speed and concise answers. Provides quick factual responses without deep research or complex analysis.
Features: - Fast response times (< 2 seconds target) - Concise, direct answers - Basic source attribution - Memory integration for context - Key extraction
Examples
Basic usage:
agent = QuickSearchAgent( name="quick_search", engine=AugLLMConfig(temperature=0.1) ) response = await agent.process_search("What is the capital of France?") print(response.response) # "The capital of France is Paris..."
With custom configuration:
agent = QuickSearchAgent( name="quick_search", engine=AugLLMConfig( temperature=0.0, # Deterministic for facts max_tokens=150 # Keep responses short ) )
Initialize the Quick Search Agent.
- Parameters:
- async batch_search(queries)¶
Process multiple quick search queries efficiently.
- determine_answer_type(query)¶
Determine the type of answer needed.
- extract_keywords(query)¶
Extract key terms from the search query.
- get_response_model()¶
Get the response model for quick search.
- Return type:
type[haive.agents.memory.search.base.SearchResponse]
- async process_search(query, context=None, save_to_memory=True)¶
Process a quick search query.