
This lecture illustrates how to combine dspy with crewai, particularly how to monkey-patch the crewai call method and integrate dspy into the patch for prompt optimization tasks
This lecture illustrates through both code and notes how CrewAI stitches together the YAML agent and task descriptions plus the inputs and prompt template (boilerplate) instructios to form the final prompts. Code for this lecture are in 'vanillacrewai' folder of the repo attached as a resource in this lecture
This video takes us through the main principles behind dspy and how to build a simple dspy signature and module to using the BootstrapFewShot optimizer to optimize a module for prompt improvement tasks
This lecture touches on the other optimizers available for use in dspy, including how they differ and then partially illustrates the use of Miprov2 for prompt optimization tasks with crewai
This lecture illustrates the significance of the DSPy + CrewAI integration to developers and prompt engineers, and also mentions a few things about the practical implications of monkey-patching crewai methods. Lastly, it provides the link to the repo with all the course code
Unlock the full potential of your CrewAI workflows by learning how to intercept and optimize crewai-constructed LLM prompts using DSPy. In this course, you’ll dive into the inner mechanics of CrewAI’s call method and learn how to monkey-patch it without breaking the method or altering the core library. This powerful technique allows you to intercept the final messages that are often sent to the LLM—giving you complete visibility into what your LLMs are actually receiving before execution.
Once intercepted, we’ll harness the power of DSPy to optimize these raw prompts for clarity, specificity, and alignment with desired outcomes. You'll learn how to apply DSPy modules such as MIPROv2 or BootstrapFewShot to systematically improve the effectiveness of prompts, reducing ambiguity and improving the reliability of multi-agent outputs. By plugging these optimized prompts back into the CrewAI flow, you’ll not only gain more control in prompting but you will also ensure your agents work smarter—not just harder.
Whether you're an AI engineer, CrewAI user, or prompt optimization enthusiast, this course gives you practical tools to elevate your agent orchestration. You’ll build a full pipeline that captures, improves, and reintegrates prompts dynamically—without breaking existing workflows. By the end, you’ll have hands-on experience crafting smarter agents and clearer task instructions, using better and automated prompt engineering strategies that go beyond trial-and-error.