Skip to main content

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
Last tested with crewai 1.14.4 and openinference-instrumentation-crewai 1.1.5 (May 2026).

Initializing HoneyHive Tracer

Use the following code to initialize HoneyHive tracing in your CrewAI project:
This initializes auto-tracing for your CrewAI application. You can customize the session name to organize your traces logically.

Using the @trace Decorator

HoneyHive provides a @trace decorator that you can use to trace specific functions in your CrewAI workflow:
By decorating key functions with @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 key
  • HONEYHIVE_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)
You can use a .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 @trace will have its inputs and outputs traced
This tracing allows you to:
  1. Visualize your CrewAI workflow in the HoneyHive dashboard
  2. Analyze agent performance and interactions
  3. Debug issues in your agent workflows
  4. Evaluate the quality of agent outputs
  5. Monitor the execution time of different components
CrewAI HoneyHive Integration

Conclusion

By integrating HoneyHive with CrewAI, you gain powerful tracing and monitoring capabilities for your AI agent workflows. This enables you to build more robust, reliable, and effective multi-agent systems. For more information on HoneyHive tracing, please refer to our tracing documentation.