Compare commits

..

1 Commits

Author SHA1 Message Date
Devin AI
3bd929b9f3 feat: Add multi-language support for CrewAI prompts
- Add language parameter to I18N class to support multiple languages
- Implement fallback to English for unsupported languages
- Add Spanish (es.json) translation file as example
- Update Agent and Crew classes to accept language parameter
- Add comprehensive tests for multi-language support

Fixes #3780

Co-Authored-By: João <joao@crewai.com>
2025-10-23 03:13:06 +00:00
102 changed files with 407 additions and 2353 deletions

View File

@@ -276,7 +276,6 @@
"en/observability/overview",
"en/observability/arize-phoenix",
"en/observability/braintrust",
"en/observability/datadog",
"en/observability/langdb",
"en/observability/langfuse",
"en/observability/langtrace",
@@ -701,7 +700,6 @@
"pt-BR/observability/overview",
"pt-BR/observability/arize-phoenix",
"pt-BR/observability/braintrust",
"pt-BR/observability/datadog",
"pt-BR/observability/langdb",
"pt-BR/observability/langfuse",
"pt-BR/observability/langtrace",
@@ -1134,7 +1132,6 @@
"ko/observability/overview",
"ko/observability/arize-phoenix",
"ko/observability/braintrust",
"ko/observability/datadog",
"ko/observability/langdb",
"ko/observability/langfuse",
"ko/observability/langtrace",

View File

@@ -33,22 +33,6 @@ Before using the Asana integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Box integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the ClickUp integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the GitHub integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Gmail integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Google Calendar integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Google Contacts integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Google Docs integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Google Drive integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -34,22 +34,6 @@ Before using the Google Sheets integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Google Slides integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the HubSpot integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Jira integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Linear integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Microsoft Excel integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Microsoft OneDrive integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Microsoft Outlook integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Microsoft SharePoint integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Microsoft Teams integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Microsoft Word integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Before using the Notion integration, ensure you have:
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Actions
<AccordionGroup>

View File

