aboutsummaryrefslogtreecommitdiffstats
path: root/useragents/src/custom_agents/web_search_tool.py
diff options
context:
space:
mode:
Diffstat (limited to 'useragents/src/custom_agents/web_search_tool.py')
-rw-r--r--useragents/src/custom_agents/web_search_tool.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/useragents/src/custom_agents/web_search_tool.py b/useragents/src/custom_agents/web_search_tool.py
new file mode 100644
index 0000000..16bf206
--- /dev/null
+++ b/useragents/src/custom_agents/web_search_tool.py
@@ -0,0 +1,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