mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-16 12:28:30 +00:00
docs: update theme to mint and modify opik observability doc
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://mintlify.com/docs.json",
|
"$schema": "https://mintlify.com/docs.json",
|
||||||
"theme": "palm",
|
"theme": "mint",
|
||||||
"name": "CrewAI",
|
"name": "CrewAI",
|
||||||
"colors": {
|
"colors": {
|
||||||
"primary": "#EB6658",
|
"primary": "#EB6658",
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ icon: meteor
|
|||||||
|
|
||||||
With [Comet Opik](https://www.comet.com/docs/opik/), debug, evaluate, and monitor your LLM applications, RAG systems, and agentic workflows with comprehensive tracing, automated evaluations, and production-ready dashboards.
|
With [Comet Opik](https://www.comet.com/docs/opik/), debug, evaluate, and monitor your LLM applications, RAG systems, and agentic workflows with comprehensive tracing, automated evaluations, and production-ready dashboards.
|
||||||
|
|
||||||
|
<Frame caption="Opik Agent Dashboard">
|
||||||
|
<img src="/images/opik-crewai-dashboard.png" alt="Opik agent monitoring example with CrewAI" />
|
||||||
|
</Frame>
|
||||||
|
|
||||||
Opik provides comprehensive support for every stage of your CrewAI application development:
|
Opik provides comprehensive support for every stage of your CrewAI application development:
|
||||||
|
|
||||||
- **Log Traces and Spans**: Automatically track LLM calls and application logic to debug and analyze development and production systems. Manually or programmatically annotate, view, and compare responses across projects.
|
- **Log Traces and Spans**: Automatically track LLM calls and application logic to debug and analyze development and production systems. Manually or programmatically annotate, view, and compare responses across projects.
|
||||||
@@ -27,7 +31,7 @@ For this guide we will use CrewAI’s quickstart example.
|
|||||||
<Steps>
|
<Steps>
|
||||||
<Step title="Install required packages">
|
<Step title="Install required packages">
|
||||||
```shell
|
```shell
|
||||||
%pip install crewai crewai-tools opik --upgrade
|
pip install crewai crewai-tools opik --upgrade
|
||||||
```
|
```
|
||||||
</Step>
|
</Step>
|
||||||
<Step title="Configure Opik">
|
<Step title="Configure Opik">
|
||||||
@@ -35,8 +39,10 @@ For this guide we will use CrewAI’s quickstart example.
|
|||||||
import opik
|
import opik
|
||||||
opik.configure(use_local=False)
|
opik.configure(use_local=False)
|
||||||
```
|
```
|
||||||
|
</Step>
|
||||||
<Step title="Prepare environment">
|
<Step title="Prepare environment">
|
||||||
First, we set up our API keys for our LLM-provider as environment variables:
|
First, we set up our API keys for our LLM-provider as environment variables:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import os
|
import os
|
||||||
import getpass
|
import getpass
|
||||||
@@ -47,53 +53,56 @@ For this guide we will use CrewAI’s quickstart example.
|
|||||||
</Step>
|
</Step>
|
||||||
<Step title="Using CrewAI">
|
<Step title="Using CrewAI">
|
||||||
The first step is to create our project. We will use an example from CrewAI’s documentation:
|
The first step is to create our project. We will use an example from CrewAI’s documentation:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from crewai import Agent, Crew, Task, Process
|
from crewai import Agent, Crew, Task, Process
|
||||||
|
|
||||||
|
|
||||||
class YourCrewName:
|
class YourCrewName:
|
||||||
def agent_one(self) -> Agent:
|
def agent_one(self) -> Agent:
|
||||||
return Agent(
|
return Agent(
|
||||||
role="Data Analyst",
|
role="Data Analyst",
|
||||||
goal="Analyze data trends in the market",
|
goal="Analyze data trends in the market",
|
||||||
backstory="An experienced data analyst with a background in economics",
|
backstory="An experienced data analyst with a background in economics",
|
||||||
verbose=True,
|
verbose=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def agent_two(self) -> Agent:
|
def agent_two(self) -> Agent:
|
||||||
return Agent(
|
return Agent(
|
||||||
role="Market Researcher",
|
role="Market Researcher",
|
||||||
goal="Gather information on market dynamics",
|
goal="Gather information on market dynamics",
|
||||||
backstory="A diligent researcher with a keen eye for detail",
|
backstory="A diligent researcher with a keen eye for detail",
|
||||||
verbose=True,
|
verbose=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def task_one(self) -> Task:
|
def task_one(self) -> Task:
|
||||||
return Task(
|
return Task(
|
||||||
name="Collect Data Task",
|
name="Collect Data Task",
|
||||||
description="Collect recent market data and identify trends.",
|
description="Collect recent market data and identify trends.",
|
||||||
expected_output="A report summarizing key trends in the market.",
|
expected_output="A report summarizing key trends in the market.",
|
||||||
agent=self.agent_one(),
|
agent=self.agent_one(),
|
||||||
)
|
)
|
||||||
|
|
||||||
def task_two(self) -> Task:
|
def task_two(self) -> Task:
|
||||||
return Task(
|
return Task(
|
||||||
name="Market Research Task",
|
name="Market Research Task",
|
||||||
description="Research factors affecting market dynamics.",
|
description="Research factors affecting market dynamics.",
|
||||||
expected_output="An analysis of factors influencing the market.",
|
expected_output="An analysis of factors influencing the market.",
|
||||||
agent=self.agent_two(),
|
agent=self.agent_two(),
|
||||||
)
|
)
|
||||||
|
|
||||||
def crew(self) -> Crew:
|
def crew(self) -> Crew:
|
||||||
return Crew(
|
return Crew(
|
||||||
agents=[self.agent_one(), self.agent_two()],
|
agents=[self.agent_one(), self.agent_two()],
|
||||||
tasks=[self.task_one(), self.task_two()],
|
tasks=[self.task_one(), self.task_two()],
|
||||||
process=Process.sequential,
|
process=Process.sequential,
|
||||||
verbose=True,
|
verbose=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Now we can import Opik’s tracker and run our crew:
|
Now we can import Opik’s tracker and run our crew:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from opik.integrations.crewai import track_crewai
|
from opik.integrations.crewai import track_crewai
|
||||||
|
|
||||||
@@ -109,10 +118,6 @@ class YourCrewName:
|
|||||||
- Agent interactions and task execution flow
|
- Agent interactions and task execution flow
|
||||||
- Performance metrics like latency and token usage
|
- Performance metrics like latency and token usage
|
||||||
- Evaluation metrics (built-in or custom)
|
- Evaluation metrics (built-in or custom)
|
||||||
|
|
||||||
<Frame caption="Opik Agent Dashboard">
|
|
||||||
<img src="/images/opik-crewai-dashboard.png" alt="Opik agent monitoring example with CrewAI" />
|
|
||||||
</Frame>
|
|
||||||
</Step>
|
</Step>
|
||||||
</Steps>
|
</Steps>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user