Skip to content

fleska27/crewai-pokemon-example

Repository files navigation

Pokemon CrewAI Implementation 🚀

A demonstration of CrewAI's capabilities using the Pokemon API, showcasing autonomous agents collaborating to research Pokemon and create marketing strategies.

🌟 Features

  • Pokemon Research Agent: Gathers detailed information about Pokemon
  • Marketing Strategy Agent: Creates targeted marketing plans based on Pokemon characteristics
  • API Integration: Seamless integration with the PokeAPI
  • Structured Output: Well-formatted JSON responses for easy data processing

🛠️ Prerequisites

  • Python 3.11 or higher
  • OpenAI API key
  • Internet connection for PokeAPI access

📦 Installation

  1. Clone the repository:
git clone [your-repo-url]
cd pokemon-crewai
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up your environment variables:
export OPENAI_API_KEY=your_api_key_here

🚀 Usage

Run the main script:

python main.py

The application will:

  1. Initialize the CrewAI agents
  2. Research specified Pokemon (Pikachu, Charizard, Bulbasaur)
  3. Generate marketing strategies based on the research

📁 Project Structure

├── main.py              # Main application entry point
├── api_wrapper.py       # Pokemon API integration
├── utils.py            # Utility functions
└── README.md           # Documentation

🔧 Configuration

The project uses the following configuration:

  • API Base URL: https://pokeapi.co/api/v2
  • Researcher Agent Temperature: 0.5 (for focused responses)
  • Marketing Agent Temperature: 0.7 (for creative strategies)
  • Process Timeout: 300 seconds

📊 Sample Output

{
    "Pikachu": {
        "types": ["electric"],
        "abilities": ["static", "lightning-rod"],
        "base_stats": {
            "hp": 35,
            "attack": 55,
            "defense": 40,
            "special-attack": 50,
            "special-defense": 50,
            "speed": 90
        }
    }
}

🤝 Contributing

Please see CONTRIBUTING.md for guidelines on how to contribute to this project.

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments