# langchain-for-beginners: a ten-chapter course that teaches agents before frameworks

> Microsoft's LangChain for Beginners is a course repository with ten chapters that teach tools first and agents second, ending with deployment to Microsoft Foundry. It is built on LangChain 1.1, and its first chapter is about environment setup rather than code, which tells you what the course assumes about its audience.

**microsoft/langchain-for-beginners** — LangChain for Beginners Course

- Repository: https://github.com/microsoft/langchain-for-beginners
- Stars: 648 · Forks: 217
- Language: Python
- License: MIT
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/microsoft-langchain-for-beginners

## Ten chapters that put tools before agents

The course is described as teaching everything you need to know to start building AI Agents with LangChain, and the chapter table is where the shape of it becomes clear. There are 10 chapters, setup plus 9, and each one is a directory in the repository with a README.

The ordering is the interesting part. Chat models and basic interactions come at chapter 2, prompts, messages and structured outputs at 3, function calling and tools at 4, and agents only at 5. Documents, embeddings and semantic search follow at 7, agentic RAG at 8, and deployment to Microsoft Foundry at 9.

The README explains the reasoning as an agent-first progression. You learn about tools, then agents, then combine them with document retrieval to build agentic RAG systems, and it says this mirrors how modern production AI systems are built.

That ordering is a deliberate argument against the more common path, where a beginner meets an agent abstraction before understanding what a tool call is. Putting function calling and tools at chapter 4 means the agent in chapter 5 arrives as a loop over something already understood. Chapter 3 also introduces Pydantic schemas before tools depend on them, which is the same reasoning applied to types.

Each chapter is described as containing conceptual explanations with real-world analogies, code examples you can run immediately, hands-on challenges to test understanding, and key takeaways.

## Chapter zero is environment setup, and it names its dependencies

The prerequisites section is where a course states its assumptions, and this one is explicit. You should be comfortable with Python fundamentals, meaning variables, functions, objects, async and await, and pip for package installation, and with basic generative AI concepts, which the README says are covered in the GenAI for Beginners course.

The required tools are Python 3.10 or later, a GitHub account, and a code editor, with VS Code recommended, if you are running the course locally.

Chapter 0 is Course Setup, and its key concepts are listed as Python, Azure AI Foundry, Codespaces and environment variables. The mention of Codespaces is the reason the tool list is as short as it is, since a cloud dev container removes the local setup problem.

The dependency set is in `requirements.txt` and it is small enough to read in one go. The LangChain packages are `langchain-openai>=1.1.0`, `langchain-core>=1.1.0`, `langchain>=1.1.0` and `langchain-azure-ai[hosting]>=1.2.8`, with `langchain-mcp-adapters>=0.1.14` for the MCP chapter. The hosting runtime adds `azure-ai-projects>=2.2.0`, and `python-dotenv>=1.2.1` handles environment loading.

So the course is pinned to the LangChain 1.1 line, and the Azure package is the only one with a hosting extra, which is a hint that the deployment chapter is the one that pulls in the platform.

## Two provider options in one .env file, and the difference is billing

The `.env.example` file is short enough to read fully, and it is the clearest statement of what the course expects you to plug in. There are two provider options and the comments label them clearly.

Option 1 is GitHub Models, described in the file as free and good for learning. The four values are a GitHub personal access token, an endpoint of `https://models.inference.ai.azure.com`, a model of `gpt-5-mini`, and an embedding model of `text-embedding-ada-002`. The comment notes that no special scopes are needed, just generate a token.

Option 2 is Microsoft Foundry, described as paid and for production. It is commented out in the example and uses an Azure OpenAI key with an endpoint of `https://your-resource.openai.azure.com/openai/v1`, the same model name, and the same embedding model.

The key design decision is that the two options use the same variable names. The comment says it works with GitHub Models or Microsoft Foundry, just change the values below. That means a chapter's code does not change when you switch, which is what lets the course start free and end on the platform you would actually deploy to.

The file also has a chapter-specific section. It says that when completing chapter 09 you configure the Option 2 values in the repository root `.env` and replace the deployment placeholders, which are a subscription id, a Foundry project endpoint of the form `https://<resource>.services.ai.azure.com/api/projects/<project>`, an Azure AI project id written as a full resource path, and an `AZURE_LOCATIO` line that is truncated in the file available here.

## MCP and agentic RAG are taught as agent capabilities

Two chapters carry most of the modern interest, and both are framed as extensions of an agent rather than as separate technologies.

Chapter 6 is Model Context Protocol, with key concepts listed as MCP servers, stdio transports, tool integration and multi-server patterns. The course description connects AI to external services using the MCP standard, and the `langchain-mcp-adapters` package in the requirements file is what makes that a few lines rather than a protocol implementation. The multi-server pattern is the part worth watching, because an agent that can talk to several MCP servers at once is a different thing from an agent with one hardcoded tool.

Chapter 7 covers documents, embeddings and semantic search, with document loading, chunking, vector embeddings and similarity search. The README describes it as creating search systems that understand meaning, not just keywords.

Chapter 8 is the payoff. Building Agentic RAG Systems is described as building RAG systems where agents intelligently decide when to search documents, and the key concepts are agentic RAG with agents deciding when to search, retrieval tools and intelligent Q&A. That is a meaningfully different architecture from the classic retrieve-then-generate pipeline, where retrieval always happens. Here retrieval becomes a tool the agent can decide to call or skip, and the course places it after both the tools chapter and the agents chapter for exactly that reason.

