Understand the architecture and benefits of code agents that write code to perform tasks, compare them to traditional tool-calling agents, and learn when to use each approach.
We'd like to know you better so we can create more relevant courses. What do you do for work?
Instructors: Thomas Wolf, Aymeric Roucher
Understand the architecture and benefits of code agents that write code to perform tasks, compare them to traditional tool-calling agents, and learn when to use each approach.
Build and deploy secure code agents using Hugging Face’s smolagents, including techniques for sandboxing and safe execution of LLM-generated code.
Design, monitor, and evaluate single and multi-agent systems capable of handling tasks like web browsing, data extraction, and multi-step reasoning.
Learn how to build code agents in Building Code Agents with Hugging Face smolagents, created in collaboration with Hugging Face, and taught by Thomas Wolf, co-founder and CSO, and Aymeric Roucher, Project Lead.
Tool-calling agents use large language models to write out multiple function calls sequentially to complete a complex sequence of tasks. They generate one function call, execute it, observe, reason, and then decide what to do next. Code agents take a different approach. They consolidate all these calls into a single block or snippet of code, letting the LLM lay out an entire plan of action at once. That block can be executed efficiently, providing more reliable results.
In this short course, you’ll learn how to build your own code agents using smolagents, a lightweight agentic framework from Hugging Face. Along the way, you’ll explore real-world use cases, learn how to run LLM-generated code safely, and build an evaluation system that optimizes your code agent for production.
In detail, you’ll learn:
By the end of this course, you’ll know how to build and run code agents using smolagents, understand their advantages over tool-calling agents, and be ready to deploy them safely with a structured evaluation system in your projects.
This course is for anyone interested in agentic workflows, especially those looking to go beyond tool-calling and experiment with LLMs that plan and execute tasks autonomously. Basic Python knowledge and familiarity with LLMs is recommended.
Introduction
A Brief History of Agents
Introduction to Code Agents
Secure Code Execution
Monitoring and Evalutating your Agent
Build a Deep-Research Agent
Conclusion
Course access is free for a limited time during the DeepLearning.AI learning platform beta!
Keep learning with updates on curated AI news, courses, and events, as well as Andrew’s thoughts from DeepLearning.AI!