f"Analyze the following website content and extract a JSON object based on the objective. Do not write the ```json and ``` to denote a JSON when returning a response",
"""Hand off the search query to the search google agent."""
returngoogle_search_agent
defhandoff_to_map_url():
"""Hand off the url to the map url agent."""
returncrawl_website_agent
defhandoff_to_analyst():
"""Hand off the website content to the analyst agent."""
returnanalyst_agent
defhandoff_to_writer():
"""Hand off the results to the writer agent."""
returnwriter_agent
user_interface_agent=Agent(
name="User Interface Agent",
instructions="You are a user interface agent that handles all interactions with the user. You need to always start with reading a CSV, then perform web data extraction objective that the user wants to achieve by searching the web, crawling the website URL, and extracting the content from a specific page. Be concise.",
instructions="You are a google search agent specialized in searching the web. Only search for the website not any specific page. When you are done, you must hand off to the crawl agent.",
functions=[search_google,handoff_to_map_url],
)
crawl_website_agent=Agent(
name="Crawl Website Agent",
instructions="You are a crawl url agent specialized in crawling the web pages. When you are done, you must hand off the results to the analyst agent.",
functions=[crawl_url,handoff_to_analyst],
)
analyst_agent=Agent(
name="Analyst Agent",
instructions="You are an analyst agent that examines website content and returns a JSON object. When you are done, you must hand off the results to the writer agent.",