ai-agents-for-beginners
by microsoft
Free Microsoft course of 18 lessons that teaches beginners how to build AI agents.
- Stars
- 80,934 stars
- Forks
- 26k forks
- Last push
- 8 days ago
- Activity
- Active
# Clone without the translations$ git clone --filter=blob:none --sparse https://github.com/microsoft/ai-agents-for-beginners.git
cd ai-agents-for-beginners
git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'# Install the Python packages$ pip install -r requirements.txtCommands from the project's README. Run them after installing (see below).
Overview
Understand ai-agents-for-beginners in 60 seconds
- What it does
- AI Agents for Beginners is a free Microsoft course on building AI agents. Its 18 lessons each have a written lesson, a short video and Python code samples, covering design patterns, tool use, agentic RAG, multi-agent systems, memory, protocols and production.
- The problem it solves
- Getting started with agents means learning many new patterns and frameworks at once. This course breaks them into standalone lessons you can take in any order, with runnable notebooks for each.
- Why choose it
- Choose it for a well-produced, free agent course with videos and code. The samples use Microsoft Foundry, which needs an Azure account; some also support other OpenAI-compatible providers.
- Who should use it
- Beginners building their first AI agents
- Developers learning Microsoft Agent Framework
- Students and educators wanting a free course
- Learners in 50+ languages via translations
- Setup difficulty
You'll need:
- Python 3.12+
- An Azure subscription and Microsoft Foundry project for the code samples
- Azure CLI for authentication
- Optional: .NET 10 SDK for the .NET samples
How ai-agents-for-beginners works
The course has 18 lessons: intro to agents, agentic frameworks, design patterns, tool use, agentic RAG, trustworthy agents, planning, multi-agent, metacognition, agents in production, agentic protocols (MCP, A2A and NLWeb), context engineering, agent memory, Microsoft Agent Framework, computer use agents, deploying scalable agents, local AI agents and securing agents.
Each lesson has a README, a short video for most lessons, and Jupyter notebooks named *-python-agent-framework.ipynb. The code uses Microsoft Agent Framework with Microsoft Foundry Agent Service V2, so you need a Foundry project with a deployed model such as gpt-5-mini.
The repository includes translations into 50+ languages, which makes it large; the README gives a sparse clone that skips them. GitHub Codespaces is recommended to avoid big local downloads, and there is a Discord for help.
Features
Key features
18 lessons
From agent basics to production and security.
Videos
Short videos for most lessons.
Python notebooks
Microsoft Agent Framework code for each lesson.
Design patterns
Tool use, planning, multi-agent and metacognition.
Protocols
MCP, A2A and NLWeb explained.
50+ languages
Translated with Co-op Translator.
Strengths
- Free, polished course from Microsoft
- Lessons are standalone
- Videos and code together
- MIT licensed
Limitations
- Code samples are built on Microsoft Foundry and need an Azure account
- Azure model usage can cost money
- Full repository is large (about 3 GB with history)
Practical use cases
Learn agent patterns
Study tool use, planning and multi-agent lessons.
Workshop material
Use a shallow clone in Codespaces for a class.
Try Microsoft Agent Framework
Run the notebooks against your Foundry project.
Installation
Install ai-agents-for-beginners
Commands come from AI Agents for Beginners's README and course setup guide. AIRepoHub hasn't run them yet. View source
Prerequisites
- Python 3.12+
- Git
- Azure subscription and Azure CLI
Supported systems
- Windows
- macOS
- Linux
- 1
Clone without translations
Shellgit clone --filter=blob:none --sparse https://github.com/microsoft/ai-agents-for-beginners.gitcd ai-agents-for-beginnersgit sparse-checkout set --no-cone '/*' '!translations' '!translated_images' - 2
Create a Python 3.12 virtual environment
Shellpython -m venv venvsource venv/bin/activate - 3
Install requirements
Shellpip install -r requirements.txt - 4
Sign in to Azure
Install the Azure CLI, then set up a Microsoft Foundry project with a deployed model as described in 00-course-setup.
- 1
Create a Codespace
Recommended to avoid large local downloads; then shallow or sparse clone the lesson folders you need.
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 1
Read lesson 01, Intro to AI Agents and Agent Use Cases
ai-agents-for-beginners's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Set up the course and run a lesson notebook
Get the code samples running against Microsoft Foundry.
Before you start
- Python 3.12+
- Azure subscription
- Azure CLI
- 1
Clone the course
Shellgit clone --filter=blob:none --sparse https://github.com/microsoft/ai-agents-for-beginners.gitcd ai-agents-for-beginnersgit sparse-checkout set --no-cone '/*' '!translations' '!translated_images' - 2
Install packages
Shellpip install -r requirements.txt - 3
Create a Foundry project
Deploy a model such as gpt-5-mini, following 00-course-setup.
- 4
Open a lesson notebook
Run a *-python-agent-framework.ipynb notebook in VS Code with the right Python selected.
What to expect
A lesson notebook runs an agent through Microsoft Agent Framework against your Foundry model.
Next steps
- Continue with Tool Use and Agentic RAG
- Join the Discord for help
- Try Generative AI for Beginners if you are new to GenAI
Costs and requirements
What it costs to run
- License
- MIT. Free to use and share.Free
- Course
- Free.Free
- Azure
- Microsoft Foundry model usage is billed to your Azure subscription.Paid
- Codespaces
- Optional; GitHub may bill usage depending on your plan.Depends
Troubleshooting
Common setup issues
Clone is very slow or huge
Use the sparse clone that skips translations, or a shallow clone with --depth 1.
Wrong package versions installed
Create the virtual environment with Python 3.12 as the setup guide notes.
Stuck on setup
Ask in the AI Agents for Beginners Discord channel.
Alternatives
Similar AI repositories
ECC
affaan-m
Add-on system for Claude Code, Codex, Cursor and similar coding agents that adds skills, memory and security checks.
deepseek-harness
deepseek-ai
Plugin-based harness from DeepSeek for running AI agents, where every feature is added as a plugin.
hermes-agent
NousResearch
Personal AI agent from Nous Research that learns and improves the more you use it.
firecrawl
firecrawl
API that lets AI agents search, scrape and read web pages and other data sources through one service.