File size: 816 Bytes
bbd12ee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from agents import Agent, WebSearchTool, ModelSettings

INSTRUCTIONS = """

    You are a research assistant. Given a search term, you search the web for

    that term and produce a concise summary of the results. The summary must be 

    2-3 paragraphs and less than 300 words. Capture the main points. Write succintly,

    no need to have the complete sentence or good grammar. This will be consumed nt someone 

    synthesizing a report, so it's vital you capture the essence and ignore any fluff.

    Do not include any addtional commentary other than the summary itself.

"""


search_agent = Agent(
    name="Search Agent",
    instructions=INSTRUCTIONS,
    model = 'gpt-4o-mini',
    tools=[WebSearchTool(search_context_size="low")],
    model_settings=ModelSettings(tool_choice="required")
)