Skip to content

LearnCourses

Hugging Face

Hugging Face AI Agents Course

Learn how AI agents work and build your own in hands-on units, for developers with basic Python and some LLM knowledge.

Taught by Ben Burtenshaw, Sergio Paniego and 2 more at Hugging FaceFreeCertificateVerified

From Welcome to the course to Final Project - Create, Test, and Certify Your Agent
12 units
The libraries it teaches
Smolagents, LangChain
Before you startBasic knowledge of Python and basic knowledge of LLMs.
All levels
Each unit is planned as one week at 3 to 4 hours
Self-paced
Hugging Face AI Agents CourseFreeOpen the course

What you’ll learn

  • Learn what an agent is: tools, thoughts, actions and observations, plus how LLMs, messages and special tokens work.
  • Build agents with three libraries: smolagents, LlamaIndex and LangGraph.
  • Build an agentic RAG use case with your own retrieval tool and custom tools.
  • Build a final agent, test it on GAIA benchmark questions and compare scores on a student leaderboard.
  • In bonus units, fine-tune an LLM for function calling, monitor and evaluate agents, and build a Pokemon battle agent.

Skills you’ll gain

PythonAgentsFine-tuningLLMsEvaluation

Tools you'll learn

Details to know

  • Certificate of completionFree, after the final challenge
  • Assessments10 quizzes and a final project
  • Taught in English4 languages available
  • VerifiedOct 2026

Lessons

Each unit is planned as one week at 3 to 4 hours

A free Hugging Face course on how AI agents work and how to build them. You start with the theory, then build agents in three libraries, smolagents, LlamaIndex and LangGraph, and finish by entering your own agent in a scored challenge.

Units mix reading with code you run in notebooks or ready-made Hugging Face Spaces, and several include quizzes. Plan on about a week per unit at 3 to 4 hours. Three bonus units cover fine-tuning for function calling, agent monitoring and a Pokémon battle agent.

Here is what each unit covers:

  • Unit 0. Welcome to the course: Create your Hugging Face account, join the Discord and choose audit mode or the certificate path.
  • Unit 1. Introduction to Agents: Learn how an agent uses an LLM, tools and the think, act, observe loop, then build your first one.
  • Unit 2.1 The smolagents framework: Build code agents, tool-calling agents, retrieval agents, multi-agent setups and a browser agent.
  • Unit 2.2 The LlamaIndex framework: Use LlamaHub components, tools, agents and event-driven workflows to build agents over your data.
  • Unit 2.3 The LangGraph framework: Lay out an application's steps as a graph, with an email sorter and a document analysis agent.
  • Unit 3. Use Case for Agentic RAG: Give an agent a guest-list retrieval tool plus web search and weather tools so it can host a gala.
  • Unit 4. Final Project - Create, Test, and Certify Your Agent: Build your own agent, answer 20 GAIA questions through the course API and post your score.
  • Bonus Units 1 to 3: Fine-tune a model for function calling, trace and score agents, and build a Pokémon battle agent.

Applied learning project

The hands-on work runs through the whole course and ends in a scored challenge.

  • Notebooks and Spaces: Run each unit's code in Colab notebooks or Hugging Face Spaces, and share your agents on the Hub.
  • Quizzes: Check yourself with quizzes in Units 1 and 2; passing the Unit 1 quiz earns the fundamentals certificate.
  • Use-case assignment: Apply the course to a real problem you pick; one is needed for the completion certificate.
  • Final challenge: Duplicate the template Space, build an agent for 20 GAIA level 1 questions and compare scores on the student leaderboard.

By the end you can build an agent with tools and retrieval in smolagents, LlamaIndex or LangGraph, and test it on GAIA questions.

Welcome to the courseUnit 1 • 2 lessonsUnit details

What you’ll learn

  • Read the syllabus and choose between auditing the course and working toward the certificates.
  • Create a Hugging Face account, join the course Discord and follow the course organization on the Hub.
  • Set up Ollama to run models on your own machine if you hit hosted usage limits.

