New Course: Agentic AI with Python
LangChain4j One Shot

Getting Started

Follow the Telusko LangChain4j full course in one shot, chapter by chapter - from what an LLM is, through AI Services, memory, tools and MCP, to agents and a complete agentic project in Java.

Welcome to the LangChain4j One Shot Docs.


This section is the written companion to one video: the LangChain4j Full Course in One Shot by Hyder Abbas on the Telusko channel. The video is five hours long and has 37 chapters. These docs follow it in the same order, one page for each topic, with the code, the output and the mistakes that happen on the way.

You can use the pages in three ways:

  • With the video. Every lesson page starts with the video at the right moment. Watch a chapter, then read the page to fix it in your mind and to copy the code.
  • Without the video. Each page is complete by itself. The code is written out in full, so that you do not have to pause and type from the screen.
  • As a reference later. Every page ends with a table of mistakes and their fixes, and with exercises.

What the course builds up

The course does not start with LangChain4j. It starts with what a model is, then calls a model with nothing except the JDK, and only then brings in the library. By that time you know exactly what the library does for you.

PartWhat you learnPages
1. AI and LLM fundamentalsWhat AI, LLMs, tokens, embeddings and transformers are, and why models hallucinate7
2. Calling LLMs from JavaAn API key, a raw HTTP call from core Java, the official OpenAI Java SDK3
3. LangChain4j in practiceChatModel, AI Services, prompt templates, structured output, streaming, REST APIs, memory, tools9
4. MCP and local modelsThe Model Context Protocol, an existing MCP server, your own MCP server, response metadata, Ollama5
5. Agentic AIAgents, multi-agent systems, workflows, supervisors, and the final project6

The chapters, with their pages

The time in the second column is where the topic starts in the video.

Part 1: AI and LLM fundamentals

PageStarts atChapters of the video
AI, ML, Deep Learning and Generative AI0:02:09What is AI, ML, DL and Generative AI. Neural Networks Explained
NLP and How It Evolved0:14:39What is NLP and Why Does It Matter. The Evolution of NLP
LLMs, Tokens and the Context Window0:24:20What is a Large Language Model. Tokens. Context Window Explained
Embeddings, Vectors and Dimensions0:34:29Embeddings, Vectors and Dimensions
Transformers and Attention0:42:15Transformers. Attention Mechanism. How LLMs Actually Work
Open and Closed Models0:57:11Open Models vs Closed Models
Hallucinations1:06:37Hallucinations Explained

Part 2: Calling LLMs from Java

PageStarts atChapter of the video
Setup for Java AI Applications1:10:34Setup for Java AI Applications
Calling an LLM from Core Java1:16:01Call an LLM from Core Java, No AI Framework
Using the OpenAI Java SDK1:27:08Call OpenAI from Java using the Official Java SDK

Part 3: LangChain4j in practice

PageStarts atChapter of the video
Your First LangChain4j Application1:35:02Your First LangChain4j Application
ChatModel Configuration1:44:21ChatModel Configuration, Temperature and Prompts
AI Services1:54:21LangChain4j AI Services
Prompt Templates2:02:58Prompt Templates in LangChain4j
Structured Output2:12:11Structured Output with LangChain4j
Streaming Responses2:23:23Streaming LLM Responses with LangChain4j
Building AI REST APIs2:32:01Build AI REST APIs Using ChatModel and AI Services
Chat Memory2:45:21Chat Memory with LangChain4j
Tool Calling2:54:06Tool Calling with LangChain4j

Part 4: MCP and local models

PageStarts atChapter of the video
MCP Explained3:03:50MCP Explained, Architecture and How It Works
Connecting to a Filesystem MCP Server3:13:49MCP, Connect AI to a Filesystem MCP Server
Building Your Own MCP Server3:26:30Build Your Own MCP Server in Java and access it in app
Response Metadata and Token Usage3:47:07LangChain4j Response Metadata and Token Usage
Running LLMs Locally with Ollama3:56:16LangChain4j with Ollama, Run LLMs Locally

Part 5: Agentic AI

PageStarts atChapter of the video
AI Agents vs Agentic AI4:03:34AI Agents vs Agentic AI Introduction
Your First AI Agent4:09:53Build Your First AI Agent with LangChain4j
Multi-Agent Systems4:17:28Multi-Agent Systems, Two Agents Working Together
Agentic Workflows4:26:58Agentic Workflows Demo
Supervisor Agents4:33:44Agentic AI Workflows, Supervisor Agents
Project: AI Course Support Assistant4:44:51Project: AI Course Support Assistant

What you need

RequirementDetails
Java knowledgeCore Java: classes, interfaces, records, lambdas, and Maven projects. Spring Boot basics for the REST API lesson only
JDK21 is used in the video. LangChain4j needs 17 or newer
IDEIntelliJ IDEA is used in the video. Any Java IDE works
An OpenAI API keyWith a small amount of credit. The setup lesson shows every step. The cost of the whole course is small, because the examples are short
Node.jsOnly for the filesystem MCP lesson
OllamaOnly for the local model lesson. It can also replace OpenAI in most examples if you do not want to pay for an API

No knowledge of AI or machine learning is expected. Part 1 starts from zero.


The projects of the course

The video works in several small Maven projects. Most of them are plain Java with a main method, so that nothing hides the code that talks to the model.

Project in the videoUsed for
first-app-llmThe raw HTTP call from core Java
first-lc4jThe first LangChain4j call, configuration and AI Services
lc4j-demoPrompt templates, structured output and streaming
lc4j-springbootThe REST API with Spring Boot
lc4j-chat-memory-java21Chat memory, and then tool calling
mcp-filesystem-starterThe MCP client, for both MCP servers
course-mcp-server-starter-java21Our own MCP server
lc4j-response-metadata-starter-java21Response metadata
lc4j-ollama-starterThe local model
first-ai-agent, multi-agent-demoAgents, workflows and the supervisor
ai-course-support-assistant-starter-java21The final project

From the chat memory lesson on, the instructor opens prepared starter projects and fills in the important parts. The pages show every file in full, so you can create the same projects yourself. All you need each time is a Maven project with the dependencies listed on the page.


About the versions

The first LangChain4j projects of the video use version 1.20.0. The prepared starter projects of the later lessons use 1.18.1, and for the MCP and agentic modules the matching version with a -beta suffix, 1.18.1-beta28. The Spring Boot starters carry such a suffix too. The video does not show their version number, so the REST API page names the one that was tested for these docs. Each page names the version it uses.

LangChain4j moves quickly, and the agentic module is marked as experimental by its authors. If something in a newer version looks different from a page, the official documentation linked at the bottom of every page is the place to check.


How these docs were checked

A mistake in a lesson costs a learner time, so the code on these pages was not only copied from the screen.

  • Compiled. The Java code of every lesson was compiled against the LangChain4j versions used in the video.
  • Run. No OpenAI key was used for these docs. The examples were run with local models through Ollama, with the model class swapped and everything else unchanged. Each page says in a box named "Checked for these docs" what was run and what was observed.
  • Compared. Outputs that are shown as coming from OpenAI are the ones visible in the video. Statements about how LangChain4j behaves were checked against the official documentation.

Where the video does not show a piece of code, the page says so and marks what was completed. Where a run for these docs behaved differently from the video, the page reports both.



Start here

Begin with AI, ML, Deep Learning and Generative AI. If you already know how LLMs work and want to write code at once, jump to Setup for Java AI Applications.


Written By: Shramik Masti

How is this guide?

Last updated on