Skip to content

LangChain4J CDI 1.3.0

Choose a tag to compare

@github-actions github-actions released this 19 May 12:23
· 36 commits to main since this release

Dependency Upgrades

  • LangChain4j core: 1.14.1 → 1.15.0
  • LangChain4j Agentic: 1.14.1-beta24 → 1.15.0-beta25
  • LangChain4j Community: 1.14.1-beta24 → 1.15.0-beta25

New Agent Topologies

Three new agent topologies have been added, bringing the total from 8 to 11:

Topology Annotation Description
PARALLEL_MAPPER @RegisterParallelMapperAgent Maps a list of items over a single sub-agent, executing each mapping in parallel
MCP_CLIENT @RegisterMcpClientAgent Wraps an MCP server tool as an agent
HUMAN_IN_THE_LOOP @RegisterHumanInTheLoopAgent Injects a human-in-the-loop step that pauses execution and waits for human input

Breaking Change: Typed Agent Annotations

The single generic @RegisterAgent annotation has been replaced by 11 dedicated per-topology annotations, each carrying only the attributes relevant to its topology:

Annotation Topology
@RegisterSimpleAgent Simple single-step agent
@RegisterSequenceAgent Sequential pipeline
@RegisterLoopAgent Iterative loop
@RegisterParallelAgent Parallel fan-out
@RegisterParallelMapperAgent Parallel with input mapping (new)
@RegisterConditionalAgent Conditional branching
@RegisterSupervisorAgent Supervisor-orchestrated
@RegisterPlannerAgent Plan-then-execute
@RegisterA2AAgent Agent-to-Agent protocol
@RegisterMcpClientAgent MCP client (new)
@RegisterHumanInTheLoopAgent Human-in-the-loop (new)

Migration: Replace @RegisterAgent(topologyType = AgentTopologyType.SIMPLE, ...) with @RegisterSimpleAgent(...) (and likewise for every other topology). The @RegisterAgent annotation and its RegisterAgentValidator have been removed.

This change moves validation from runtime to compile time — invalid attribute combinations are now caught by the compiler rather than at deployment.

Bug Fix: Combined tools and toolProviderName on @RegisterAIService

Previously, specifying both tools and toolProviderName on a @RegisterAIService annotation caused one to be silently ignored. Both attributes are now applied together when present. Users should ensure tool names do not overlap across the two sources — LangChain4j will throw
IllegalConfigurationException at runtime if the same tool name appears more than once. (Fixes #208)

Full Changelog: 1.2.0...1.3.0