Skip to content

Commit 9e8d782

Browse files
authored
[MLOB] add crewai integration tile (#20053)
* Add crewai integration tile * address suggestions * Add python disclaimer * add source type ID * Display on public website
1 parent f1d74e4 commit 9e8d782

File tree

6 files changed

+189
-0
lines changed

6 files changed

+189
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ datadog_checks_base/tests/**/test_db_statements.py @DataDog/database-monitoring
165165
/langchain/ @DataDog/ml-observability @DataDog/agent-integrations @DataDog/documentation
166166
/openai/ @DataDog/ml-observability @DataDog/agent-integrations @DataDog/documentation
167167
/anthropic/ @DataDog/ml-observability @DataDog/agent-integrations @DataDog/documentation
168+
/crewai/ @DataDog/ml-observability @DataDog/documentation
168169

169170
# Windows agent
170171
datadog_checks_base/datadog_checks/base/checks/win/ @DataDog/windows-agent @DataDog/agent-integrations

.github/workflows/config/labeler.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ integration/couch:
159159
- couch/**/*
160160
integration/couchbase:
161161
- couchbase/**/*
162+
integration/crewai:
163+
- crewai/**/*
162164
integration/cri:
163165
- cri/**/*
164166
integration/crio:

crewai/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG - CrewAI
2+
3+
## 1.0.0 / 2025-04-10
4+
5+
* [Added] Initial Release.

crewai/README.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# CrewAI
2+
3+
## Overview
4+
Use the CrewAI integration to monitor, troubleshoot, and evaluate your applications based on [CrewAI][1]'s framework.
5+
6+
**Note**: Requires Python.
7+
8+
## Setup
9+
10+
#### Installation
11+
12+
##### If you do not have the Datadog Agent:
13+
1. Install the `ddtrace` package:
14+
15+
```shell
16+
pip install ddtrace
17+
```
18+
19+
2. Start your application using the following command to enable Agentless mode:
20+
21+
```shell
22+
DD_SITE=<YOUR_DATADOG_SITE> DD_API_KEY=<YOUR_API_KEY> DD_LLMOBS_ENABLED=1 DD_LLMOBS_AGENTLESS_ENABLED=1 DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME> ddtrace-run python <YOUR_APP>.py
23+
```
24+
25+
##### If you already have the Datadog Agent installed:
26+
1. Make sure the Agent is running and that APM and StatsD are enabled. For example, use the following command with Docker:
27+
28+
```shell
29+
docker run -d \
30+
--cgroupns host \
31+
--pid host \
32+
-v /var/run/docker.sock:/var/run/docker.sock:ro \
33+
-v /proc/:/host/proc/:ro \
34+
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
35+
-e DD_API_KEY=<DATADOG_API_KEY> \
36+
-p 127.0.0.1:8126:8126/tcp \
37+
-p 127.0.0.1:8125:8125/udp \
38+
-e DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true \
39+
-e DD_APM_ENABLED=true \
40+
gcr.io/datadoghq/agent:latest
41+
```
42+
43+
2. If you haven't already, install the `ddtrace` package:
44+
45+
```shell
46+
pip install ddtrace
47+
```
48+
49+
3. To automatically enable tracing, start your application using the `ddtrace-run` command:
50+
51+
```shell
52+
DD_SITE=<YOUR_DATADOG_SITE> DD_API_KEY=<YOUR_API_KEY> DD_LLMOBS_ENABLED=1 DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME> ddtrace-run python <your_app>.py
53+
```
54+
55+
**Note**: If the Agent is running on a custom host or port, set `DD_AGENT_HOST` and `DD_TRACE_AGENT_PORT` accordingly.
56+
57+
##### If you are running LLM Observability in a serverless environment (AWS Lambda):
58+
1. Install the **Datadog-Python** and **Datadog-Extension** Lambda layers as part of your AWS Lambda setup.
59+
2. Enable LLM Observability by setting the following environment variables:
60+
61+
```shell
62+
DD_SITE=<YOUR_DATADOG_SITE> DD_API_KEY=<YOUR_API_KEY> DD_LLMOBS_ENABLED=1 DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME>
63+
```
64+
65+
**Note**: In serverless environments, Datadog automatically flushes spans at the end of the Lambda function.
66+
67+
##### Automatic CrewAI tracing
68+
69+
The CrewAI integration allows for automatic tracing of Crew kickoffs, including task/agent/tool invocations, made through [CrewAI's Python SDK][1]. The CrewAI integration also captures latency, errors, input/output messages, and directional data flow linking during Crew executions.
70+
71+
The following CrewAI methods are traced:
72+
- [Crew Kickoff][2]:
73+
- `crew.kickoff()`
74+
- `crew.kickoff_async()`
75+
- `crew.kickoff_for_each()`
76+
- `crew.kickoff_for_each_async()`
77+
78+
- [Task Execution][3]:
79+
- `task.execute_sync()`
80+
- `task.execute_async()`
81+
82+
- [Agent Execution][4]:
83+
- `agent.execute_task()`
84+
85+
- [Tool Invocation][5]:
86+
- `tool.invoke()`
87+
88+
No additional setup is required for these methods.
89+
90+
##### Validation
91+
92+
Validate that LLM Observability is properly capturing spans by checking your application logs for successful span creation. You can also run the following command to check the status of the `dd-trace` integration:
93+
94+
```shell
95+
ddtrace-run --info
96+
```
97+
98+
Look for the following message to confirm the setup:
99+
100+
```shell
101+
Agent error: None
102+
```
103+
104+
##### Debugging
105+
106+
If you encounter issues during setup, enable debug logging by passing the `--debug` flag:
107+
108+
```shell
109+
ddtrace-run --debug
110+
```
111+
112+
This displays any errors related to data transmission or instrumentation, including issues with CrewAI traces.
113+
114+
## Data Collected
115+
116+
### Metrics
117+
118+
The CrewAI integration does not include any custom metrics.
119+
120+
### Service Checks
121+
122+
The CrewAI integration does not include any service checks.
123+
124+
### Events
125+
126+
The CrewAI integration does not include any events.
127+
128+
## Troubleshooting
129+
130+
Need help? Contact [Datadog support][6].
131+
132+
[1]: https://docs.crewai.com/introduction
133+
[2]: https://docs.crewai.com/concepts/crews#kicking-off-a-crew
134+
[3]: https://docs.crewai.com/concepts/tasks
135+
[4]: https://docs.crewai.com/concepts/agents
136+
[5]: https://docs.crewai.com/concepts/tools
137+
[6]: https://docs.datadoghq.com/help/

crewai/assets/service_checks.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

crewai/manifest.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"manifest_version": "2.0.0",
3+
"app_uuid": "19af2d5a-74cc-42db-98e4-e49a9e6c1de4",
4+
"app_id": "crewai",
5+
"display_on_public_website": true,
6+
"tile": {
7+
"overview": "README.md#Overview",
8+
"configuration": "README.md#Setup",
9+
"support": "README.md#Support",
10+
"changelog": "CHANGELOG.md",
11+
"description": "Monitor, optimize, and evaluate your LLM applications using CrewAI",
12+
"title": "CrewAI",
13+
"media": [],
14+
"classifier_tags": [
15+
"Category::AI/ML",
16+
"Category::Metrics",
17+
"Submitted Data Type::Traces",
18+
"Supported OS::Linux",
19+
"Supported OS::Windows",
20+
"Supported OS::macOS",
21+
"Offering::Integration"
22+
]
23+
},
24+
"assets": {
25+
"integration": {
26+
"auto_install": false,
27+
"source_type_name": "CrewAI",
28+
"source_type_id": 40374142,
29+
"events": {
30+
"creates_events": false
31+
},
32+
"service_checks": {
33+
"metadata_path": "assets/service_checks.json"
34+
}
35+
}
36+
},
37+
"author": {
38+
"support_email": "help@datadoghq.com",
39+
"name": "Datadog",
40+
"homepage": "https://www.datadoghq.com",
41+
"sales_email": "info@datadoghq.com"
42+
}
43+
}

0 commit comments

Comments
 (0)