Mastering Agentic AI
No description available
Ask AI about Mastering Agentic AI
Powered by Claude Β· Grounded in docs
I know everything about Mastering Agentic AI. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
π€ AI Agents & Workflows - Code Repository
A comprehensive guide to building intelligent AI agents with CrewAI, DSPy, and MCP
Getting Started β’ Units Overview β’ Features β’ Contributing
π About This Repository
This repository contains all the code examples and implementations from the book on Building AI Agents and Workflows. Learn how to create, optimize, and deploy intelligent AI agents using cutting-edge frameworks and methodologies.
What You'll Learn
- π― Agentic vs Non-Agentic Workflows - Understand the differences and when to use each approach
- π§ CrewAI Framework - Build multi-agent systems that collaborate to solve complex tasks
- π DSPy Optimization - Automatically optimize your AI agents for better performance
- π Model Context Protocol - Create MCP servers for seamless AI tool integration
π Getting Started
Prerequisites
- Python 3.8 or higher
- OpenAI API key
- Additional API keys (see Environment Setup)
Installation
-
Clone the repository
git clone https://github.com/yourusername/Code-for-book.git cd Code-for-book -
Create a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies
pip install -r requirements.txt -
Set up environment variables
cp .env.example .env # Edit .env with your API keys
π Units Overview
Unit 2: Agentic vs Non-Agentic Workflows
Learn the fundamental differences between agentic and non-agentic approaches through a practical AI news research and Twitter posting system.
Key Topics:
- Multi-agent collaboration with CrewAI
- Tool integration (Exa search, image generation, Twitter API)
- Task delegation and sequential processing
- Comparison of workflow approaches
Notebooks:
agentic_workflow.ipynb- CrewAI multi-agent systemnon_agentic.ipynb- Traditional sequential approach
Unit 3: DSPy Optimization
Discover how to optimize AI agents automatically using DSPy's advanced prompting and few-shot learning techniques.
Key Topics:
- DSPy signatures and modules
- ReAct agent pattern
- MIPROv2 optimization
- Custom tool integration
- Evaluation metrics
Files:
dspy.ipynb- Complete DSPy implementation for nutrition analysisfoodDB.json- Sample nutrition databaseprompt.txt- Example prompt structure
Unit 4: Model Context Protocol (MCP)
Build MCP servers to enable AI models to interact with external tools and services.
Key Topics:
- MCP server architecture
- FastMCP implementation
- Tool registration and execution
- Transport methods (stdio, SSE)
Files:
mcp_server.py- FastMCP server implementationtool.py- Nutrition API tool example
β¨ Features
π― Agentic Workflows (Unit 2)
- Multi-Agent Collaboration: Researcher, Image Generator, and Tweet Creator agents working together
- Semantic Search: Using Exa API for intelligent web research
- AI Image Generation: Creating visuals with Hugging Face models
- Social Media Automation: Automated Twitter posting with media
π§ DSPy Optimization (Unit 3)
- Automatic Prompt Engineering: Let DSPy find the best prompts
- Few-Shot Learning: Optimize with minimal training examples
- ReAct Pattern: Reasoning and acting in iterative loops
- Custom Metrics: Define and optimize for your specific use case
π MCP Integration (Unit 4)
- Flexible Transport: Support for stdio and Server-Sent Events
- Easy Tool Creation: Simple decorators for tool registration
- Type Safety: Full type hints for better development experience
- Extensible Architecture: Add new tools and capabilities easily
π οΈ Tech Stack
| Category | Technologies |
|---|---|
| AI Frameworks | CrewAI, DSPy, LangChain |
| LLM Providers | OpenAI (GPT-4, GPT-4o-mini) |
| Search & Research | Exa API |
| Image Generation | Hugging Face Inference API |
| Social Media | Tweepy (Twitter API) |
| MCP | FastMCP |
| Utilities | Python-Decouple, Python-Dotenv, Pillow |
π€ Contributing
Contributions are welcome! Here's how you can help:
- Report Issues: Found a bug? Open an issue
- Suggest Improvements: Have ideas? Share them in discussions
- Submit Pull Requests:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- OpenAI for providing the GPT models
- CrewAI for the amazing multi-agent framework
- DSPy team for revolutionizing prompt engineering
- FastMCP for making MCP servers simple
- All the open-source contributors who make this possible
π¬ Contact & Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: your.email@example.com
Made with β€οΈ for the AI community