The course's own summary of what you build lists conversational AI with streaming responses, semantic search, function calling and tools, autonomous agents, MCP integration, agentic RAG and Microsoft Foundry deployment. That list is the curriculum in one paragraph.

## Chapter 9 deploys to Microsoft Foundry, which is where the platform bias shows

The final chapter is Deploy LangChain Agents to Microsoft Foundry, and its key concepts are hosted agents, the Responses protocol, VS Code deployment and the Azure Developer CLI. The course description says you deploy your LangChain agent as a hosted agent with VS Code or Azure Developer CLI.

This is where the repository stops being a neutral LangChain course and becomes a Microsoft one. The deployment target is Microsoft Foundry, the credentials are Azure subscription and resource group values, and the runtime dependency `azure-ai-projects` exists to serve that chapter. The `langchain-azure-ai[hosting]` extra points the same way.

That is not a flaw, it is a scope decision, and it has a practical consequence for anyone taking the course. The agent patterns, the tools, the MCP integration and the agentic RAG chapter are all portable to any LangChain deployment, since they are built on the LangChain abstractions and the `langchain-openai` package. The deployment chapter is not, because it teaches a specific hosted agent runtime with a specific protocol and a specific CLI.

The course also says it is planning to expand over time with additional topics, and the repository has a `GLOSSARY.md` with comprehensive definitions of all terms used throughout, which is a genuinely useful artifact for a course that introduces a lot of vocabulary in a short sequence.

For the supporting material, the README points to a dedicated LangChain Discord channel in the Microsoft Foundry Community Discord for questions about building AI Agents.

## Compared with the framework documentation and with a working reference app

There are two other ways to learn LangChain, and each is better at something this course is not.

The official framework documentation is the authority on what an API does. It is complete, current and organized by API rather than by narrative, and it is where you go when a chapter leaves out a parameter. Its weakness is that it does not tell you what order to learn things in, which is precisely the problem a beginner has. The course's contribution is the sequence and the framing, and the README's claim about the agent-first progression mirrors how modern production AI systems are built is a defensible editorial position rather than a fact about the API.

A working reference application teaches by example. An end-to-end application you can read in one sitting shows how the pieces fit in a real service, with error handling, configuration and deployment already solved, and it stays useful after the tutorial ends. The course's opposite is that every example is small enough to run immediately, and the hands-on challenges mean you write the code rather than copy it.

The middle ground is what this course offers, and the trade is visible in the repository layout. There is no `src/` directory and no application. The top level is the chapter directories, `00-course-setup/` through `09-deploy-to-microsoft-foundry/`, plus `requirements.txt`, a `scripts/` directory, `images/`, a `.devcontainer/`, a `.vscode/` and an `.env.example`. The code lives in the chapters, which is right for a course and wrong for a base to start a project from.

The other thing to weigh is staleness. The packages are pinned to the LangChain 1.1 line and the last push was on 2026-07-23, with the repository not archived. Framework tutorials have a shelf life measured in framework versions, and this one is written against a specific generation of the API.

## Conclusion

Adopt langchain-for-beginners if you are starting from zero with LangChain and want a path that ends in something deployed rather than in a chat demo, and if you are willing to work in Microsoft's hosting stack to get there. Do not adopt it if you need a production reference implementation, since the code lives in per-chapter teaching directories with challenges attached, and do not expect it to stay current with the framework, since the pinned package versions are the 1.1 line. Verify first that the versions in `requirements.txt` still match the LangChain APIs the chapters teach, and that the model you use through the environment variables is one the course's examples cover.

## FAQ

### What is langchain-for-beginners and how long is the course?

It is a Microsoft course repository that teaches the fundamentals of building with LangChain and Python. It contains 10 chapters, setup plus 9, each with conceptual explanations, runnable code examples, hands-on challenges and key takeaways.

### What do I need to run the langchain-for-beginners course?

Python 3.10 or later, a GitHub account and a code editor with VS Code recommended. The README also expects comfort with Python fundamentals including async and await, and with basic generative AI concepts covered by the GenAI for Beginners course.

### Which LangChain packages does langchain-for-beginners use?

The requirements file lists langchain>=1.1.0, langchain-core>=1.1.0, langchain-openai>=1.1.0, langchain-azure-ai[hosting]>=1.2.8 and langchain-mcp-adapters>=0.1.14, plus azure-ai-projects>=2.2.0 for the Microsoft Foundry hosted agent runtime and python-dotenv>=1.2.1.

### Do I need a paid Azure account for langchain-for-beginners?

Not to start. The .env.example offers two provider options, GitHub Models described as free and good for learning, and Microsoft Foundry described as paid and for production. The two use the same variable names, so only the values change, and the paid configuration is only needed for chapter 9.

### What does the MCP chapter cover in langchain-for-beginners?

Chapter 6 teaches connecting AI to external services using the Model Context Protocol standard, with key concepts covering MCP servers, stdio transports, tool integration and multi-server patterns. The langchain-mcp-adapters package provides the integration.

## Sources

- [Issues](https://github.com/microsoft/langchain-for-beginners/issues)
- [License: MIT](https://github.com/microsoft/langchain-for-beginners/blob/main/LICENSE)
- [microsoft/langchain-for-beginners on GitHub](https://github.com/microsoft/langchain-for-beginners)
- [README](https://github.com/microsoft/langchain-for-beginners/blob/main/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/microsoft-langchain-for-beginners
