/Learn

Intermediate · 155 minutes

Building AI Chat Agents with LangChain and Chainlit

Build a streaming chat agent with a browser UI, give it a real weather tool, and connect remote MCP tools, using a free Groq API key.

5 modules 155 minutes 500 points By Sammy Deprez
Outcomes

What you will learn

  • Create an isolated Python environment and install a pinned, reproducible dependency set
  • Connect to Groq through an OpenAI-compatible client
  • Build a Chainlit chat app with streaming responses and conversation memory
  • Convert the app to a LangChain agent with create_agent
  • Define a typed tool with the @tool decorator and show tool calls in the UI
  • Connect remote MCP tools and combine them with local tools

Before you start

  • A free Groq API key, which you can create without a credit card
  • Python 3.10 through 3.13, Git, a terminal, and a code editor such as Visual Studio Code
  • No previous LangChain, Chainlit, or agent experience required
Curriculum

Course modules

1

Set up your workshop

Create an isolated Python environment, install pinned dependencies, and prove you can reach Groq.

3 pages · 3 questions
2

Chat with Chainlit

Turn the model connection into a browser chat app, then add streaming replies and conversation memory.

2 pages · 3 questions
3

Meet the agent

Replace direct model calls with a LangChain agent created by create_agent, and prepare it for tools.

1 pages · 2 questions
4

Add tools

Define a typed weather tool with the @tool decorator and show the agent's tool calls in the chat UI.

2 pages · 3 questions
5

Connect MCP tools

Fetch tools from a remote MCP server and combine them with your local weather tool in one agent.

2 pages · 3 questions