Skip to main content

CrewAI

Use the Adaline CrewAI observer to send CrewAI crew executions into Adaline. The integration wraps an existing crew and observes its kickoff lifecycle without changing the crew or task logic itself.

Prerequisites

Before you start, make sure you have:
  • An Adaline account.
  • A workspace API key — create one under Settings → API keys.
  • Your project ID — copy it from Monitor → Copy Project ID.
See Integrate your AI Agent for a full walkthrough. Set both as environment variables before running the examples on this page:

Install

Initialize Adaline

Create an Adaline client, then initialize a monitor for the target project.
For production guidance — buffering, batching, retries, serverless flushing, and graceful shutdown — see Instrument with the Adaline SDK.

Wrap a CrewAI crew

Create an AdalineCrewAIObserver, then wrap the crew you want to observe.

Basic example

This example keeps the integration intentionally small: one crew with one agent and one task, observed through wrap_crew.

Use an existing parent trace or span

The CrewAI observer accepts:
  • parent_trace
  • parent_span
Pass one or the other, but not both.

What the observer captures

The CrewAI integration is designed to capture crew execution activity, including:
  • a root observation for the crew kickoff
  • serialized task and agent input metadata
  • step callbacks emitted during the run
  • child spans under an Adaline parent when provided
This page focuses on how to wrap the crew. The exact span tree depends on the CrewAI run behavior and step callbacks emitted during execution.

Next steps

Instrument with the Adaline SDK

Monitor lifecycle, buffering and batching, retries, serverless flushing, and graceful shutdown.

SDK reference

Full class and type reference for the TypeScript and Python SDKs.

All integrations

Browse every framework and AI-provider integration Adaline supports.

View your logs

Open Adaline to see traces and spans land in your project.