Overview
Portkey enhances CrewAI applications with:- Multi-Provider Support: Route crew agents to 250+ different LLMs
- Crew Observability: Full logging and tracing for all agent interactions
- Reliability: Automatic fallbacks and retries for mission-critical tasks
- Cost Optimization: Track and optimize token usage across your crew
- Performance: Smart caching for repeated tasks
Installation
Quick Start
CrewAI integrates seamlessly with Portkey through OpenAI-compatible configuration:Complete Crew Example
Build a complete content creation crew:Using Different Providers
Assign different LLM providers to different agents:Advanced Routing
Fallback Configuration
Automatically fallback to backup providers:Load Balancing
Distribute crew workload across multiple providers:Retry Configuration
Handle transient failures:Crew Observability
Track individual agents with custom metadata:Caching for Crews
Reduce costs for repeated tasks:Sequential vs Hierarchical Crews
Sequential Crew with Portkey
Hierarchical Crew with Portkey
Using CrewAI Tools
Integrate tools with Portkey-powered agents:Memory and Context
Use CrewAI’s memory features with Portkey:Best Practices
Track Each Agent
Track Each Agent
Add agent-specific metadata for better debugging:
Use Fallbacks for Production
Use Fallbacks for Production
Configure fallbacks for critical crews:
Enable Caching
Enable Caching
Use caching for crews with repeated tasks:
Monitor Token Usage
Monitor Token Usage
Track token usage per agent to optimize costs in the Portkey dashboard.
Different Models for Different Roles
Different Models for Different Roles
Use GPT-4 for complex tasks, GPT-3.5 for simpler ones to optimize costs.
Example: Market Research Crew
Complete market research crew with Portkey:Monitoring Crew Performance
View detailed crew metrics in the Portkey dashboard:- Per-agent token usage and costs
- Task completion times
- Error rates by agent
- Cache hit rates
- Conversation flows between agents
- Custom metadata filtering
Resources
Questions? Join our Discord community for help with CrewAI implementations.