AI Agents for Beginners
A free Microsoft course on GitHub with 18 lessons on building AI agents, each with a written lesson, video and runnable Python code. It covers agent design patterns (tool use, planning, multi-agent, metacognition), agentic RAG, trustworthy agents, context engineering, memory, MCP and A2A protocols, production deployment and security. It suits developers who have used an LLM API but never built something that takes multiple steps on its own.
75.5k
GitHub (microsoft/ai-agents-for-beginners) · Sept 2026
18
GitHub · Sept 2026
50+ languages
GitHub · Sept 2026
MIT
GitHub · Sept 2026
GitHub repo
AI & Machine Learning
Microsoft
11 lessons
Beginner
Free
What the 18 lessons cover
The course has grown well beyond its original set of lessons. As of September 2026:
- Introduction to AI agents and use cases
- Exploring agentic frameworks
- Agentic design patterns
- Tool use
- Agentic RAG
- Building trustworthy agents
- Planning
- Multi-agent systems
- Metacognition (agents that reflect on their own reasoning)
- Agents in production
- Agentic protocols: MCP, A2A and NLWeb
- Context engineering
- Agent memory
- Microsoft Agent Framework
- Computer-use agents that operate a browser
- Deploying scalable agents
- Local AI agents
- Securing AI agents
Lessons 1 to 9 are the core; the later ones are more advanced and can be taken as needed.
What you need
- Basic Python and some experience calling an LLM API.
- A GitHub account to fork the repository.
- Model access. Most samples use the Microsoft Agent Framework with Azure; some can use GitHub Models, OpenAI-compatible providers, or local models (lesson 17). Setting up Azure is the main friction point, so read the setup lesson carefully and check what free credits or student offers you qualify for.
Popularity and upkeep
The repository had about 75,000 GitHub stars as of September 2026, was updated that month, and is translated into more than 50 languages through automated translation. It is MIT licensed.
Why start here
Most agent tutorials show a finished script. This course is organised around design patterns and the questions people skip when rushing: how to design tools an agent can use reliably, when planning actually helps, how to make agents trustworthy, and how to tell whether an agent works. Those ideas transfer to any framework, even though the code uses Microsoft's.
How long it takes
Each lesson is short enough for one sitting. Allow two to three hours per lesson if you run and modify the code, so the core nine lessons fit into two or three weeks part-time.
Getting the most out of it
- After lessons 4 and 5, build a tiny agent of your own with one tool and one retrieval source, using any framework you like.
- Take lesson 11 on MCP and A2A seriously; protocols are how agents connect to real systems.
- Treat lesson 18 on security as required before you deploy anything with real tools.
Common questions
Do I need to pay for Azure? Not necessarily; some samples run with GitHub Models or locally, and Azure has free and student offers. Check the setup instructions for current options.
Is it tied to Microsoft tools? The code is, the concepts are not.
Best for: developers taking their first structured step from calling an LLM to designing agents.
Ready to start?
Opens on Microsoft in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.