Skip to content

🤖 CrewAI Agentic AI Framework Build smart, role-based AI teams with CrewAI! ⚙️🤝 Agents collaborate like real teams to solve complex tasks. from DevOps pipelines 🛠️ and secure auth flows 🔐 to content creation ✍️ and business automation 📈. Easily customizable, extendable with tools 🧩, and fully powered by 🧠 GPT-4 + 🐍 Python 3.11.9.

Notifications You must be signed in to change notification settings

jishanahmed-shaikh/CrewAI-AgenticAI-Framework

Repository files navigation

🤖 CrewAI Agentic AI Framework & Multi-Agent System

Python CrewAI OpenAI Version License

🚀 Welcome to the future of AI collaboration! This project demonstrates how to build powerful multi-agent systems using CrewAI, where AI agents work together like a real team to solve complex problems.

🌟 What is CrewAI?

CrewAI is a cutting-edge framework that enables you to orchestrate role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks more effectively than any single AI could alone.

🎯 Key Features

  • 🤝 Multi-Agent Collaboration: Agents work together like a real team
  • 🎭 Role-Based Agents: Each agent has specific roles and expertise
  • 🔄 Sequential Task Execution: Tasks flow logically from one agent to another
  • 🛠️ Custom Tools: Extend agents with specialized capabilities
  • 📊 Advanced Logging: Comprehensive logging with file and console output
  • 🔍 Code Review Agent: AI-powered code analysis for bugs, security, and performance
  • 📄 Enhanced README Generator: Professional documentation with extensive context support
  • ⚙️ Configuration Management: Customizable settings via config files
  • 📈 Performance Metrics: Track agent usage and session analytics
  • 🛡️ Error Recovery: Robust error handling and fallback mechanisms
  • Built-in Help System: Comprehensive usage tips and guidance

📁 Project Structure

📦 CrewAI-AgenticAI-Framework/
├── 🐍 main.py              # Enhanced interactive multi-agent system
├── 🔧 test3agents.py       # Advanced 3-agent collaboration example
├── ⚙️ config.py            # Configuration settings and parameters
├── 🔧 utils.py             # Utility functions and helpers
├── 📋 requirements.txt     # Python dependencies with version pinning
├── 📝 Instructions.md      # 📋 Comprehensive setup guide
├── 🙈 .gitignore          # Git ignore rules
├── 🌍 .env                # Environment variables (create this)
├── 📊 agent_system.log     # Application logs (generated)
├── 📈 performance_metrics.json # Usage analytics (generated)
└── 📖 README.md           # This file

🚀 Quick Start Guide

📋 Detailed Setup Instructions: For a comprehensive step-by-step guide, see our Instructions.md file!

📋 Prerequisites

  • 🐍 Python 3.11.9 (Required version)
  • 🔑 OpenAI API Key (Get one here)
  • 💻 Terminal/Command Prompt/Powershell

🛠️ Installation Steps

1️⃣ Clone & Navigate

git clone https://github.com/jishanahmed-shaikh/CrewAI-AgenticAI-Framework.git
cd CrewAI-AgenticAI-Framework

2️⃣ Create Environment File

Create a .env file in the project root:

OPENAI_API_KEY=your_actual_api_key_here

🔐 Security Note: Never commit your API key to version control!

3️⃣ Setup Virtual Environment

# Create virtual environment
python -m venv crew-env

# Activate it (Windows)
crew-env\Scripts\activate

# Activate it (macOS/Linux)
source crew-env/bin/activate

4️⃣ Install Dependencies

pip install -r requirements.txt

🎮 Running the Enhanced System

🚀 Main Application (Enhanced Multi-Agent System)

The main application now features 5 specialized agents with advanced capabilities:

python main.py

