Documentation Index
Fetch the complete documentation index at: https://docs.honeyhive.ai/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
CrewAI is a framework for orchestrating role-playing autonomous AI agents. By integrating CrewAI with HoneyHive, you can trace and monitor your agent interactions, enabling better visibility, evaluation, and improvement of your agent workflows.Prerequisites
- A HoneyHive account
- A CrewAI project
- A HoneyHive API key
Initializing HoneyHive Tracer
Use the following code to initialize HoneyHive tracing in your CrewAI project:Using the @trace Decorator
HoneyHive provides a @trace decorator that you can use to trace specific functions in your CrewAI workflow:
@trace, you can create a hierarchical trace structure that reflects your CrewAI workflow.
Required Environment Variables
Make sure to set the following environment variables before running your application:HONEYHIVE_API_KEY: Your HoneyHive API keyHONEYHIVE_PROJECT_NAME: The name of your HoneyHive project (defaults to “crewai-demo” in the example)HONEYHIVE_SOURCE: The source of your traces (defaults to “dev” in the example)
.env file and the python-dotenv package to manage these environment variables.
For the most up-to-date compatibility information, please refer to the HoneyHive documentation.
Enriching Properties
For information on how to enrich your traces and spans with additional context, see our enrichment documentation.Adding Evaluators
Once traces have been logged in the HoneyHive platform, you can then run evaluations with Python or TypeScript.Complete Example
Below is a complete example demonstrating how to integrate HoneyHive tracing with a CrewAI workflow:What Gets Traced
When you use HoneyHive with CrewAI, the following information is traced:- Agent Creation: Details about the agents’ roles, goals, and backstories
- Task Creation: Task descriptions, expected outputs, and agent assignments
- Crew Execution: The entire workflow of the crew, including all agent interactions
- Function Calls: Any function decorated with
@tracewill have its inputs and outputs traced
- Visualize your CrewAI workflow in the HoneyHive dashboard
- Analyze agent performance and interactions
- Debug issues in your agent workflows
- Evaluate the quality of agent outputs
- Monitor the execution time of different components


