One Factory Call. Is That an Agent? •
One factory call. Prompt in -> text out. It answers charmingly and does nothing. Is this an agent?
X/Bluesky: @gamussa | @jbaruch
Slide 8
THIS ISN’T AN AGENT.
X/Bluesky: @gamussa | @jbaruch
Slide 9
Let’s build a REAL agent — in Java AND Kotlin.
X/Bluesky: @gamussa | @jbaruch
Slide 10
WHO’S RIGHT? — VOTE 1 An agent is an INTERFACE the framework implements (LC4J) · or an OBJECT you construct (KOOG)? · Type LC4J or KOOG in chat
X/Bluesky: @gamussa | @jbaruch
It Sent It. It Reused the Excuse. • •
A calendar records that you bailed. It does not record the story you told.
X/Bluesky: @gamussa | @jbaruch
Slide 13
WHO’S RIGHT? — VOTE 2 Tools: a REGISTRY the agent owns (KOOG) · or a PROVIDER the framework injects (LC4J)? · Type LC4J or KOOG in chat
X/Bluesky: @gamussa | @jbaruch
Three Burned Flavors. One Fresh One. • •
It names the three burned flavors. It picks a fresh one. Koog: LongTermMemory · LangChain4j: ContentRetriever over an embedding store, seven lines, local ONNX model
X/Bluesky: @gamussa | @jbaruch
Slide 16
WHO’S RIGHT? — VOTE 3 Memory: an ADVISOR wrapping the conversation · or a PROVIDER the agent declares? · Type LC4J or KOOG in chat
X/Bluesky: @gamussa | @jbaruch
Same Phase, Two Languages KOOG
LANGCHAIN4J
val deploy by subgraphWithTask<
interface Deploy {
DeclineRequest, DeclineDeployment>( tools = slices.read + slices.write, llmModel = Gemini3_5Flash,
@Agent(outputKey = “deployment”) DeclineDeployment deploy( @V(“declineRequest”) DeclineRequest
) { request -> “Pick the flavor…” }
r); } // .toolProvider(slices.readWrite())
X/Bluesky: @gamussa | @jbaruch
Slide 20
Four Tool Axes Axis
Tools
Reaches
read
getCalendar, getOrganizerSensitivity
nobody
write
createCalendarEvent
Viktor’s calendar
user
askViktor, pingViktor, awaitApproval
Viktor
comms
sendDecline
Dana. Irreversible.
deploy gets read + write. Neither user nor comms. verify is the only phase that can ask. X/Bluesky: @gamussa | @jbaruch
Slide 21
The A/B JCLAW_NAIVE=1 ./run.sh context ./run.sh
strips recentlyUsedFlavors + the user # the typed handoff carries the constraint
Mode
What happens
Time
naive
stages Family Obligation — burned — critic rejects, refine fixes it
~2m
domain-modelled
ALREADY_PROFICIENT, approved first pass
~90s
X/Bluesky: @gamussa | @jbaruch
Slide 22
“I build AI agents for a living and I am presenting a live conference talk on exactly this topic that afternoon.” It’s true. You are watching it be true.
X/Bluesky: @gamussa | @jbaruch
Slide 23
WHO’S RIGHT? — VOTE 4 When your guardrail framework and the model disagree, who wins? · The FRAMEWORK (tool slices decide) or the MODEL (the critic decides)? · Type LC4J or KOOG in chat
X/Bluesky: @gamussa | @jbaruch
Slide 24
High Score MAY 2026
25%
————————> 100%
SEPT 2026
44%
————-> 77%
The lift shrank. Source: [DATA-01]
X/Bluesky: @gamussa | @jbaruch
x4 x1.75
Slide 25
The Bill with context
######## tokens
baseline
################ tokens
BASELINE: 2.06x THE TOKENS. FOR THE WORSE ANSWER. Source: [DATA-02]
X/Bluesky: @gamussa | @jbaruch
Slide 26
Same Checkpoints. Same App. KOOG
LANGCHAIN4J
Chatbot
AIAgent(…)
AiServices.create(…)
Tools + MCP
McpToolRegistryProvider
McpToolProvider
Memory
LongTermMemory
ContentRetriever
Typed phases
subgraphWithTask<In, Out>
@Agent interface method
Critic loop
subgraphWithVerification
loopBuilder().exitCondition(…)
Approval node
node { awaitApproval }
humanInTheLoopBuilder()
The send
outside the graph
outside the graph
X/Bluesky: @gamussa | @jbaruch
Slide 27
FINAL VOTE — WHO’S RIGHT? LC4J or KOOG. Last chance. Type it in chat.
X/Bluesky: @gamussa | @jbaruch
Slide 28
THE WINNER IS THE JAVA DEVELOPER.
X/Bluesky: @gamussa | @jbaruch
Slide 29
Pick the Language You Love •
Pick the JVM language you love. The agent era is open. Code + slides -> speaking.gamov.io · jbaru.ch/ideaconf-2026-codepocalypse [QR]
X/Bluesky: @gamussa | @jbaruch
Slide 30
15:58 — Basic AI Proficiency Training Declined. Already proficient.
X/Bluesky: @gamussa | @jbaruch
Slide 31
CONTINUE? — As always, have a nice day.
X/Bluesky: @gamussa | @jbaruch
@gamussa · @jbaruch