AgentOps and CrewAI teamed up to make monitoring Crew agents dead simple.
CrewAI is a framework for easily building multi-agent applications. AgentOps integrates with CrewAI to provide observability into your agent workflows. Crew has comprehensive documentation available as well as a great quickstart guide.
Simply initialize AgentOps at the beginning of your CrewAI application. AgentOps automatically instruments CrewAI components—including its LLM—to track your agent interactions.
Here’s how to set up a basic CrewAI application with AgentOps:
Copy
import agentopsfrom crewai import Agent, Task, Crew, LLM# Initialize AgentOps clientagentops.init()# Define the LLM to use with CrewAIllm = LLM( model="openai/gpt-4o", # Or your preferred model temperature=0.7,)# Create an agentresearcher = Agent( role='Researcher', goal='Research and provide accurate information about cities and their history', backstory='You are an expert researcher with vast knowledge of world geography and history.', llm=llm, verbose=True)# Create a taskresearch_task = Task( description='What is the capital of France? Provide a detailed answer about its history, culture, and significance.', expected_output='A comprehensive response about Paris, including its status as the capital of France, historical significance, cultural importance, and key landmarks.', agent=researcher)# Create a crew with the researchercrew = Crew( agents=[researcher], tasks=[research_task], verbose=True)# Execute the taskresult = crew.kickoff()print("\nCrew Research Results:")print(result)