aboutsummaryrefslogtreecommitdiffstats
path: root/useragents/src/custom_agents/web_search_tool.py
blob: 16bf20615ba2ea1904605b47f3ac16ece8130cb3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from agents import Agent, WebSearchTool
from src.current_time import fetch_date
from src.models import AgentRequest
from src.registry import agentRegistry


@agentRegistry
def web_search_tool(agent_request: AgentRequest) -> Agent:
    tools = [WebSearchTool(), fetch_date]

    agent = Agent(
        name=agent_request.agent_name,
        instructions=agent_request.instructions,
        tools=tools,
    )

    return agent