Weave Integration
Learn how to use Weights & Biases (W&B) Weave to track, experiment with, evaluate, and improve your CrewAI applications.
Weave Overview
Weights & Biases (W&B) Weave is a framework for tracking, experimenting with, evaluating, deploying, and improving LLM-based applications.
Weave provides comprehensive support for every stage of your CrewAI application development:
- Tracing & Monitoring: Automatically track LLM calls and application logic to debug and analyze production systems
- Systematic Iteration: Refine and iterate on prompts, datasets, and models
- Evaluation: Use custom or pre-built scorers to systematically assess and enhance agent performance
- Guardrails: Protect your agents with pre- and post-safeguards for content moderation and prompt safety
Weave automatically captures traces for your CrewAI applications, enabling you to monitor and analyze your agents’ performance, interactions, and execution flow. This helps you build better evaluation datasets and optimize your agent workflows.
Setup Instructions
Install required packages
Set up W&B Account
Sign up for a Weights & Biases account if you haven’t already. You’ll need this to view your traces and metrics.
Initialize Weave in Your Application
Add the following code to your application:
After initialization, Weave will provide a URL where you can view your traces and metrics.
Create your Crews/Flows
View Traces in Weave
After running your CrewAI application, visit the Weave URL provided during initialization to view:
- LLM calls and their metadata
- Agent interactions and task execution flow
- Performance metrics like latency and token usage
- Any errors or issues that occurred during execution
Weave Tracing Dashboard
Features
- Weave automatically captures all CrewAI operations: agent interactions and task executions; LLM calls with metadata and token usage; tool usage and results.
- The integration supports all CrewAI execution methods:
kickoff()
,kickoff_for_each()
,kickoff_async()
, andkickoff_for_each_async()
. - Automatic tracing of all crewAI-tools.
- Flow feature support with decorator patching (
@start
,@listen
,@router
,@or_
,@and_
). - Track custom guardrails passed to CrewAI
Task
with@weave.op()
.
For detailed information on what’s supported, visit the Weave CrewAI documentation.
Resources
Was this page helpful?