CrewAI

CrewAI is a Python framework for orchestrating role-playing, multi-agent crews. Neens ingests its traces through standard OpenTelemetry with zero Neens-specific code — you instrument CrewAI once at startup and point an OTLP exporter at Neens.

⚠️

CrewAI ships its own built-in telemetry (anonymous usage stats) — that is unrelated to trace export. The OpenTelemetry trace path below is a separate, third-party instrumentor.

At a glance

LanguagePython
Instrumentationopeninference-instrumentation-crewai + an LLM-level instrumentor, e.g. openinference-instrumentation-litellm (OpenInference instrumentors — community-maintained by Arize)
EndpointPOST /v1/traces (OTLP/HTTP)
AuthAuthorization: Bearer nk_live_… agent key

Instrument your agent

Install the instrumentation

The OpenInference CrewAI instrumentor captures Crew / Agent / Task spans. It does not trace the underlying LLM calls on its own, so pair it with an LLM-level instrumentor. CrewAI routes most models through LiteLLM, so openinference-instrumentation-litellm is the common pairing; if your model string routes to a native SDK (e.g. openai/…), install that provider’s instrumentor instead (openinference-instrumentation-openai, openinference-instrumentation-anthropic, …).

pip install openinference-instrumentation-crewai openinference-instrumentation-litellm opentelemetry-sdk opentelemetry-exporter-otlp

Point the exporter at Neens

from openinference.instrumentation.crewai import CrewAIInstrumentor
from openinference.instrumentation.litellm import LiteLLMInstrumentor
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
 
exporter = OTLPSpanExporter(
    endpoint="https://<your-neens-host>/v1/traces",
    headers={"Authorization": "Bearer nk_live_your_key_here"},
)
 
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(exporter))
trace.set_tracer_provider(provider)
 
# Instrument once, before you build or kick off your crew.
CrewAIInstrumentor().instrument(tracer_provider=provider)
LiteLLMInstrumentor().instrument(tracer_provider=provider)

Run your crew

Run your crew as usual — crew.kickoff(). Spans export to Neens in the background.

What Neens captures

The instrumentors emit spans for each agent and task in the crew, every LLM call (model, token counts, prompt/response messages), and every tool call — so you see the full multi-agent trajectory. For multi-turn crews, set a conversation/session id on your runs so Neens groups them into one session (see Traces & sessions).

Neens speaks standard OTLP — this is not a Neens SDK fork. Any OpenTelemetry-instrumented CrewAI app exports to Neens by pointing its exporter at the endpoint above. See Send traces for the full attribute reference, size limits, and response codes.

Verify

Open Traces in Neens; your CrewAI runs appear within a few seconds. Continue to Traces & sessions.