Lessons

  1. 1.1Onboarding
  2. 1.2(Optional) Discord 101
How the course works and Q&AUnit 2 • LiveUnit details

What you’ll learn

  • Watch the recorded first live stream on the course scope, units and challenges.
  • Hear the team answer learners' questions about how the course runs.
Introduction to AgentsUnit 3 • 15 lessonsUnit details

What you’ll learn

  • Learn what an agent is and how an LLM, its messages and special tokens drive it.
  • Write tools and follow the thought, action and observation cycle behind the ReAct approach.
  • Build Alfred, your first agent, with smolagents and publish it as a Hugging Face Space.
  • Pass the final quiz to claim the fundamentals certificate.

Lessons

  1. 3.1Introduction
  2. 3.2What is an Agent?
  3. 3.3Quick Quiz 1
  4. 3.4What are LLMs?
  5. 3.5Messages and Special Tokens
  6. 3.6What are Tools?
  7. 3.7Quick Quiz 2
  8. 3.8Understanding AI Agents through the Thought-Action-Observation Cycle
  9. 3.9Thought, Internal Reasoning and the Re-Act Approach
  10. 3.10Actions, Enabling the Agent to Engage with Its Environment
  11. 3.11Observe, Integrating Feedback to Reflect and Adapt
  12. 3.12Dummy Agent Library
  13. 3.13Let’s Create Our First Agent Using smolagents
  14. 3.14Unit 1 Final Quiz
  15. 3.15Conclusion
Frameworks for AI AgentsUnit 4Unit details

What you’ll learn

  • Decide when a plain chain of prompts is enough and when an agent framework helps.
  • List the parts every framework needs: a model, tools, a parser, a system prompt, memory and retries.
The smolagents frameworkUnit 5 • 12 lessonsUnit details

What you’ll learn

  • Weigh smolagents against other frameworks and build code agents that act by writing Python.
  • Build tool-calling agents, write your own tools and share them on the Hub.
  • Add retrieval, combine several agents into one system, and build a vision-driven browser agent.

Lessons

  1. 5.1Introduction to smolagents
  2. 5.2Why use smolagents?
  3. 5.3Quick Quiz 1
  4. 5.4Building Agents That Use Code
  5. 5.5Writing actions as code snippets or JSON blobs
  6. 5.6Tools
  7. 5.7Retrieval Agents
  8. 5.8Quick Quiz 2
  9. 5.9Multi-Agent Systems
  10. 5.10Vision and Browser agents
  11. 5.11Final Quiz
  12. 5.12Conclusion
The LlamaIndex frameworkUnit 6 • 9 lessonsUnit details

What you’ll learn

  • Find and install integrations from LlamaHub and learn the core LlamaIndex components.
  • Turn Python functions and query engines into tools and hand them to agents.
  • Organize multi-step logic as event-driven workflows made of steps and events.

Lessons

  1. 6.1Introduction to LLamaIndex
  2. 6.2Introduction to LlamaHub
  3. 6.3What are Components in LlamaIndex?
  4. 6.4Using Tools in LlamaIndex
  5. 6.5Quick Quiz 1
  6. 6.6Using Agents in LlamaIndex
  7. 6.7Creating Agentic Workflows in LlamaIndex
  8. 6.8Quick Quiz 2
  9. 6.9Conclusion
The LangGraph frameworkUnit 7 • 7 lessonsUnit details

What you’ll learn

  • Learn when LangGraph fits and how state, nodes and edges steer an application's flow.
  • Build an email-sorting workflow that flags spam and drafts replies to real messages.
  • Build a document analysis agent that reads images with a vision model and uses tools.

Lessons

  1. 7.1Introduction to LangGraph
  2. 7.2What is LangGraph?
  3. 7.3Building Blocks of LangGraph
  4. 7.4Building Your First LangGraph
  5. 7.5Document Analysis Graph
  6. 7.6Quick Quiz 1
  7. 7.7Conclusion
