Building secure AI agents with
Quarkus LangChain4j
Radek Kargul & Willem Jan Glerum
Devoxx BE 2025
Workshop
2025/10/06
3
Agentic AI/Quarkus & Langchain4j
Agenda
Outline
Introduction
5
Authentication
11
Retrieval-Augmented Generation (RAG)
13
Guardrails
15
Testing LLM Applications
16
Workshop
17
1
2
3
4
5
6
7
Building secure AI agents with
Quarkus LangChain4j
01
02
03
04
05
//
06
07
2
Introduction
Building secure AI agents with
Quarkus LangChain4j
Radek Kargul
//
3
Introduction
Building secure AI agents with
Quarkus LangChain4j
Willem Jan Glerum
//
4
Agentic AI
Definition
Building secure AI agents with
Quarkus LangChain4j
//
5
Agentic AI
Use Cases
Building secure AI agents with
Quarkus LangChain4j
//
6
Agentic AI
What powers it
Building secure AI agents with
Quarkus LangChain4j
//
7
Quarkus & LangChain4j
Building secure AI agents with
Quarkus LangChain4j
//
8
Why Security Matters for AI Agents (1)
Building secure AI agents with
Quarkus LangChain4j
Agents don’t just answer questions - they take actions.
Risks:
Securing agents is as important as securing any enterprise application.
//
9
Why Security Matters for AI Agents (2)
Building secure AI agents with
Quarkus LangChain4j
Agents don’t just answer questions - they take actions.
Defenses
Securing agents is as important as securing any enterprise application.
//
10
OIDC
What is it?
Building secure AI agents with
Quarkus LangChain4j
//
11
OIDC�The Flow
12 / 17
https://quarkus.io/guides/security-oidc-code-flow-authentication
Retrieval-Augmented Generation (1)
Building secure AI agents with
Quarkus LangChain4j
Why: bring fresh, domain knowledge without fine-tuning
Two steps:
//
13
Retrieval-Augmented Generation (2)
Building secure AI agents with
Quarkus LangChain4j
Ingest: split → embed → store
//
14
Retrieval-Augmented Generation (3)
Building secure AI agents with
Quarkus LangChain4j
Augment: retrieve →inject into prompt
//
15
Retrieval-Augmented Generation (4)
Building secure AI agents with
Quarkus LangChain4j
Keep it simple
Security
//
16
Guardrails
Building secure AI agents with
Quarkus LangChain4j
Validate both input & output before/after the LLM.
Input
Output
//
17
Testing LLM Applications
Building secure AI agents with
Quarkus LangChain4j
//
18
Workshop
Building secure AI agents with
Quarkus LangChain4j
//
19
Workshop
Building secure AI agents with
Quarkus LangChain4j
https://github.com/wjglerum/quarkus-ai-agent-workshop
//
20
Any Questions?
Q & A
Thanks!
Radek Kargul
&
Willem Jan Glerum