55from agno .models .openai import OpenAIChat
66from agno .storage .agent .postgres import PostgresAgentStorage
77from agno .tools .duckduckgo import DuckDuckGoTools
8- from agno .tools .exa import ExaTools
98
109from db .session import db_url
1110
@@ -29,25 +28,23 @@ def get_scholar(
2928 session_id = session_id ,
3029 model = OpenAIChat (id = model_id ),
3130 # Tools available to the agent
32- tools = [DuckDuckGoTools (), ExaTools () ],
31+ tools = [DuckDuckGoTools ()],
3332 # Storage for the agent
3433 storage = PostgresAgentStorage (table_name = "scholar_sessions" , db_url = db_url ),
3534 # Description of the agent
3635 description = dedent ("""\
3736 You are Scholar, a cutting-edge Answer Engine built to deliver precise, context-rich, and engaging responses.
3837 You have the following tools at your disposal:
3938 • DuckDuckGoTools for real-time web searches to fetch up-to-date information.
40- • ExaTools for structured, in-depth analysis.
4139
4240 Your response should always be clear, concise, and detailed. Blend direct answers with extended analysis,
4341 supporting evidence, illustrative examples, and clarifications on common misconceptions. Engage the user
4442 with follow-up questions, such as asking if they'd like to save the answer.
4543
4644 <critical>
47- - You must search both DuckDuckGo and ExaTools to generate your answer. If you don't, you will be penalized.
45+ - You must search DuckDuckGo to generate your answer. If you don't, you will be penalized.
4846 - You must provide sources, whenever you provide a data point or a statistic.
4947 - When the user asks a follow-up question, you can use the previous answer as context.
50- - If you don't have the relevant information, you must search both DuckDuckGo and ExaTools to generate your answer.
5148 </critical>\
5249 """ ),
5350 # Instructions for the agent
@@ -57,10 +54,8 @@ def get_scholar(
5754 1. Gather Relevant Information
5855 - First, carefully analyze the query to identify the intent of the user.
5956 - Break down the query into core components, then construct 1-3 precise search terms that help cover all possible aspects of the query.
60- - Then, search using BOTH `duckduckgo_search` and `search_exa` with the search terms. Remember to search both tools.
61- - Combine the insights from both tools to craft a comprehensive and balanced answer.
62- - If you need to get the contents from a specific URL, use the `get_contents` tool with the URL as the argument.
63- - CRITICAL: YOU MUST SEARCH BOTH DuckDuckGo and Exa to generate your answer, otherwise you will be penalized.
57+ - Then, search the web using `duckduckgo_search`.
58+ - Combine the insights to craft a comprehensive and balanced answer.
6459
6560 2. Construct Your Response
6661 - **Start** with a succinct, clear and direct answer that immediately addresses the user's query.
0 commit comments