🤖 Available Agents:

  1. 🐍 Dev Agent: Python development with custom task support

    • Pre-built functions (string reversal, palindrome check)
    • Custom programming tasks with natural language input
    • Seamless integration with Code Review Agent
  2. 📝 Doc Agent: Comprehensive documentation creation

    • Technical reports and explanations
    • Custom documentation tasks
    • Professional formatting and structure
  3. 📄 Enhanced README Generator: Professional project documentation

    • Multi-line context input support
    • Comprehensive analysis of project requirements
    • 20+ documentation sections with badges and formatting
    • Iterative improvement with user feedback
  4. 🔍 Code Review Agent: AI-powered code analysis

    • Security Analysis: Vulnerability detection and best practices
    • Performance Review: Optimization suggestions and bottleneck identification
    • Code Quality: Standards compliance and readability assessment
    • Bug Detection: Logic errors and edge case identification
    • Architecture Review: Design patterns and SOLID principles
    • Multiple Input Methods: File paths, direct paste, or Dev Agent output
  5. ❓ Help System: Built-in guidance and usage tips

🔄 Smart Workflow Integration:

  • Generate code with Dev Agent → Immediately review with Code Review Agent
  • Enhanced error handling and recovery mechanisms
  • Session tracking with duration and performance metrics
  • Auto-save functionality for all outputs

🧪 Advanced Example (Multi-Agent Collaboration)

Experience collaborative AI with specialized roles:

python test3agents.py

👥 The Specialized Team:

  • 🔧 Technician Agent: Environment setup and software installation
  • 🛡️ Security Agent: Authentication and security implementation
  • 🧪 Testing Agent: Quality assurance and system validation

🏗️ Understanding the Architecture

🤖 Agent Components

agent = Agent(
    role="Your Agent's Job Title",           # 🎭 What they do
    goal="What they want to achieve",        # 🎯 Their objective
    backstory="Their background story",      # 📚 Their expertise
    verbose=True,                           # 📢 Show their work
    tools=[custom_tools]                    # 🛠️ Special abilities
)

📋 Task Structure

task = Task(
    description="What needs to be done",     # 📝 The assignment
    expected_output="What you expect",       # ✅ Success criteria
    agent=assigned_agent                     # 🤖 Who does it
)

👥 Crew Assembly

crew = Crew(
    agents=[agent1, agent2, agent3],        # 🤖 The team
    tasks=[task1, task2, task3],            # 📋 The work
    verbose=True                            # 📊 Show progress
)

🛠️ Creating Custom Tools

Want to give your agents superpowers? Here's how to create custom tools:

from langchain.tools import BaseTool
from pydantic import BaseModel, Field

class CustomToolInput(BaseModel):
    parameter: str = Field(..., description="Tool parameter")

class CustomTool(BaseTool):
    name = "ToolName"
    description = "What this tool does"
    args_schema = CustomToolInput
    
    def _run(self, parameter: str) -> str:
        # Your tool logic here
        return f"Tool executed with: {parameter}"

🎯 Use Cases & Applications

🏢 Business Applications

  • 📊 Data Analysis Pipeline: Research → Analysis → Reporting
  • 🛒 E-commerce Automation: Product research → Content creation → Marketing
  • 📈 Financial Planning: Market analysis → Strategy → Risk assessment
  • 📋 Documentation Automation: Requirements → Design → Implementation docs

💻 Development Workflows

  • Copmplete DevOps Pipeline: Setup → Security → Testing → Deployment
  • BFull-Stack Development: Planning → Coding → Review → Testing → Documentation
  • 🐛 Advanced Bug Resolution: Detection → Analysis → Fix → Review → Verification
  • 🔍 Code Quality Assurance: Development → Review → Optimization → Documentation
  • 📄 Project Documentation: Context analysis → README generation → Review

⭐ Creative & Content Projects

  • ✍️ Technical Writing: Research → Writing → Review → Publishing
  • 📚 Documentation Creation: Analysis → Structure → Content → Review
  • 🎬 Content Production: Planning → Creation → Review → Optimization
  • 🎵 Creative Workflows: Ideation → Development → Review → Refinement