Use Case for Agentic RAGUnit 8 • 6 lessonsUnit details

What you’ll learn

  • Build a retrieval tool that answers questions about gala guests from a dataset.
  • Add web search, weather and Hub download stats tools, then combine everything in one agent.
  • Write it in whichever framework you prefer; each step has code for all three.

Lessons

  1. 8.1Introduction to Use Case for Agentic RAG
  2. 8.2Agentic Retrieval Augmented Generation (RAG)
  3. 8.3Creating a RAG Tool for Guest Stories
  4. 8.4Building and Integrating Tools for Your Agent
  5. 8.5Creating Your Gala Agent
  6. 8.6Conclusion
Final Project - Create, Test, and Certify Your AgentUnit 9 • 6 lessonsUnit details

What you’ll learn

  • Learn how the GAIA benchmark tests agents on multi-step questions that need tools.
  • Duplicate the template Space and build an agent that answers 20 level 1 GAIA questions.
  • Submit answers through the scoring API and compare your result on the student leaderboard.
  • Claim the completion certificate once your agent scores 30% or more.

Lessons

  1. 9.1Introduction to the Final Unit
  2. 9.2What is GAIA?
  3. 9.3The Final Hands-On
  4. 9.4Get Your Certificate Of Excellence
  5. 9.5Conclusion of the Course
  6. 9.6What Should You Learn Now?
Fine-tuning an LLM for Function-callingUnit 10 • 4 lessons • BonusUnit details

What you’ll learn

  • Fine-tune a model with LoRA so it calls functions, using new special tokens for thoughts and tool calls.
  • Learn how function calling works inside model APIs.

Lessons

  1. 10.1Introduction
  2. 10.2What is Function Calling?
  3. 10.3Let's Fine-Tune your model for Function-calling
  4. 10.4Conclusion
Agent Observability and EvaluationUnit 11 • 4 lessons • BonusUnit details

What you’ll learn

  • Trace a smolagents agent with OpenTelemetry and track its token costs, latency and errors.
  • Score agents live with user feedback and LLM-as-a-judge, and offline on benchmark sets like GSM8K.

Lessons

  1. 11.1Introduction
  2. 11.2What is agent observability and evaluation?
  3. 11.3Monitoring and evaluating agents
  4. 11.4Quiz
Agents in Games with PokemonUnit 12 • 6 lessons • BonusUnit details

What you’ll learn

  • See how LLMs are used in games today, then build an agent for turn-based Pokémon battles.
  • Launch your agent to play against you or against other agents online.

Lessons

  1. 12.1Introduction
  2. 12.2The State of the Art in Using LLMs in Games
  3. 12.3From LLMs to AI Agents
  4. 12.4Build Your Own Pokémon Battle Agent
  5. 12.5Launching Your Pokémon Battle Agent
  6. 12.6Conclusion
Earn a certificateNo extra cost: a fundamentals certificate when you pass the Unit 1 quiz, and a completion certificate after Unit 1, a use-case assignment and 30% or more on the final challenge.

FAQs

Is Hugging Face AI Agents Course free?

Yes. The course is free.

Open the course

Do I get a certificate?

Yes. No extra cost: a fundamentals certificate when you pass the Unit 1 quiz, and a completion certificate after Unit 1, a use-case assignment and 30% or more on the final challenge.

What do I need before I start?

Basic knowledge of Python and basic knowledge of LLMs.

How long is it?

Each unit is planned as one week at 3 to 4 hours; you take it at your own pace.

See the lessons

Which tools does it teach?

Smolagents: Hugging Face's minimal library for building agents. LangChain: Open-source framework for building AI agents.

See the tools

Who makes it?

Taught by Ben Burtenshaw, Sergio Paniego, Joffrey Thomas and Thomas Simonini at Hugging Face. Recaply lists 2 courses from Hugging Face.

See Hugging Face's courses

More courses

See all
Freeon huggingface.coOpen the course