Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Felix-Ayush 4133bb369c
docs(site): Guide for Evaluating CrewAI Agents with Promptfoo (#4861)
1 month ago
..
4133bb369c
docs(site): Guide for Evaluating CrewAI Agents with Promptfoo (#4861)
1 month ago
4133bb369c
docs(site): Guide for Evaluating CrewAI Agents with Promptfoo (#4861)
1 month ago
4133bb369c
docs(site): Guide for Evaluating CrewAI Agents with Promptfoo (#4861)
1 month ago
4133bb369c
docs(site): Guide for Evaluating CrewAI Agents with Promptfoo (#4861)
1 month ago

README.md

You have to be logged in to leave a comment. Sign In

crewai-example

This example demonstrates how to use CrewAI with promptfoo, including multi-agent coordination and structured output evaluation.

You can run this example with:

npx promptfoo@latest init --example crewai

Environment Variables

This example requires the following environment variables:

  • OPENAI_API_KEY – Your OpenAI API key (required by CrewAI)

You can set this in a .env file or directly in your environment.

Prerequisites

  • Python 3.10+
  • Node.js v18+
  • OpenAI API access (for GPT-4o, GPT-4o-mini, or other models)
  • An OpenAI API key

Install Python packages:

pip install crewai openai python-dotenv

Install promptfoo CLI:

npm install -g promptfoo

Files

  • agent.py: Defines a recruitment agent using CrewAI
  • provider.py: Wraps the agent for promptfoo integration
  • promptfooconfig.yaml: Configures prompts, providers, and tests for evaluation

Run the evaluation:

promptfoo eval

Explore results in browser:

promptfoo view

Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...