🔸 TLDR
At XtremeJ 2026, Buhake Sindi, Jozi-JUG organizer from Johannesburg 🇿🇦, presented how LangChain4J-CDI maps 1️⃣2️⃣ agent topologies to dedicated CDI annotations.
The idea is simple:
▪️ Pick an agentic pattern
▪️ Annotate your interface
▪️ Let LangChain4J-CDI generate the implementation
▪️ Inject it into your application with CDI
🔸 THE 1️⃣2️⃣ AGENT TOPOLOGIES
1️⃣ SIMPLE
@RegisterSimpleAgent
One agent handling one defined responsibility.
2️⃣ SEQUENCE
@RegisterSequenceAgent
Agents execute in a fixed order, with one result feeding the next.
3️⃣ PARALLEL
@RegisterParallelAgent
Multiple agents can execute independent tasks concurrently.
4️⃣ PARALLEL_MAPPER
@RegisterParallelMapperAgent
Apply agent processing in parallel across multiple inputs.
5️⃣ CONDITIONAL
@RegisterConditionalAgent
Route execution toward agents according to activation conditions.
6️⃣ LOOP
@RegisterLoopAgent
Repeat an agent or workflow until an exit condition is reached.
7️⃣ SUPERVISOR
@RegisterSupervisorAgent
A supervisor dynamically decides which specialized agents to invoke.
8️⃣ PLANNER
@RegisterPlannerAgent
Build a plan before coordinating the required agent actions.
9️⃣ HUMAN IN THE LOOP 👤
@RegisterHumanInTheLoopAgent
Pause automation when human validation or input is required.
🔟 A2A 🔗
@RegisterA2AAgent
Connect agents through Agent-to-Agent communication.
1️⃣1️⃣ MCP CLIENT 🔌
@RegisterMcpClientAgent
Integrate external capabilities exposed through MCP.
1️⃣2️⃣ DECISION 🧠
@RegisterDecisionAgent
Select the appropriate path or action according to the workflow context.
🔸 WHY IT MATTERS
Instead of writing orchestration infrastructure manually, Java developers can describe the topology declaratively.
That makes agentic workflows feel much closer to familiar Jakarta CDI development:
annotation → CDI bean → injection → business logic.
And LangChain4J-CDI goes further with enterprise concerns such as configuration, resiliency and observability.
🔸 TAKEAWAYS
▪️ Agentic AI is not limited to one autonomous agent.
▪️ LangChain4J provides several orchestration patterns for different problems.
▪️ LangChain4J-CDI exposes those patterns through familiar Java annotations.
▪️ CDI makes agents composable and injectable into existing enterprise applications.
▪️ Java's AI ecosystem is moving rapidly from simple LLM calls toward structured multi-agent systems. 🤖☕
#Java #LangChain4J #LangChain4JCDI #AgenticAI #AI #JavaAI #JakartaEE #CDI #MCP #A2A #GenerativeAI #XtremeJ #JoziJUG #SoftwareArchitecture
Go further with Java certification:
Java👇
Spring👇
SpringBook👇
JavaFullstackBook👇