import os from crewai import Agent, Task, Crew from crewai_tools import ( SerperDevTool, WebsiteSearchTool ) from phoenix.otel import register PHOENIX_CLIENT_HEADERS = "api_key=" + os.environ["PHOENIX_API_KEY"] PHOENIX_COLLECTOR_ENDPOINT = "https://app.phoenix.arize.com" tracer_provider = register( project_name="gaia", endpoint="https://app.phoenix.arize.com/v1/traces" ) def get_crew(): search_tool = SerperDevTool() web_rag_tool = WebsiteSearchTool() researcher = Agent( role='Web Research Agent.', goal='Search the web and scrape web pages.', backstory='An expert researcher that can search the web and scrape web page content.', tools=[search_tool, web_rag_tool], verbose=True ) research = Task( description='Search the web and scrape web pages.', expected_output='Scraped web page content.', agent=researcher ) return Crew( agents=[researcher], tasks=[research], verbose=True, planning=True )