CrewAI Tutorial: How To Make CrewAI Coding Agent Run and Execute Code Itself

DS-AI with Khanh Vy · Beginner ·🤖 AI Agents & Automation ·1y ago
#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

Related AI Lessons

The Future of Physical AI Isn’t Smarter Robots, It’s Smarter Interfaces
The future of physical AI lies in smarter interfaces, enabling humans to interact with devices more efficiently in various environments
IEEE Spectrum
Data Engineering Without Humans: A Vision for Fully Agentic Cloud Platforms
Learn how fully agentic cloud platforms can revolutionize data engineering by automating tasks and reducing human intervention, increasing efficiency and scalability
Medium · AI
Your Studio Is Not a Folder System
Learn how AI can revolutionize architectural offices by transforming them into intelligent operating systems, enhancing productivity and efficiency
Medium · AI
Microsoft Clarity Now Shows Grounding Queries Behind AI Citations via @sejournal, @TaylorDanRW
Microsoft Clarity reveals grounding queries behind AI citations, showing how AI engines decompose intent in a platform-agnostic way
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
Up next
Hermes Agent OS Is INSANE! 🤯
Julian Goldie SEO
Watch →