🔍 Code Analysis & Review

  • 🛡️ Security Auditing: Vulnerability scanning → Risk assessment → Recommendations
  • Performance Optimization: Bottleneck identification → Analysis → Solutions
  • 📏 Code Quality Assessment: Standards review → Best practices → Improvements
  • 🏗️ Architecture Review: Design patterns → Structure analysis → Recommendations

🔧 Troubleshooting

📋 Need More Help? Check our comprehensive Instructions.md for detailed troubleshooting steps!

Common Issues & Solutions

🚫 "OpenAI API Key not found"

  • ✅ Check your .env file exists
  • ✅ Verify the key format: OPENAI_API_KEY=sk-...
  • ✅ Restart your terminal after creating .env

🐍 "Python version mismatch"

  • ✅ Use Python 3.11.9 specifically
  • ✅ Check with: python --version
  • ✅ Consider using pyenv for version management

📦 "Module not found"

  • ✅ Activate your virtual environment
  • ✅ Run: pip install -r requirements.txt
  • ✅ Check you're in the right directory

📚 Learning Resources

🎓 Official Documentation

🎬 Videos, Courses & Tutorials

📖 Recommended Reading

  • "Multi-Agent Systems" by Gerhard Weiss
  • "Artificial Intelligence: A Modern Approach" by Russell & Norvig
  • "The Alignment Problem" by Brian Christian

🤝 Contributing

We love contributions! Here's how you can help:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch: git checkout -b amazing-feature
  3. 💾 Commit your changes: git commit -m 'Add amazing feature'
  4. 📤 Push to the branch: git push origin amazing-feature
  5. 🎉 Open a Pull Request

📄 License

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

🙏 Acknowledgments

  • 🎉 CrewAI Team for the amazing framework
  • 🤖 OpenAI for the powerful language models
  • 🐍 Python Community for the excellent ecosystem
  • 👥 Contributors who make this project better

📞 Support & Community


🌟 Star this repo if you found it helpful! 🌟

Made with ❤️ by the Mr. Jishanahmed AR Shaikh for the AI Community

"The future belongs to organizations that can harness the collective intelligence of AI agents working in harmony."

🆕 Latest Updates (v2.1.0)

✨ New Features

  • 🔍 Code Review Agent: Comprehensive code analysis with 7-area coverage
  • 📄 Enhanced README Generator: Multi-line input and extensive context processing
  • ⚙️ Configuration Management: External config files for customization
  • 📊 Performance Metrics: Session tracking and usage analytics
  • 🛡️ Error Recovery: Robust fallback mechanisms and error handling
  • Help System: Built-in guidance and usage tips

🔧 Improvements

  • 📝 Advanced Logging: File and console logging with timestamps
  • 🔄 Smart Workflow: Seamless Dev Agent → Code Review integration
  • ⏱️ Session Tracking: Duration monitoring and task completion metrics
  • 🛠️ Utility Functions: Helper functions for common operations
  • 📦 Version Pinning: Stable dependency management

🚀 What's Next?

Ready to build your own AI agent team? Here are some advanced ideas:

  • 🎯 Customer Service Crew: Support → Escalation → Resolution → Follow-up
  • 📊 Market Research Team: Data collection → Analysis → Insights → Reporting
  • 🎨 Creative Agency: Brainstorming → Design → Review → Refinement → Publishing
  • 🏥 Healthcare Assistant: Symptoms → Diagnosis → Treatment → Follow-up → Monitoring
  • 🔐 Security Audit Team: Scanning → Analysis → Reporting → Remediation
  • 📈 Business Intelligence: Data → Analysis → Insights → Recommendations → Implementation

The possibilities are endless with our enhanced framework! 🌈


Happy coding! 🎉

About

🤖 CrewAI Agentic AI Framework Build smart, role-based AI teams with CrewAI! ⚙️🤝 Agents collaborate like real teams to solve complex tasks. from DevOps pipelines 🛠️ and secure auth flows 🔐 to content creation ✍️ and business automation 📈. Easily customizable, extendable with tools 🧩, and fully powered by 🧠 GPT-4 + 🐍 Python 3.11.9.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages