World Congress 2026 Europe

How does a Java agent work? Building a Java agent from scratch.

July 8, 2026 16:00 – 18:00 · 120 min Room M4 (40 Seats)

What this session covers

Java agents let you modify application behavior at runtime without changing source code. In this hands‑on workshop, you’ll build a small Java agent from scratch using the Instrumentation API and Byte Buddy. We’ll cover premain vs. attach, class transformers, method interception, and safe argument/return value capture. You’ll see how compiled classes look in bytecode (via javap) and how to reason about performance and classloader/module quirks in modern JDKs. By the end, you’ll have a working agent that times and logs specific methods in a sample app, plus a mental model to understand how tools like OpenTelemetry auto‑instrumentation plug into your services.

Many developers have used a Java agent before, be it in your mocking frameworks, to find a memory leak, or maybe you have some sort of tracing on your backend via OpenTelemetry. But what is a Java Agent, and how does it function? Would you like to know how to manipulate run-time code and achieve things that are impossible otherwise?

In my day-to-day job, I mainly work with Java agents, and in this workshop, I will show you what an agent can do, how they work, and how you can write one yourself.

You’ll build a small Java agent from scratch using the Instrumentation API and Byte Buddy. We’ll cover how to attach your agent, the class transformers, method interception, and argument and return value capture.

In the end, you will know how tools like OTEL work and have a better understanding of observability.

Related talks at this congress

Open session

World Congress 2026 Europe

July 9, 2026 · 14:50–15:20

Stage 7

Building the Future of Java: AI Agents, MCP, and Next-Gen App Development

Daniel Oh

Senior Principal Developer Advocate at IBM

Daniel Oh
Open session

World Congress 2026 Europe

July 10, 2026 · 14:45–16:45

Room Ulm (35 Seats)

Context > Models: How to make your agents truly intelligent

Florian Wagner, Marc Teipel

Florian Wagner
Marc Teipel
Open session

World Congress 2026 Europe

July 10, 2026 · 15:00–15:30

Stage 7

When Agents Meet Legacy: Never Change a Running System

Michael Friedrich

Principal Developer Advocate at GitLab

Michael Friedrich
Open session

World Congress 2026 Europe

July 10, 2026 · 15:00–15:30

Stage 8 - powered by Red Hat

Swapping Code, Losing Memory: A JVM Deep Dive

Marco Sussitz

Senior Software Developer at Dynatrace

Marco Sussitz
All sessions at this congress