@@ -17,38 +17,6 @@ Before using the Salesforce integration, ensure you have:
- A Salesforce account with appropriate permissions
- Connected your Salesforce account through the [Integrations page](https://app.crewai.com/integrations)
## Setting Up Salesforce Integration
### 1. Connect Your Salesforce Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Salesforce** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for CRM and sales management
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Install Required Package
```bash
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Tools
### **Record Management**

View File

@@ -17,38 +17,6 @@ Before using the Shopify integration, ensure you have:
- A Shopify store with appropriate admin permissions
- Connected your Shopify store through the [Integrations page](https://app.crewai.com/integrations)
## Setting Up Shopify Integration
### 1. Connect Your Shopify Store
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Shopify** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for store and product management
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Install Required Package
```bash
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Tools
### **Customer Management**

View File

@@ -17,38 +17,6 @@ Before using the Slack integration, ensure you have:
- A Slack workspace with appropriate permissions
- Connected your Slack workspace through the [Integrations page](https://app.crewai.com/integrations)
## Setting Up Slack Integration
### 1. Connect Your Slack Workspace
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Slack** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for team communication
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Install Required Package
```bash
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Tools
### **User Management**

View File

@@ -17,38 +17,6 @@ Before using the Stripe integration, ensure you have:
- A Stripe account with appropriate API permissions
- Connected your Stripe account through the [Integrations page](https://app.crewai.com/integrations)
## Setting Up Stripe Integration
### 1. Connect Your Stripe Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Stripe** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for payment processing
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Install Required Package
```bash
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Tools
### **Customer Management**

View File

@@ -17,38 +17,6 @@ Before using the Zendesk integration, ensure you have:
- A Zendesk account with appropriate API permissions
- Connected your Zendesk account through the [Integrations page](https://app.crewai.com/integrations)
## Setting Up Zendesk Integration
### 1. Connect Your Zendesk Account
1. Navigate to [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)
2. Find **Zendesk** in the Authentication Integrations section
3. Click **Connect** and complete the OAuth flow
4. Grant the necessary permissions for ticket and user management
5. Copy your Enterprise Token from [Integration Settings](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Install Required Package
```bash
uv add crewai-tools
```
### 3. Environment Variable Setup
<Note>
To use integrations with `Agent(apps=[])`, you must set the `CREWAI_PLATFORM_INTEGRATION_TOKEN` environment variable with your Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
Or add it to your `.env` file:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## Available Tools
### **Ticket Management**

View File

@@ -1,105 +0,0 @@
---
title: Datadog Integration
description: Learn how to integrate Datadog with CrewAI to submit LLM Observability traces to Datadog.
icon: dog
mode: "wide"
---
# Integrate Datadog with CrewAI
This guide will demonstrate how to integrate **[Datadog LLM Observability](https://docs.datadoghq.com/llm_observability/)** with **CrewAI** using [Datadog auto-instrumentation](https://docs.datadoghq.com/llm_observability/instrumentation/auto_instrumentation?tab=python). By the end of this guide, you will be able to submit LLM Observability traces to Datadog and view your CrewAI agent runs in Datadog LLM Observability's [Agentic Execution View](https://docs.datadoghq.com/llm_observability/monitoring/agent_monitoring).
## What is Datadog LLM Observability?
[Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/) helps AI engineers, data scientists, and application developers quickly develop, evaluate, and monitor LLM applications. Confidently improve output quality, performance, costs, and overall risk with structured experiments, end-to-end tracing across AI agents, and evaluations.
## Getting Started
### Install Dependencies
```shell
pip install ddtrace crewai crewai-tools
```
### Set Environment Variables
If you do not have a Datadog API key, you can [create an account](https://www.datadoghq.com/) and [get your API key](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys).
You will also need to specify an ML Application name in the following environment variables. An ML Application is a grouping of LLM Observability traces associated with a specific LLM-based application. See [ML Application Naming Guidelines](https://docs.datadoghq.com/llm_observability/instrumentation/sdk?tab=python#application-naming-guidelines) for more information on limitations with ML Application names.
```shell
export DD_API_KEY=<YOUR_DD_API_KEY>
export DD_SITE=<YOUR_DD_SITE>
export DD_LLMOBS_ENABLED=true
export DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME>
export DD_LLMOBS_AGENTLESS_ENABLED=true
export DD_APM_TRACING_ENABLED=false
```
Additionally, configure any LLM provider API keys
```shell
export OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
export ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>
export GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
...
```
### Create a CrewAI Agent Application
```python
# crewai_agent.py
from crewai import Agent, Task, Crew
from crewai_tools import (
WebsiteSearchTool
)
web_rag_tool = WebsiteSearchTool()
writer = Agent(
role="Writer",
goal="You make math engaging and understandable for young children through poetry",
backstory="You're an expert in writing haikus but you know nothing of math.",
tools=[web_rag_tool],
)
task = Task(
description=("What is {multiplication}?"),
expected_output=("Compose a haiku that includes the answer."),
agent=writer
)
crew = Crew(
agents=[writer],
tasks=[task],
share_crew=False
)
output = crew.kickoff(dict(multiplication="2 * 2"))
```
### Run the Application with Datadog Auto-Instrumentation
With the [environment variables](#set-environment-variables) set, you can now run the application with Datadog auto-instrumentation.
```shell
ddtrace-run python crewai_agent.py
```
### View the Traces in Datadog
After running the application, you can view the traces in [Datadog LLM Observability's Traces View](https://app.datadoghq.com/llm/traces), selecting the ML Application name you chose from the top-left dropdown.
Clicking on a trace will show you the details of the trace, including total tokens used, number of LLM calls, models used, and estimated cost. Clicking into a specific span will narrow down these details, and show related input, output, and metadata.
![Datadog LLM Observability Trace View](/images/datadog-llm-observability-1.png)
Additionally, you can view the execution graph view of the trace, which shows the control and data flow of the trace, which will scale with larger agents to show handoffs and relationships between LLM calls, tool calls, and agent interactions.
![Datadog LLM Observability Agent Execution Flow View](/images/datadog-llm-observability-2.png)
## References
- [Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/)
- [Datadog LLM Observability CrewAI Auto-Instrumentation](https://docs.datadoghq.com/llm_observability/instrumentation/auto_instrumentation?tab=python#crew-ai)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 738 KiB

View File

@@ -33,22 +33,6 @@ Asana 연동을 사용하기 전에 다음을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Box 통합을 사용하기 전에 다음을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 액션
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ ClickUp 통합을 사용하기 전에 다음을 준비해야 합니다:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 동작
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ GitHub 통합을 사용하기 전에 다음을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Gmail 통합을 사용하기 전에 다음을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Google Calendar 통합을 사용하기 전에 다음을 준비해야 합니다:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Google Contacts 통합을 사용하기 전에 다음 사항을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Google Docs 통합을 사용하기 전에 다음 사항을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -17,38 +17,6 @@ Google Drive 통합을 사용하기 전에 다음 사항을 확인하세요:
- Google Drive 액세스 권한이 있는 Google 계정
- [통합 페이지](https://app.crewai.com/crewai_plus/connectors)를 통해 Google 계정 연결
## Google Drive 통합 설정
### 1. Google 계정 연결
1. [CrewAI AMP 통합](https://app.crewai.com/crewai_plus/connectors)으로 이동합니다.
2. 인증 통합 섹션에서 **Google Drive**를 찾습니다.
3. **연결**을 클릭하고 OAuth 과정을 완료합니다.
4. 파일 및 폴더 관리에 필요한 권한을 부여합니다.
5. [통합 설정](https://app.crewai.com/crewai_plus/settings/integrations)에서 Enterprise Token을 복사합니다.
### 2. 필수 패키지 설치
```bash
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
자세한 매개변수 및 사용법은 [영어 문서](../../../en/enterprise/integrations/google_drive)를 참조하세요.

View File

@@ -34,22 +34,6 @@ Google Sheets 통합을 사용하기 전에 다음을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Google Slides 통합을 사용하기 전에 다음 사항을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ HubSpot 통합을 사용하기 전에 다음을 확인하세요.
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 액션
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Jira 통합을 사용하기 전에 다음을 준비하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Linear 통합을 사용하기 전에 다음을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Microsoft Excel 통합을 사용하기 전에 다음 사항을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Microsoft OneDrive 통합을 사용하기 전에 다음 사항을 확인하세
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Microsoft Outlook 통합을 사용하기 전에 다음 사항을 확인하세요
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Microsoft SharePoint 통합을 사용하기 전에 다음 사항을 확인하세
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Microsoft Teams 통합을 사용하기 전에 다음 사항을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Microsoft Word 통합을 사용하기 전에 다음 사항을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Notion 통합을 사용하기 전에 다음을 확인하세요:
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 액션
<AccordionGroup>

View File

@@ -17,38 +17,6 @@ Salesforce 통합을 사용하기 전에 다음을 확인하세요:
- 적절한 권한이 있는 Salesforce 계정
- [통합 페이지](https://app.crewai.com/integrations)를 통해 Salesforce 계정 연결
## Salesforce 통합 설정
### 1. Salesforce 계정 연결
1. [CrewAI AMP 통합](https://app.crewai.com/crewai_plus/connectors)으로 이동합니다.
2. 인증 통합 섹션에서 **Salesforce**를 찾습니다.
3. **연결**을 클릭하고 OAuth 과정을 완료합니다.
4. CRM 및 영업 관리에 필요한 권한을 부여합니다.
5. [통합 설정](https://app.crewai.com/crewai_plus/settings/integrations)에서 Enterprise Token을 복사합니다.
### 2. 필수 패키지 설치
```bash
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 도구
### **레코드 관리**

View File

@@ -17,38 +17,6 @@ Shopify 연동을 사용하기 전에 다음을 확인하세요:
- 적절한 관리자 권한이 있는 Shopify 스토어
- [통합 페이지](https://app.crewai.com/integrations)를 통해 Shopify 스토어 연결
## Shopify 통합 설정
### 1. Shopify 스토어 연결
1. [CrewAI AMP 통합](https://app.crewai.com/crewai_plus/connectors)으로 이동합니다.
2. 인증 통합 섹션에서 **Shopify**를 찾습니다.
3. **연결**을 클릭하고 OAuth 과정을 완료합니다.
4. 스토어 및 제품 관리에 필요한 권한을 부여합니다.
5. [통합 설정](https://app.crewai.com/crewai_plus/settings/integrations)에서 Enterprise Token을 복사합니다.
### 2. 필수 패키지 설치
```bash
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 도구
### **고객 관리**

View File

@@ -17,38 +17,6 @@ Slack 통합을 사용하기 전에 다음을 확인하십시오:
- 적절한 권한이 있는 Slack 워크스페이스
- [통합 페이지](https://app.crewai.com/integrations)를 통해 Slack 워크스페이스를 연결함
## Slack 통합 설정
### 1. Slack 워크스페이스 연결
1. [CrewAI AMP 통합](https://app.crewai.com/crewai_plus/connectors)으로 이동합니다.
2. 인증 통합 섹션에서 **Slack**을 찾습니다.
3. **연결**을 클릭하고 OAuth 과정을 완료합니다.
4. 팀 커뮤니케이션에 필요한 권한을 부여합니다.
5. [통합 설정](https://app.crewai.com/crewai_plus/settings/integrations)에서 Enterprise Token을 복사합니다.
### 2. 필수 패키지 설치
```bash
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 도구
### **사용자 관리**

View File

@@ -17,38 +17,6 @@ Stripe 통합을 사용하기 전에 다음 사항을 확인하세요:
- 적절한 API 권한이 있는 Stripe 계정
- [통합 페이지](https://app.crewai.com/integrations)를 통해 Stripe 계정 연결
## Stripe 통합 설정
### 1. Stripe 계정 연결
1. [CrewAI AMP 통합](https://app.crewai.com/crewai_plus/connectors)으로 이동합니다.
2. 인증 통합 섹션에서 **Stripe**를 찾습니다.
3. **연결**을 클릭하고 OAuth 과정을 완료합니다.
4. 결제 처리에 필요한 권한을 부여합니다.
5. [통합 설정](https://app.crewai.com/crewai_plus/settings/integrations)에서 Enterprise Token을 복사합니다.
### 2. 필수 패키지 설치
```bash
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 도구
### **고객 관리**

View File

@@ -17,38 +17,6 @@ Zendesk 통합을 사용하기 전에 다음을 확인하세요.
- 적절한 API 권한이 있는 Zendesk 계정
- [통합 페이지](https://app.crewai.com/integrations)를 통해 Zendesk 계정 연결
## Zendesk 통합 설정
### 1. Zendesk 계정 연결
1. [CrewAI AMP 통합](https://app.crewai.com/crewai_plus/connectors)으로 이동합니다.
2. 인증 통합 섹션에서 **Zendesk**를 찾습니다.
3. **연결**을 클릭하고 OAuth 과정을 완료합니다.
4. 티켓 및 사용자 관리에 필요한 권한을 부여합니다.
5. [통합 설정](https://app.crewai.com/crewai_plus/settings/integrations)에서 Enterprise Token을 복사합니다.
### 2. 필수 패키지 설치
```bash
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로 `CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 도구
### **티켓 관리**

View File

@@ -1,105 +0,0 @@
---
title: Datadog 통합
description: Datadog을 CrewAI와 통합하여 LLM Observability 트레이스들을 Datadog에 제출하는 방법을 알아보세요.
icon: dog
mode: "wide"
---
# Datadog을 CrewAI와 통합하기
이 가이드에서는 Datadog 자동 계측을 사용하여 **Datadog**을 **CrewAI**와 통합하는 방법을 보여드립니다. 이 가이드가 끝나면 LLM Observability 트레이스를 Datadog에 제출하고 CrewAI 에이전트 실행을 Datadog LLM Observability의 에이전트 실행 보기에서 볼 수 있게 됩니다.
## Datadog LLM Observability란 무엇인가요?
[Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/)는 AI 엔지니어, 데이터 과학자, 애플리케이션 개발자가 LLM 애플리케이션을 신속하게 개발, 평가, 모니터링할 수 있도록 도와줍니다. 구조화된 실험, AI 에이전트 전반의 엔드투엔드 추적, 평가를 통해 결과물 품질, 성능, 비용, 전반적인 위험을 확실하게 개선할 수 있습니다.
## 시작하기
### 설치 종속성
```shell
pip install ddtrace crewai crewai-tools
```
### 환경 변수 설정하기
Datadog API 키가 없는 경우, [계정 만들기](https://www.datadoghq.com/) 및 [API 키 받기](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys)를 할 수 있습니다.
또한 다음 환경 변수에 ML 애플리케이션 이름을 지정해야 합니다. ML 애플리케이션은 특정 LLM 기반 애플리케이션과 관련된 LLM Observability 트레이스의 그룹입니다. ML 애플리케이션 이름 제한에 대한 자세한 내용은 [ML 애플리케이션 이름 지정 가이드라인](https://docs.datadoghq.com/llm_observability/instrumentation/sdk?tab=python#application-naming-guidelines)을 참조하세요.
```shell
export DD_API_KEY=<YOUR_DD_API_KEY>
export DD_SITE=<YOUR_DD_SITE>
export DD_LLMOBS_ENABLED=true
export DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME>
export DD_LLMOBS_AGENTLESS_ENABLED=true
export DD_APM_TRACING_ENABLED=false
```
또한 LLM 공급자 API 키를 설정합니다.
```shell
export OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
export ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>
export GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
...
```
### 크루AI 에이전트 애플리케이션 생성하기
```python
# crewai_agent.py
from crewai import Agent, Task, Crew
from crewai_tools import (
WebsiteSearchTool
)
web_rag_tool = WebsiteSearchTool()
writer = Agent(
role="작가",
goal="시를 통해 어린이들이 수학을 흥미롭고 이해하기 쉽게 설명합니다",
backstory="당신은 하이쿠를 쓰는 전문가이지만 수학은 전혀 모릅니다.",
tools=[web_rag_tool],
)
task = Task(
description=("{곱셈}이란 무엇인가요?"),
expected_output=("답을 포함하는 하이쿠를 작성하세요."),
agent=writer
)
crew = Crew(
agents=[writer],
tasks=[task],
share_crew=False
)
output = crew.kickoff(dict(곱셈="2 * 2"))
```
### Datadog 자동 계측을 사용하여 애플리케이션 실행하기
[환경 변수](#환경-변수-설정하기)를 설정하면 이제 Datadog 자동 계측을 통해 애플리케이션을 실행할 수 있습니다.
```shell
ddtrace-run python crewai_agent.py
```
### Datadog에서 트레이스 추적하기
애플리케이션을 실행한 후 왼쪽 상단 드롭다운에서 선택한 ML 애플리케이션 이름을 선택하면 [Datadog LLM Observability의 트레이스 보기](https://app.datadoghq.com/llm/traces)에서 트레이스들을 확인할 수 있습니다.
트레이스를 클릭하면 사용된 총 토큰, LLM 호출 수, 사용된 모델, 예상 비용 등 트레이스에 대한 세부 정보가 표시됩니다. 특정 스팬(span)을 클릭하면 이러한 세부 정보의 범위가 좁혀지고 관련 입력, 출력 및 메타데이터가 표시됩니다.
![Datadog LLM 옵저버빌리티 추적 보기](/images/datadog-llm-observability-1.png)
또한, 트레이스의 제어 및 데이터 흐름을 보여주는 트레이스의 실행 그래프 보기를 볼 수 있으며, 이는 더 큰 에이전트로 확장하여 LLM 호출, 도구 호출 및 에이전트 상호 작용 간의 핸드오프와 관계를 보여줍니다.
![Datadog LLM Observability 에이전트 실행 흐름 보기](/images/datadog-llm-observability-2.png)
## 참조
- [Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/)
- [Datadog LLM 옵저버빌리티 크루AI 자동 계측](https://docs.datadoghq.com/llm_observability/instrumentation/auto_instrumentation?tab=python#crew-ai)

View File

@@ -33,22 +33,6 @@ Antes de usar a integração com o Asana, assegure-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de utilizar a integração com o ClickUp, certifique-se de que você possu
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração com o Gmail, certifique-se de que você possui:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração com o Google Calendar, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Google Contacts, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Google Docs, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Google Drive, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
Para informações detalhadas sobre parâmetros e uso, consulte a [documentação em inglês](../../../en/enterprise/integrations/google_drive).

View File

@@ -34,22 +34,6 @@ Antes de utilizar a integração com o Google Sheets, certifique-se de que você
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Google Slides, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de utilizar a integração com o HubSpot, certifique-se de que você possu
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de utilizar a integração com o Linear, certifique-se de que você possui
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Microsoft Excel, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Microsoft OneDrive, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Microsoft Outlook, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Microsoft SharePoint, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Microsoft Teams, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração Microsoft Word, certifique-se de ter:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -33,22 +33,6 @@ Antes de usar a integração com o Notion, certifique-se de que você tem:
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ações Disponíveis
<AccordionGroup>

View File

@@ -17,38 +17,6 @@ Antes de usar a integração Salesforce, certifique-se de que você possui:
- Uma conta Salesforce com permissões apropriadas
- Sua conta Salesforce conectada via a [página de Integrações](https://app.crewai.com/integrations)
## Configurando a Integração Salesforce
### 1. Conecte sua Conta Salesforce
1. Acesse [CrewAI AMP Integrações](https://app.crewai.com/crewai_plus/connectors)
2. Encontre **Salesforce** na seção Integrações de Autenticação
3. Clique em **Conectar** e complete o fluxo OAuth
4. Conceda as permissões necessárias para gerenciamento de CRM e vendas
5. Copie seu Token Enterprise em [Configurações de Integração](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Instale o Pacote Necessário
```bash
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ferramentas Disponíveis
### **Gerenciamento de Registros**

View File

@@ -17,38 +17,6 @@ Antes de utilizar a integração com o Shopify, certifique-se de que você possu
- Uma loja Shopify com permissões administrativas adequadas
- Sua loja Shopify conectada através da [página de Integrações](https://app.crewai.com/integrations)
## Configurando a Integração Shopify
### 1. Conecte sua Loja Shopify
1. Acesse [CrewAI AMP Integrações](https://app.crewai.com/crewai_plus/connectors)
2. Encontre **Shopify** na seção Integrações de Autenticação
3. Clique em **Conectar** e complete o fluxo OAuth
4. Conceda as permissões necessárias para gerenciamento de loja e produtos
5. Copie seu Token Enterprise em [Configurações de Integração](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Instale o Pacote Necessário
```bash
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ferramentas Disponíveis
### **Gerenciamento de Clientes**

View File

@@ -17,38 +17,6 @@ Antes de usar a integração com o Slack, certifique-se de que você tenha:
- Um workspace do Slack com permissões apropriadas
- Seu workspace do Slack conectado por meio da [página de Integrações](https://app.crewai.com/integrations)
## Configurando a Integração Slack
### 1. Conecte seu Workspace do Slack
1. Acesse [CrewAI AMP Integrações](https://app.crewai.com/crewai_plus/connectors)
2. Encontre **Slack** na seção Integrações de Autenticação
3. Clique em **Conectar** e complete o fluxo OAuth
4. Conceda as permissões necessárias para comunicação em equipe
5. Copie seu Token Enterprise em [Configurações de Integração](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Instale o Pacote Necessário
```bash
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ferramentas Disponíveis
### **Gerenciamento de Usuários**

View File

@@ -17,38 +17,6 @@ Antes de usar a integração com o Stripe, certifique-se de que você tem:
- Uma conta Stripe com permissões apropriadas de API
- Sua conta Stripe conectada através da [página de Integrações](https://app.crewai.com/integrations)
## Configurando a Integração Stripe
### 1. Conecte sua Conta Stripe
1. Acesse [CrewAI AMP Integrações](https://app.crewai.com/crewai_plus/connectors)
2. Encontre **Stripe** na seção Integrações de Autenticação
3. Clique em **Conectar** e complete o fluxo OAuth
4. Conceda as permissões necessárias para processamento de pagamentos
5. Copie seu Token Enterprise em [Configurações de Integração](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Instale o Pacote Necessário
```bash
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ferramentas Disponíveis
### **Gerenciamento de Clientes**

View File

@@ -17,38 +17,6 @@ Antes de usar a integração com o Zendesk, certifique-se de que você possui:
- Uma conta Zendesk com permissões apropriadas de API
- Sua conta Zendesk conectada através da [página de Integrações](https://app.crewai.com/integrations)
## Configurando a Integração Zendesk
### 1. Conecte sua Conta Zendesk
1. Acesse [CrewAI AMP Integrações](https://app.crewai.com/crewai_plus/connectors)
2. Encontre **Zendesk** na seção Integrações de Autenticação
3. Clique em **Conectar** e complete o fluxo OAuth
4. Conceda as permissões necessárias para gerenciamento de tickets e usuários
5. Copie seu Token Enterprise em [Configurações de Integração](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. Instale o Pacote Necessário
```bash
uv add crewai-tools
```
### 3. Configuração de variável de ambiente
<Note>
Para usar integrações com `Agent(apps=[])`, você deve definir a variável de ambiente `CREWAI_PLATFORM_INTEGRATION_TOKEN` com seu Enterprise Token.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="seu_enterprise_token"
```
Ou adicione ao seu arquivo `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=seu_enterprise_token
```
## Ferramentas Disponíveis
### **Gerenciamento de Tickets**

View File

@@ -1,105 +0,0 @@
---
title: Integração Datadog
description: Saiba como integrar o Datadog com o CrewAI para enviar os rastros de observabilidade do LLM para o Datadog.
icon: dog
mode: "wide"
---
# Integrar o Datadog com a CrewAI
Este guia demonstrará como integrar o **Datadog** com o **CrewAI** usando a instrumentação automática do Datadog. Ao final deste guia, você poderá enviar rastreamentos do LLM Observability para o Datadog e visualizar as execuções do agente CrewAI no Agentic Execution View do Datadog LLM Observability.
## O que é o Datadog LLM Observability?
O [Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/) ajuda os engenheiros de IA, cientistas de dados e desenvolvedores de aplicativos a desenvolver, avaliar e monitorar rapidamente os aplicativos LLM. Melhore com confiança a qualidade dos resultados, o desempenho, os custos e o risco geral com experimentos estruturados, rastreamento de ponta a ponta em agentes de IA e avaliações.
## Primeiros passos
### Instalar dependências
```shell
pip install ddtrace crewai crewai-tools
```
### Definir variáveis de ambiente
Se você não tiver uma chave de API da Datadog, poderá [criar uma conta](https://www.datadoghq.com/) e [obter sua chave de API](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys).
Você também precisará especificar um nome de aplicativo de ML nas seguintes variáveis de ambiente. Um aplicativo de ML é um agrupamento de rastros de observabilidade do LLM associados a um aplicativo específico baseado em LLM. Consulte [ML Application Naming Guidelines](https://docs.datadoghq.com/llm_observability/instrumentation/sdk?tab=python#application-naming-guidelines) para obter mais informações sobre as limitações dos nomes de aplicativos do ML.
```shell
export DD_API_KEY=<SUA_API_KEY>
export DD_SITE=<Seu_DD_SITE>
export DD_LLMOBS_ENABLED=true
export DD_LLMOBS_ML_APP=<YOUR_ML_APP_NAME>
export DD_LLMOBS_AGENTLESS_ENABLED=true
export DD_APM_TRACING_ENABLED=false
```
Além disso, configure todas as chaves de API do provedor LLM
```shell
export OPENAI_API_KEY=<SUA_OPENAI_API_KEY>
export ANTHROPIC_API_KEY=<YOUR_ANTHROPIC_API_KEY>
export GEMINI_API_KEY=<YOUR_GEMINI_API_KEY>
...
```
### Criar um aplicativo agente CrewAI
```python
# crewai_agent.py
from crewai import Agent, Task, Crew
from crewai_tools import (
WebsiteSearchTool
)
web_rag_tool = WebsiteSearchTool()
writer = Agent(
role="Writer",
goal="Você torna a matemática envolvente e compreensível para crianças pequenas por meio da poesia",
backstory="Você é um especialista em escrever haikus, mas não sabe nada de matemática",
tools=[web_rag_tool],
)
task = Task(
description=("O que é {multiplicação}?"),
expected_output=("Componha um haicai que inclua a resposta."),
agent=writer
)
crew = Crew(
agents=[writer],
tasks=[task],
share_crew=False
)
output = crew.kickoff(dict(multiplicação="2 * 2"))
```
### Executar o aplicativo com a instrumentação automática do Datadog
Com as [variáveis de ambiente](#definir-variáveis-de-ambiente) definidas, agora você pode executar o aplicativo com a instrumentação automática do Datadog.
```shell
ddtrace-run python crewai_agent.py
```
### Visualizar os rastros no Datadog
Depois de executar o aplicativo, você pode visualizar os traços na [Datadog LLM Observability's Traces View](https://app.datadoghq.com/llm/traces), selecionando o nome do aplicativo de ML que você escolheu no menu suspenso superior esquerdo.
Ao clicar em um rastreamento, você verá os detalhes do rastreamento, incluindo o total de tokens usados, o número de chamadas LLM, os modelos usados e o custo estimado. Clicar em um intervalo específico reduzirá esses detalhes e mostrará a entrada, a saída e os metadados relacionados.
![Visualização do rastreamento de observabilidade do Datadog LLM](/images/datadog-llm-observability-1.png)
Além disso, você pode visualizar a visualização do gráfico de execução do rastreamento, que mostra o controle e o fluxo de dados do rastreamento, que será dimensionado com agentes maiores para mostrar transferências e relacionamentos entre chamadas LLM, chamadas de ferramentas e interações de agentes.
![Visualização do fluxo de execução do agente de observabilidade do Datadog LLM](/images/datadog-llm-observability-2.png)
## Referências
- [Datadog LLM Observability](https://www.datadoghq.com/product/llm-observability/)
- [Datadog LLM Observability CrewAI Auto-Instrumentation](https://docs.datadoghq.com/llm_observability/instrumentation/auto_instrumentation?tab=python#crew-ai)

View File

@@ -12,7 +12,7 @@ dependencies = [
"pytube>=15.0.0",
"requests>=2.32.5",
"docker>=7.1.0",
"crewai==1.2.1",
"crewai==1.1.0",
"lancedb>=0.5.4",
"tiktoken>=0.8.0",
"beautifulsoup4>=4.13.4",

View File

@@ -287,4 +287,4 @@ __all__ = [
"ZapierActionTools",
]
__version__ = "1.2.1"
__version__ = "1.1.0"

View File

@@ -49,7 +49,7 @@ Repository = "https://github.com/crewAIInc/crewAI"
[project.optional-dependencies]
tools = [
"crewai-tools==1.2.1",
"crewai-tools==1.1.0",
]
embeddings = [
"tiktoken~=0.8.0"

View File

@@ -40,7 +40,7 @@ def _suppress_pydantic_deprecation_warnings() -> None:
_suppress_pydantic_deprecation_warnings()
__version__ = "1.2.1"
__version__ = "1.1.0"
_telemetry_submitted = False

View File

@@ -1186,15 +1186,6 @@ class Agent(BaseAgent):
Returns:
LiteAgentOutput: The result of the agent execution.
"""
if self.apps:
platform_tools = self.get_platform_tools(self.apps)
if platform_tools:
self.tools.extend(platform_tools)
if self.mcps:
mcps = self.get_mcp_tools(self.mcps)
if mcps:
self.tools.extend(mcps)
lite_agent = LiteAgent(
id=self.id,
role=self.role,

View File

@@ -148,6 +148,10 @@ class BaseAgent(BaseModel, ABC):
default=None, description="Language model that will run the agent."
)
crew: Any = Field(default=None, description="Crew to which the agent belongs.")
language: str | None = Field(
default=None,
description="Language code for the agent's prompts (e.g., 'en', 'es', 'pt'). If not set, defaults to 'en'.",
)
i18n: I18N = Field(
default_factory=I18N, description="Internationalization settings."
)
@@ -289,6 +293,10 @@ class BaseAgent(BaseModel, ABC):
if self.security_config is None:
self.security_config = SecurityConfig()
# Initialize i18n with language if provided
if self.language:
self.i18n = I18N(language=self.language)
return self
@field_validator("id", mode="before")

View File

@@ -322,7 +322,7 @@ MODELS = {
],
}
DEFAULT_LLM_MODEL = "gpt-4.1-mini"
DEFAULT_LLM_MODEL = "gpt-4o-mini"
JSON_URL = "https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json"

View File

@@ -5,7 +5,7 @@ description = "{{name}} using crewAI"
authors = [{ name = "Your Name", email = "you@example.com" }]
requires-python = ">=3.10,<3.14"
dependencies = [
"crewai[tools]==1.2.1"
"crewai[tools]==1.1.0"
]
[project.scripts]

View File

@@ -5,7 +5,7 @@ description = "{{name}} using crewAI"
authors = [{ name = "Your Name", email = "you@example.com" }]
requires-python = ">=3.10,<3.14"
dependencies = [
"crewai[tools]==1.2.1"
"crewai[tools]==1.1.0"
]
[project.scripts]

View File

@@ -233,6 +233,10 @@ class Crew(FlowTrackable, BaseModel):
default=None,
description="Path to the prompt json file to be used for the crew.",
)
language: str | None = Field(
default=None,
description="Language code for the crew's prompts (e.g., 'en', 'es', 'pt'). If not set, defaults to 'en'.",
)
output_log_file: bool | str | None = Field(
default=None,
description="Path to the log file to be saved",
@@ -684,7 +688,10 @@ class Crew(FlowTrackable, BaseModel):
self._set_tasks_callbacks()
self._set_allow_crewai_trigger_context_for_first_task()
i18n = I18N(prompt_file=self.prompt_file)
i18n = I18N(
prompt_file=self.prompt_file,
language=self.language if self.language else "en",
)
for agent in self.agents:
agent.i18n = i18n
@@ -826,7 +833,10 @@ class Crew(FlowTrackable, BaseModel):
return self._execute_tasks(self.tasks)
def _create_manager_agent(self):
i18n = I18N(prompt_file=self.prompt_file)
i18n = I18N(
prompt_file=self.prompt_file,
language=self.language if self.language else "en",
)
if self.manager_agent is not None:
self.manager_agent.allow_delegation = True
manager = self.manager_agent

View File

@@ -0,0 +1,61 @@
{
"hierarchical_manager_agent": {
"role": "Gerente del Equipo",
"goal": "Gestionar el equipo para completar la tarea de la mejor manera posible.",
"backstory": "Eres un gerente experimentado con talento para sacar lo mejor de tu equipo.\nTambién eres conocido por tu habilidad para delegar trabajo a las personas adecuadas y hacer las preguntas correctas para obtener lo mejor de tu equipo.\nAunque no realizas tareas por ti mismo, tienes mucha experiencia en el campo, lo que te permite evaluar adecuadamente el trabajo de los miembros de tu equipo."
},
"slices": {
"observation": "\nObservación:",
"task": "\nTarea Actual: {input}\n\n¡Comienza! Esto es MUY importante para ti, usa las herramientas disponibles y da tu mejor Respuesta Final, ¡tu trabajo depende de ello!\n\nPensamiento:",
"memory": "\n\n# Contexto útil: \n{memory}",
"role_playing": "Eres {role}. {backstory}\nTu objetivo personal es: {goal}",
"tools": "\nSOLO tienes acceso a las siguientes herramientas, y NUNCA debes inventar herramientas que no estén listadas aquí:\n\n{tools}\n\nIMPORTANTE: Usa el siguiente formato en tu respuesta:\n\n```\nPensamiento: siempre debes pensar en qué hacer\nAcción: la acción a tomar, solo un nombre de [{tool_names}], solo el nombre, exactamente como está escrito.\nEntrada de Acción: la entrada para la acción, solo un objeto JSON simple, encerrado entre llaves, usando \" para envolver claves y valores.\nObservación: el resultado de la acción\n```\n\nUna vez que se recopile toda la información necesaria, devuelve el siguiente formato:\n\n```\nPensamiento: Ahora conozco la respuesta final\nRespuesta Final: la respuesta final a la pregunta de entrada original\n```",
"no_tools": "\nPara dar mi mejor respuesta final completa a la tarea, responde usando exactamente el siguiente formato:\n\nPensamiento: Ahora puedo dar una gran respuesta\nRespuesta Final: Tu respuesta final debe ser lo más completa posible, debe describir el resultado.\n\n¡DEBO usar estos formatos, mi trabajo depende de ello!",
"format": "DEBO usar una herramienta (usar una a la vez) O dar mi mejor respuesta final, no ambas al mismo tiempo. Al responder, debo usar el siguiente formato:\n\n```\nPensamiento: siempre debes pensar en qué hacer\nAcción: la acción a tomar, debe ser una de [{tool_names}]\nEntrada de Acción: la entrada para la acción, diccionario encerrado entre llaves\nObservación: el resultado de la acción\n```\nEste proceso de Pensamiento/Acción/Entrada de Acción/Resultado puede repetirse N veces. Una vez que conozca la respuesta final, debo devolver el siguiente formato:\n\n```\nPensamiento: Ahora puedo dar una gran respuesta\nRespuesta Final: Tu respuesta final debe ser lo más completa posible, debe describir el resultado\n\n```",
"final_answer_format": "Si no necesitas usar más herramientas, debes dar tu mejor respuesta final completa, asegúrate de que satisfaga los criterios esperados, usa el formato EXACTO a continuación:\n\n```\nPensamiento: Ahora puedo dar una gran respuesta\nRespuesta Final: mi mejor respuesta final completa a la tarea.\n\n```",
"format_without_tools": "\nLo siento, no usé el formato correcto. DEBO usar una herramienta (entre las disponibles), O dar mi mejor respuesta final.\nAquí está el formato esperado que debo seguir:\n\n```\nPregunta: la pregunta de entrada que debes responder\nPensamiento: siempre debes pensar en qué hacer\nAcción: la acción a tomar, debe ser una de [{tool_names}]\nEntrada de Acción: la entrada para la acción\nObservación: el resultado de la acción\n```\n Este proceso de Pensamiento/Acción/Entrada de Acción/Resultado puede repetirse N veces. Una vez que conozca la respuesta final, debo devolver el siguiente formato:\n\n```\nPensamiento: Ahora puedo dar una gran respuesta\nRespuesta Final: Tu respuesta final debe ser lo más completa posible, debe describir el resultado\n\n```",
"task_with_context": "{task}\n\nEste es el contexto con el que estás trabajando:\n{context}",
"expected_output": "\nEste es el criterio esperado para tu respuesta final: {expected_output}\nDEBES devolver el contenido completo real como respuesta final, no un resumen.",
"human_feedback": "Recibiste retroalimentación humana sobre tu trabajo, reevalúalo y da una nueva Respuesta Final cuando estés listo.\n {human_feedback}",
"getting_input": "Esta es la respuesta final del agente: {final_answer}\n\n",
"summarizer_system_message": "Eres un asistente útil que resume texto.",
"summarize_instruction": "Resume el siguiente texto, asegúrate de incluir toda la información importante: {group}",
"summary": "Este es un resumen de nuestra conversación hasta ahora:\n{merged_summary}",
"manager_request": "Tu mejor respuesta a tu compañero de trabajo que te pregunta esto, teniendo en cuenta el contexto compartido.",
"formatted_task_instructions": "Asegúrate de que tu respuesta final contenga solo el contenido en el siguiente formato: {output_format}\n\nAsegúrate de que la salida final no incluya marcadores de bloque de código como ```json o ```python.",
"conversation_history_instruction": "Eres miembro de un equipo que colabora para lograr un objetivo común. Tu tarea es una acción específica que contribuye a este objetivo más amplio. Para contexto adicional, revisa el historial de conversación entre tú y el usuario que llevó a la iniciación de este equipo. Usa cualquier información o retroalimentación relevante de la conversación para informar la ejecución de tu tarea y asegúrate de que tu respuesta se alinee tanto con la tarea inmediata como con los objetivos generales del equipo.",
"feedback_instructions": "Retroalimentación del usuario: {feedback}\nInstrucciones: Usa esta retroalimentación para mejorar la próxima iteración de salida.\nNota: No respondas ni agregues comentarios.",
"lite_agent_system_prompt_with_tools": "Eres {role}. {backstory}\nTu objetivo personal es: {goal}\n\nSOLO tienes acceso a las siguientes herramientas, y NUNCA debes inventar herramientas que no estén listadas aquí:\n\n{tools}\n\nIMPORTANTE: Usa el siguiente formato en tu respuesta:\n\n```\nPensamiento: siempre debes pensar en qué hacer\nAcción: la acción a tomar, solo un nombre de [{tool_names}], solo el nombre, exactamente como está escrito.\nEntrada de Acción: la entrada para la acción, solo un objeto JSON simple, encerrado entre llaves, usando \" para envolver claves y valores.\nObservación: el resultado de la acción\n```\n\nUna vez que se recopile toda la información necesaria, devuelve el siguiente formato:\n\n```\nPensamiento: Ahora conozco la respuesta final\nRespuesta Final: la respuesta final a la pregunta de entrada original\n```",
"lite_agent_system_prompt_without_tools": "Eres {role}. {backstory}\nTu objetivo personal es: {goal}\n\nPara dar mi mejor respuesta final completa a la tarea, responde usando exactamente el siguiente formato:\n\nPensamiento: Ahora puedo dar una gran respuesta\nRespuesta Final: Tu respuesta final debe ser lo más completa posible, debe describir el resultado.\n\n¡DEBO usar estos formatos, mi trabajo depende de ello!",
"lite_agent_response_format": "\nIMPORTANTE: Tu respuesta final DEBE contener toda la información solicitada en el siguiente formato: {response_format}\n\nIMPORTANTE: Asegúrate de que la salida final no incluya marcadores de bloque de código como ```json o ```python.",
"knowledge_search_query": "La consulta original es: {task_prompt}.",
"knowledge_search_query_system_prompt": "Tu objetivo es reescribir la consulta del usuario para que esté optimizada para la recuperación de una base de datos vectorial. Considera cómo se utilizará la consulta para encontrar documentos relevantes y trata de hacerla más específica y consciente del contexto. \n\n No incluyas ningún otro texto que no sea la consulta reescrita, especialmente ningún preámbulo o postámbulo y solo agrega el formato de salida esperado si es relevante para la consulta reescrita. \n\n Concéntrate en las palabras clave de la tarea prevista y en recuperar la información más relevante. \n\n Habrá algún contexto adicional proporcionado que podría necesitar ser eliminado, como formatos de salida esperados, salidas estructuradas y otras instrucciones."
},
"errors": {
"force_final_answer_error": "No puedes continuar, aquí está la mejor respuesta final que generaste:\n\n {formatted_answer}",
"force_final_answer": "Ahora es el momento de que DEBES dar tu mejor respuesta final absoluta. Ignorarás todas las instrucciones anteriores, dejarás de usar cualquier herramienta y simplemente devolverás tu MEJOR respuesta final absoluta.",
"agent_tool_unexisting_coworker": "\nError al ejecutar la herramienta. El compañero de trabajo mencionado no se encontró, debe ser una de las siguientes opciones:\n{coworkers}\n",
"task_repeated_usage": "Intenté reutilizar la misma entrada, debo dejar de usar esta entrada de acción. Intentaré algo más en su lugar.\n\n",
"tool_usage_error": "Encontré un error: {error}",
"tool_arguments_error": "Error: la Entrada de Acción no es un diccionario válido de clave, valor.",
"wrong_tool_name": "Intentaste usar la herramienta {tool}, pero no existe. Debes usar una de las siguientes herramientas, usa una a la vez: {tools}.",
"tool_usage_exception": "Encontré un error al intentar usar la herramienta. Este fue el error: {error}.\n La herramienta {tool} acepta estas entradas: {tool_inputs}",
"agent_tool_execution_error": "Error al ejecutar la tarea con el agente '{agent_role}'. Error: {error}",
"validation_error": "### El intento anterior falló la validación: {guardrail_result_error}\n\n\n### Resultado anterior:\n{task_output}\n\n\nIntenta de nuevo, asegurándote de abordar el error de validación."
},
"tools": {
"delegate_work": "Delega una tarea específica a uno de los siguientes compañeros de trabajo: {coworkers}\nLa entrada para esta herramienta debe ser el compañero de trabajo, la tarea que quieres que hagan y TODO el contexto necesario para ejecutar la tarea, ellos no saben nada sobre la tarea, así que comparte absolutamente todo lo que sabes, no hagas referencia a cosas sino explícalas.",
"ask_question": "Haz una pregunta específica a uno de los siguientes compañeros de trabajo: {coworkers}\nLa entrada para esta herramienta debe ser el compañero de trabajo, la pregunta que tienes para ellos y TODO el contexto necesario para hacer la pregunta correctamente, ellos no saben nada sobre la pregunta, así que comparte absolutamente todo lo que sabes, no hagas referencia a cosas sino explícalas.",
"add_image": {
"name": "Agregar imagen al contenido",
"description": "Ver imagen para entender su contenido, opcionalmente puedes hacer una pregunta sobre la imagen",
"default_action": "Por favor proporciona una descripción detallada de esta imagen, incluyendo todos los elementos visuales, contexto y cualquier detalle notable que puedas observar."
}
},
"reasoning": {
"initial_plan": "Eres {role}, un profesional con el siguiente trasfondo: {backstory}\n\nTu objetivo principal es: {goal}\n\nComo {role}, estás creando un plan estratégico para una tarea que requiere tu experiencia y perspectiva única.",
"refine_plan": "Eres {role}, un profesional con el siguiente trasfondo: {backstory}\n\nTu objetivo principal es: {goal}\n\nComo {role}, estás refinando un plan estratégico para una tarea que requiere tu experiencia y perspectiva única.",
"create_plan_prompt": "Eres {role} con este trasfondo: {backstory}\n\nTu objetivo principal es: {goal}\n\nSe te ha asignado la siguiente tarea:\n{description}\n\nSalida esperada:\n{expected_output}\n\nHerramientas disponibles: {tools}\n\nAntes de ejecutar esta tarea, crea un plan detallado que aproveche tu experiencia como {role} y describa:\n1. Tu comprensión de la tarea desde tu perspectiva profesional\n2. Los pasos clave que tomarás para completarla, basándote en tu trasfondo y habilidades\n3. Cómo abordarás cualquier desafío que pueda surgir, considerando tu experiencia\n4. Cómo usarás estratégicamente las herramientas disponibles según tu experiencia, exactamente qué herramientas usar y cómo usarlas\n5. El resultado esperado y cómo se alinea con tu objetivo\n\nDespués de crear tu plan, evalúa si te sientes listo para ejecutar la tarea o si podrías hacerlo mejor.\nConcluye con una de estas declaraciones:\n- \"LISTO: Estoy listo para ejecutar la tarea.\"\n- \"NO LISTO: Necesito refinar mi plan porque [razón específica].\"",
"refine_plan_prompt": "Eres {role} con este trasfondo: {backstory}\n\nTu objetivo principal es: {goal}\n\nCreaste el siguiente plan para esta tarea:\n{current_plan}\n\nSin embargo, indicaste que aún no estás listo para ejecutar la tarea.\n\nPor favor, refina tu plan aún más, basándote en tu experiencia como {role} para abordar cualquier brecha o incertidumbre. A medida que refines tu plan, sé específico sobre qué herramientas disponibles usarás, cómo las usarás y por qué son las mejores opciones para cada paso. Describe claramente tu estrategia de uso de herramientas como parte de tu plan mejorado.\n\nDespués de refinar tu plan, evalúa si te sientes listo para ejecutar la tarea.\nConcluye con una de estas declaraciones:\n- \"LISTO: Estoy listo para ejecutar la tarea.\"\n- \"NO LISTO: Necesito refinar mi plan aún más porque [razón específica].\""
}
}

View File

@@ -14,6 +14,7 @@ class I18N(BaseModel):
Attributes:
_prompts: Internal dictionary storing loaded prompts.
prompt_file: Optional path to a custom JSON file containing prompts.
language: Language code for the prompts (e.g., 'en', 'es', 'pt'). Defaults to 'en'.
"""
_prompts: dict[str, dict[str, str]] = PrivateAttr()
@@ -21,6 +22,10 @@ class I18N(BaseModel):
default=None,
description="Path to the prompt_file file to load",
)
language: str = Field(
default="en",
description="Language code for the prompts (e.g., 'en', 'es', 'pt')",
)
@model_validator(mode="after")
def load_prompts(self) -> Self:
@@ -38,12 +43,24 @@ class I18N(BaseModel):
self._prompts = json.load(f)
else:
dir_path = os.path.dirname(os.path.realpath(__file__))
prompts_path = os.path.join(dir_path, "../translations/en.json")
prompts_path = os.path.join(
dir_path, f"../translations/{self.language}.json"
)
with open(prompts_path, encoding="utf-8") as f:
self._prompts = json.load(f)
try:
with open(prompts_path, encoding="utf-8") as f:
self._prompts = json.load(f)
except FileNotFoundError:
if self.language != "en":
fallback_path = os.path.join(dir_path, "../translations/en.json")
with open(fallback_path, encoding="utf-8") as f:
self._prompts = json.load(f)
else:
raise
except FileNotFoundError as e:
raise Exception(f"Prompt file '{self.prompt_file}' not found.") from e
raise Exception(
f"Prompt file '{self.prompt_file or self.language + '.json'}' not found."
) from e
except json.JSONDecodeError as e:
raise Exception("Error decoding JSON from the prompts file.") from e

View File

@@ -29,8 +29,8 @@ def create_llm(
try:
return LLM(model=llm_value)
except Exception as e:
logger.error(f"Error instantiating LLM from string: {e}")
raise e
logger.debug(f"Failed to instantiate LLM with model='{llm_value}': {e}")
return None
if llm_value is None:
return _llm_via_environment_or_fallback()
@@ -62,8 +62,8 @@ def create_llm(
)
except Exception as e:
logger.error(f"Error instantiating LLM from unknown object type: {e}")
raise e
logger.debug(f"Error instantiating LLM from unknown object type: {e}")
return None
UNACCEPTED_ATTRIBUTES: Final[list[str]] = [
@@ -176,10 +176,10 @@ def _llm_via_environment_or_fallback() -> LLM | None:
try:
return LLM(**llm_params)
except Exception as e:
logger.error(
logger.debug(
f"Error instantiating LLM from environment/fallback: {type(e).__name__}: {e}"
)
raise e
return None
def _normalize_key_name(key_name: str) -> str:

View File

@@ -6,7 +6,6 @@ from unittest import mock
from unittest.mock import MagicMock, patch
from crewai.agents.crew_agent_executor import AgentFinish, CrewAgentExecutor
from crewai.cli.constants import DEFAULT_LLM_MODEL
from crewai.events.event_bus import crewai_event_bus
from crewai.events.types.tool_usage_events import ToolUsageFinishedEvent
from crewai.knowledge.knowledge import Knowledge
@@ -136,7 +135,7 @@ def test_agent_with_missing_response_template():
def test_agent_default_values():
agent = Agent(role="test role", goal="test goal", backstory="test backstory")
assert agent.llm.model == DEFAULT_LLM_MODEL
assert agent.llm.model == "gpt-4o-mini"
assert agent.allow_delegation is False
@@ -226,7 +225,7 @@ def test_logging_tool_usage():
verbose=True,
)
assert agent.llm.model == DEFAULT_LLM_MODEL
assert agent.llm.model == "gpt-4o-mini"
assert agent.tools_handler.last_used_tool is None
task = Task(
description="What is 3 times 4?",

View File

@@ -591,81 +591,3 @@ def test_lite_agent_with_invalid_llm():
llm="invalid-model",
)
assert "Expected LLM instance of type BaseLLM" in str(exc_info.value)
@patch.dict("os.environ", {"CREWAI_PLATFORM_INTEGRATION_TOKEN": "test_token"})
@patch("crewai_tools.tools.crewai_platform_tools.crewai_platform_tool_builder.requests.get")
@pytest.mark.vcr(filter_headers=["authorization"])
def test_agent_kickoff_with_platform_tools(mock_get):
"""Test that Agent.kickoff() properly integrates platform tools with LiteAgent"""
mock_response = Mock()
mock_response.raise_for_status.return_value = None
mock_response.json.return_value = {
"actions": {
"github": [
{
"name": "create_issue",
"description": "Create a GitHub issue",
"parameters": {
"type": "object",
"properties": {
"title": {"type": "string", "description": "Issue title"},
"body": {"type": "string", "description": "Issue body"},
},
"required": ["title"],
},
}
]
}
}
mock_get.return_value = mock_response
agent = Agent(
role="Test Agent",
goal="Test goal",
backstory="Test backstory",
llm=LLM(model="gpt-3.5-turbo"),
apps=["github"],
verbose=True
)
result = agent.kickoff("Create a GitHub issue")
assert isinstance(result, LiteAgentOutput)
assert result.raw is not None
@patch.dict("os.environ", {"EXA_API_KEY": "test_exa_key"})
@patch("crewai.agent.Agent._get_external_mcp_tools")
@pytest.mark.vcr(filter_headers=["authorization"])
def test_agent_kickoff_with_mcp_tools(mock_get_mcp_tools):
"""Test that Agent.kickoff() properly integrates MCP tools with LiteAgent"""
# Setup mock MCP tools - create a proper BaseTool instance
class MockMCPTool(BaseTool):
name: str = "exa_search"
description: str = "Search the web using Exa"
def _run(self, query: str) -> str:
return f"Mock search results for: {query}"
mock_get_mcp_tools.return_value = [MockMCPTool()]
# Create agent with MCP servers
agent = Agent(
role="Test Agent",
goal="Test goal",
backstory="Test backstory",
llm=LLM(model="gpt-3.5-turbo"),
mcps=["https://mcp.exa.ai/mcp?api_key=test_exa_key&profile=research"],
verbose=True
)
# Execute kickoff
result = agent.kickoff("Search for information about AI")
# Verify the result is a LiteAgentOutput
assert isinstance(result, LiteAgentOutput)
assert result.raw is not None
# Verify MCP tools were retrieved
mock_get_mcp_tools.assert_called_once_with("https://mcp.exa.ai/mcp?api_key=test_exa_key&profile=research")

View File

@@ -1,244 +0,0 @@
interactions:
- request:
body: '{"messages": [{"role": "system", "content": "You are Test Agent. Test backstory\nYour
personal goal is: Test goal\n\nYou ONLY have access to the following tools,
and should NEVER make up tools that are not listed here:\n\nTool Name: exa_search\nTool
Arguments: {''query'': {''description'': None, ''type'': ''str''}}\nTool Description:
Search the web using Exa\n\nIMPORTANT: Use the following format in your response:\n\n```\nThought:
you should always think about what to do\nAction: the action to take, only one
name of [exa_search], just the name, exactly as it''s written.\nAction Input:
the input to the action, just a simple JSON object, enclosed in curly braces,
using \" to wrap keys and values.\nObservation: the result of the action\n```\n\nOnce
all necessary information is gathered, return the following format:\n\n```\nThought:
I now know the final answer\nFinal Answer: the final answer to the original
input question\n```"}, {"role": "user", "content": "Search for information about
AI"}], "model": "gpt-3.5-turbo", "stream": false}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '1038'
content-type:
- application/json
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.109.1
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.109.1
x-stainless-read-timeout:
- '600'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.13.3
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
body:
string: !!binary |
H4sIAAAAAAAAAwAAAP//jFNNb9swDL3nVxA6J0GTLgnmW7pLDGzrPi+dC0ORaVurLHoSVaQI8t8H
OR92twzYxYD4+MjHR3o/AhC6EAkIVUtWTWsm776/320+fbzbPLfy893br8vi6WGePnywNW3uxTgy
aPsTFZ9ZU0VNa5A12SOsHErGWHW2Ws5uFzfz1awDGirQRFrV8uR2uphwcFua3MzmixOzJq3QiwR+
jAAA9t03arQF7kQCN+NzpEHvZYUiuSQBCEcmRoT0XnuWlsW4BxVZRtvJ/lZTqGpOIAVfUzAFBI/A
NQLuZO5ROlUDExlggtOzJAfaluQaGUcFuaXAsE6nmV2rGEkG5HMMUtsGTmCfiV8B3UsmEsjEOs3E
IbP3W4/uWR65X9AHwx4cmmhebLxOoXTUXNM1zexwNIdl8DJaa4MxA0BaS9x16Ex9PCGHi42GqtbR
1v9BFaW22te5Q+nJRss8Uys69DACeOzWFV5tQLSOmpZzpifs2s1ns2M90V9Ij75ZnkAmlmbAWqzG
V+rlBbLUxg8WLpRUNRY9tb8OGQpNA2A0mPpvNddqHyfXtvqf8j2gFLaMRd46LLR6PXGf5jD+QP9K
u7jcCRbxSLTCnDW6uIkCSxnM8bSFf/GMTV5qW6Frne7uO25ydBj9BgAA//8DAChlpSTeAwAA
headers:
CF-RAY:
- 993d6b3e6b64ffb8-SJC
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Fri, 24 Oct 2025 23:57:52 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=cXZeAPPk9o5VuaArJFruIKai9Oj2X9ResvQgx_qCwdg-1761350272-1.0.1.1-42v7QDan6OIFJYT2vOisNB0AeLg3KsbAiCGsrrsPgH1N13l8o_Vy6HvQCVCIRAqPaHCcvybK8xTxrHKqZgLBRH4XM7.l5IYkFLhgl8IIUA0;
path=/; expires=Sat, 25-Oct-25 00:27:52 GMT; domain=.api.openai.com; HttpOnly;
Secure; SameSite=None
- _cfuvid=wGtD6dA8GfZzwvY_uzLiXlAVzOIOJPtIPQYQRS_19oo-1761350272656-0.0.1.1-604800000;
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-expose-headers:
- X-Request-ID
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '718'
openai-project:
- proj_xitITlrFeen7zjNSzML82h9x
openai-version:
- '2020-10-01'
x-envoy-upstream-service-time:
- '791'
x-openai-proxy-wasm:
- v0.1
x-ratelimit-limit-requests:
- '10000'
x-ratelimit-limit-tokens:
- '50000000'
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-remaining-tokens:
- '49999774'
x-ratelimit-reset-requests:
- 6ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_a2e42e9d98bc4c3db1a4de14cf1a94ec
status:
code: 200
message: OK
- request:
body: '{"messages": [{"role": "system", "content": "You are Test Agent. Test backstory\nYour
personal goal is: Test goal\n\nYou ONLY have access to the following tools,
and should NEVER make up tools that are not listed here:\n\nTool Name: exa_search\nTool
Arguments: {''query'': {''description'': None, ''type'': ''str''}}\nTool Description:
Search the web using Exa\n\nIMPORTANT: Use the following format in your response:\n\n```\nThought:
you should always think about what to do\nAction: the action to take, only one
name of [exa_search], just the name, exactly as it''s written.\nAction Input:
the input to the action, just a simple JSON object, enclosed in curly braces,
using \" to wrap keys and values.\nObservation: the result of the action\n```\n\nOnce
all necessary information is gathered, return the following format:\n\n```\nThought:
I now know the final answer\nFinal Answer: the final answer to the original
input question\n```"}, {"role": "user", "content": "Search for information about
AI"}, {"role": "assistant", "content": "Thought: I should use the exa_search
tool to search for information about AI.\nAction: exa_search\nAction Input:
{\"query\": \"AI\"}\nObservation: Mock search results for: AI"}], "model": "gpt-3.5-turbo",
"stream": false}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '1250'
content-type:
- application/json
cookie:
- __cf_bm=cXZeAPPk9o5VuaArJFruIKai9Oj2X9ResvQgx_qCwdg-1761350272-1.0.1.1-42v7QDan6OIFJYT2vOisNB0AeLg3KsbAiCGsrrsPgH1N13l8o_Vy6HvQCVCIRAqPaHCcvybK8xTxrHKqZgLBRH4XM7.l5IYkFLhgl8IIUA0;
_cfuvid=wGtD6dA8GfZzwvY_uzLiXlAVzOIOJPtIPQYQRS_19oo-1761350272656-0.0.1.1-604800000
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.109.1
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.109.1
x-stainless-read-timeout:
- '600'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.13.3
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
body:
string: !!binary |
H4sIAAAAAAAAAwAAAP//jFNNaxsxEL3vrxh06cU2/sBJs5diCi0phULr0EMaFlma3VWs1ajSbG0T
/N+L1o5306bQi0B6743evJGeMgBhtMhBqFqyarwdv7/7vP9kb+jjt8dV/Ln/otdrh3ezjdx9DUaM
koI2j6j4WTVR1HiLbMidYBVQMqaqs+ur2WI5nV8vOqAhjTbJKs/jxWQ55jZsaDydzZdnZU1GYRQ5
3GcAAE/dmjw6jXuRw3T0fNJgjLJCkV9IACKQTSdCxmgiS8di1IOKHKPrbK9raquac7gFRzvYpoVr
hNI4aUG6uMPww33odqtul6iKWqvdG040DRKiR2VKo86CCXxPBDhQC9ZsERoEJogog6qhpADSHbg2
rgK0ESGgTTElzur23dBpwLKNMiXlWmsHgHSOWKaku4wezsjxkoqlygfaxD+kojTOxLoIKCO5lEBk
8qJDjxnAQ5d++yJQ4QM1ngumLXbXzZdXp3qiH3iPLhZnkImlHaje3oxeqVdoZGlsHMxPKKlq1L20
H7ZstaEBkA26/tvNa7VPnRtX/U/5HlAKPaMufEBt1MuOe1rA9B/+Rbuk3BkWEcMvo7BggyFNQmMp
W3t6qSIeImNTlMZVGHww3XNNk8yO2W8AAAD//wMA7uEpt60DAAA=
headers:
CF-RAY:
- 993d6b44dc97ffb8-SJC
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Fri, 24 Oct 2025 23:57:53 GMT
Server:
- cloudflare
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-expose-headers:
- X-Request-ID
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '446'
openai-project:
- proj_xitITlrFeen7zjNSzML82h9x
openai-version:
- '2020-10-01'
x-envoy-upstream-service-time:
- '655'
x-openai-proxy-wasm:
- v0.1
x-ratelimit-limit-requests:
- '10000'
x-ratelimit-limit-tokens:
- '50000000'
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-remaining-tokens:
- '49999732'
x-ratelimit-reset-requests:
- 6ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_9ce6b4f80d9546eba4ce23b5fac77153
status:
code: 200
message: OK
version: 1

View File

@@ -1,126 +0,0 @@
interactions:
- request:
body: '{"messages": [{"role": "system", "content": "You are Test Agent. Test backstory\nYour
personal goal is: Test goal\n\nYou ONLY have access to the following tools,
and should NEVER make up tools that are not listed here:\n\nTool Name: create_issue\nTool
Arguments: {''title'': {''description'': ''Issue title'', ''type'': ''str''},
''body'': {''description'': ''Issue body'', ''type'': ''Union[str, NoneType]''}}\nTool
Description: Create a GitHub issue\nDetailed Parameter Structure:\nObject with
properties:\n - title: Issue title (required)\n - body: Issue body (optional)\n\nIMPORTANT:
Use the following format in your response:\n\n```\nThought: you should always
think about what to do\nAction: the action to take, only one name of [create_issue],
just the name, exactly as it''s written.\nAction Input: the input to the action,
just a simple JSON object, enclosed in curly braces, using \" to wrap keys and
values.\nObservation: the result of the action\n```\n\nOnce all necessary information
is gathered, return the following format:\n\n```\nThought: I now know the final
answer\nFinal Answer: the final answer to the original input question\n```"},
{"role": "user", "content": "Create a GitHub issue"}], "model": "gpt-3.5-turbo",
"stream": false}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '1233'
content-type:
- application/json
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.109.1
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.109.1
x-stainless-read-timeout:
- '600'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.13.3
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
body:
string: !!binary |
H4sIAAAAAAAAAwAAAP//jFNNbxMxEL3vrxj5nET5aGjIBUGoIMAFCRASqiLHns0O9Xose7ZtqPLf
0XrTbApF4rKHefOe37yZfSgAFFm1BGUqLaYObrj6+un+45er9ZvF/PW3tZirz+OXvy6+0/jDav1W
DVoGb3+ikUfWyHAdHAqx72ATUQu2qpPLF5PZfDy9vMhAzRZdS9sFGc5G86E0ccvD8WQ6PzIrJoNJ
LeFHAQDwkL+tR2/xXi1hPHis1JiS3qFanpoAVGTXVpROiZJoL2rQg4a9oM+213BHzoFHtFBzREgB
DZVkgHzJsdbtMCAM3Sig4R3J+2YLlFKDI1hx4yzsuYHgUCeEEPmWLHZiFkWTS5AaU4FOIBWCkDgE
7S1s2e6By1zNclnnLis6usH+2Vfn7iOWTdJter5x7gzQ3rNkwzm36yNyOCXleBcib9MfVFWSp1Rt
IurEvk0lCQeV0UMBcJ030jwJWYXIdZCN8A3m56bzeaen+iPo0dnsCAqLdmesxWLwjN7mGNzZTpXR
pkLbU/sD0I0lPgOKs6n/dvOcdjc5+d3/yPeAMRgE7SZEtGSeTty3RWz/kX+1nVLOhlXCeEsGN0IY
201YLHXjuutVaZ8E601JfocxRMon3G6yOBS/AQAA//8DABKn8+vBAwAA
headers:
CF-RAY:
- 993d6b4be9862379-SJC
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Fri, 24 Oct 2025 23:57:54 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=WY9bgemMDI_hUYISAPlQ2a.DBGeZfM6AjVEa3SKNg1c-1761350274-1.0.1.1-K3Qm2cl6IlDAgmocoKZ8IMUTmue6Q81hH9stECprUq_SM8LF8rR9d1sHktvRCN3.jEM.twEuFFYDNpBnN8NBRJFZcea1yvpm8Uo0G_UhyDs;
path=/; expires=Sat, 25-Oct-25 00:27:54 GMT; domain=.api.openai.com; HttpOnly;
Secure; SameSite=None
- _cfuvid=JklLS4i3hBGELpS9cz1KMpTbj72hCwP41LyXDSxWIv8-1761350274521-0.0.1.1-604800000;
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-expose-headers:
- X-Request-ID
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '487'
openai-project:
- proj_xitITlrFeen7zjNSzML82h9x
openai-version:
- '2020-10-01'
x-envoy-upstream-service-time:
- '526'
x-openai-proxy-wasm:
- v0.1
x-ratelimit-limit-requests:
- '10000'
x-ratelimit-limit-tokens:
- '50000000'
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-remaining-tokens:
- '49999727'
x-ratelimit-reset-requests:
- 6ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_1708dc0928c64882aaa5bc2c168c140f
status:
code: 200
message: OK
version: 1

View File

@@ -0,0 +1,116 @@
import pytest
from crewai.agent import Agent
from crewai.crew import Crew
from crewai.task import Task
def test_agent_default_language():
agent = Agent(
role="Test Agent",
goal="Test goal",
backstory="Test backstory"
)
assert agent.i18n.language == "en"
def test_agent_with_spanish_language():
agent = Agent(
role="Agente de Prueba",
goal="Objetivo de prueba",
backstory="Historia de fondo de prueba",
language="es"
)
assert agent.i18n.language == "es"
assert "Eres {role}" in agent.i18n.slice("role_playing")
def test_agent_with_english_language_explicit():
agent = Agent(
role="Test Agent",
goal="Test goal",
backstory="Test backstory",
language="en"
)
assert agent.i18n.language == "en"
assert "You are {role}" in agent.i18n.slice("role_playing")
def test_crew_default_language():
agent = Agent(
role="Test Agent",
goal="Test goal",
backstory="Test backstory"
)
task = Task(
description="Test task",
expected_output="Test output",
agent=agent
)
crew = Crew(agents=[agent], tasks=[task])
assert crew.language is None
def test_crew_with_spanish_language():
agent = Agent(
role="Agente de Prueba",
goal="Objetivo de prueba",
backstory="Historia de fondo de prueba"
)
task = Task(
description="Tarea de prueba",
expected_output="Salida de prueba",
agent=agent
)
crew = Crew(agents=[agent], tasks=[task], language="es")
assert crew.language == "es"
def test_crew_language_propagates_to_agents():
agent1 = Agent(
role="Agent 1",
goal="Goal 1",
backstory="Backstory 1"
)
agent2 = Agent(
role="Agent 2",
goal="Goal 2",
backstory="Backstory 2"
)
task = Task(
description="Test task",
expected_output="Test output",
agent=agent1
)
crew = Crew(agents=[agent1, agent2], tasks=[task], language="es")
assert crew.language == "es"
def test_agent_language_overrides_default():
agent_en = Agent(
role="English Agent",
goal="English goal",
backstory="English backstory",
language="en"
)
agent_es = Agent(
role="Spanish Agent",
goal="Spanish goal",
backstory="Spanish backstory",
language="es"
)
assert agent_en.i18n.language == "en"
assert agent_es.i18n.language == "es"
assert "You are {role}" in agent_en.i18n.slice("role_playing")
assert "Eres {role}" in agent_es.i18n.slice("role_playing")
def test_agent_without_language_uses_default():
agent = Agent(
role="Test Agent",
goal="Test goal",
backstory="Test backstory"
)
assert agent.language is None
assert agent.i18n.language == "en"

View File

@@ -0,0 +1,98 @@
import pytest
from crewai.utilities.i18n import I18N
def test_default_language_is_english():
i18n = I18N()
assert i18n.language == "en"
assert isinstance(i18n.slice("role_playing"), str)
assert "You are {role}" in i18n.slice("role_playing")
def test_explicit_english_language():
i18n = I18N(language="en")
assert i18n.language == "en"
assert isinstance(i18n.slice("role_playing"), str)
assert "You are {role}" in i18n.slice("role_playing")
def test_spanish_language():
i18n = I18N(language="es")
assert i18n.language == "es"
assert isinstance(i18n.slice("role_playing"), str)
assert "Eres {role}" in i18n.slice("role_playing")
def test_spanish_hierarchical_manager():
i18n = I18N(language="es")
role = i18n.retrieve("hierarchical_manager_agent", "role")
goal = i18n.retrieve("hierarchical_manager_agent", "goal")
backstory = i18n.retrieve("hierarchical_manager_agent", "backstory")
assert role == "Gerente del Equipo"
assert "Gestionar el equipo" in goal
assert "gerente experimentado" in backstory
def test_spanish_errors():
i18n = I18N(language="es")
error = i18n.errors("tool_usage_error")
assert "Encontré un error" in error
def test_spanish_tools():
i18n = I18N(language="es")
delegate_work = i18n.tools("delegate_work")
assert "Delega una tarea específica" in delegate_work
def test_fallback_to_english_for_unsupported_language():
i18n = I18N(language="fr")
assert isinstance(i18n.slice("role_playing"), str)
assert "You are {role}" in i18n.slice("role_playing")
def test_custom_prompt_file_overrides_language():
import os
import tempfile
import json
custom_prompts = {
"slices": {
"role_playing": "Custom role playing prompt"
}
}
with tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False) as f:
json.dump(custom_prompts, f)
temp_file = f.name
try:
i18n = I18N(prompt_file=temp_file, language="es")
assert i18n.slice("role_playing") == "Custom role playing prompt"
finally:
os.unlink(temp_file)
def test_retrieve_with_spanish():
i18n = I18N(language="es")
observation = i18n.retrieve("slices", "observation")
assert "Observación" in observation
def test_spanish_reasoning_prompts():
i18n = I18N(language="es")
initial_plan = i18n.retrieve("reasoning", "initial_plan")
assert "Eres {role}" in initial_plan
assert "profesional" in initial_plan
def test_language_parameter_validation():
i18n = I18N(language="en")
assert i18n.language == "en"
i18n_es = I18N(language="es")
assert i18n_es.language == "es"
i18n_pt = I18N(language="pt")
assert i18n_pt.language == "pt"

Some files were not shown because too many files have changed in this diff Show More