CrewAI Tutorial: How To Make CrewAI Coding Agent Run and Execute Code Itself
#crewai #dockerdesktop #vscode #python #aiagent #openai #codingagent
Welcome back to DS‑AI with Khanhvy & today's tutorial! @crewAIInc coding agent is so powerful and you can use it for vibe-coding. However, I've been seeing tons of questions on Reddit and in the comments about CrewAI agents that just won't execute code-missing Docker errors, virtual‑env mismatches, libraries not found, and more. So today, I'm walking you through my exact local setup using VS Code, Docker Desktop, and crewAI. By the end of this video, you'll have a fully functional CrewAI coding agent that writes, runs, and even saves its own Python scripts-all without copy/paste headaches!
Tool Use: CrewAI, Docker Desktop, VSCode
🎥 In this video, we cover:
✔️ Installing CrewAI & crewai_tools in your Python environment
✔️ Configuring VS Code & Docker Desktop for seamless container execution
✔️ Defining your agent's role, goal, and backstory for clear instructions
✔️ Setting up CodeInterpreterTool and FileWriterTool
✔️ Writing the Task and orchestrating with Crew
✔️ Running a live demo: agent generates code, executes it, prints stdout, and writes files
🔗 Important Links & Resources:
• GitHub repo (full example code) → https://github.com/khanhvy31/crew-ai-coding-agent
• CrewAI docs → https://docs.crewai.com/introduction
⏱️ Chapters:
00:00 Introduction
00:47 Why CrewAI Coding Agents fail to execute the code
02:03 Prerequisites: Python, VS Code, Docker Desktop, virtual env
03:04 Pip install requirements
03:14 Import packages, LLM API
04:21 CodeInterpreterTool & FileWriterTool
04:31 Agent Definition: Role, Goal, Backstory
05:39 Adding CodeInterpreterTool & FileWriterTool for Agent
07:00 Task & Crew Orchestration
08:23 Live Demo: Running Python Snippets
09:20 CrewAI Agent execute code, Saving Outputs & Files
09:32 Wrap‑Up & Next Steps
📢 Discussion Question:
What other tools or libraries would you plug into your CrewAI agent (e.g. webscraping, database connectors, ML frameworks)? Let me know in the
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
More on: Agentic Coding
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
The Future of Physical AI Isn’t Smarter Robots, It’s Smarter Interfaces
IEEE Spectrum
Data Engineering Without Humans: A Vision for Fully Agentic Cloud Platforms
Medium · AI
Your Studio Is Not a Folder System
Medium · AI
Microsoft Clarity Now Shows Grounding Queries Behind AI Citations via @sejournal, @TaylorDanRW
Search Engine Journal
Chapters (12)
Introduction
0:47
Why CrewAI Coding Agents fail to execute the code
2:03
Prerequisites: Python, VS Code, Docker Desktop, virtual env
3:04
Pip install requirements
3:14
Import packages, LLM API
4:21
CodeInterpreterTool & FileWriterTool
4:31
Agent Definition: Role, Goal, Backstory
5:39
Adding CodeInterpreterTool & FileWriterTool for Agent
7:00
Task & Crew Orchestration
8:23
Live Demo: Running Python Snippets
9:20
CrewAI Agent execute code, Saving Outputs & Files
9:32
Wrap‑Up & Next Steps
🎓
Tutor Explanation
DeepCamp AI