Some features were added to the langchain4j-agent component recently. We should add coverage here, primarily to check that they work in native mode.
1. Structured output
Test the two endpoint options:
outputClass — derives a JSON schema from a Java POJO class
jsonSchema — loads a JSON schema from a classpath resource, file, or inline string
2. AgentConfiguration auto-provisioning mode for langchain4j-agent
All existing langchain4j-agent integration tests create pre-built Agent beans via CDI @Produces methods and reference them with agent=#beanName. The alternative — and simpler — approach where users set agentConfiguration on the endpoint and Camel automatically creates an AgentWithMemory or AgentWithoutMemory based on whether a ChatMemoryProvider is present is not currently tested.
3. MCP server configuration
The langchain4j-agent component supports declarative MCP server definitions via multi-value endpoint URI options (e.g. mcpServer.myServer.transportType=http&mcpServer.myServer.url=...). This allows users to configure MCP servers without writing CDI producer methods.
Currently only pre-built McpClient beans are tested (via the stdio transport with npx). The inline mcpServer.* configuration path — which involves runtime materialization of LangChain4jMcpServerDefinition objects and transport construction — is untested.
Some features were added to the langchain4j-agent component recently. We should add coverage here, primarily to check that they work in native mode.
1. Structured output
Test the two endpoint options:
outputClass— derives a JSON schema from a Java POJO classjsonSchema— loads a JSON schema from a classpath resource, file, or inline string2.
AgentConfigurationauto-provisioning mode for langchain4j-agentAll existing
langchain4j-agentintegration tests create pre-builtAgentbeans via CDI@Producesmethods and reference them withagent=#beanName. The alternative — and simpler — approach where users setagentConfigurationon the endpoint and Camel automatically creates anAgentWithMemoryorAgentWithoutMemorybased on whether aChatMemoryProvideris present is not currently tested.3. MCP server configuration
The
langchain4j-agentcomponent supports declarative MCP server definitions via multi-value endpoint URI options (e.g.mcpServer.myServer.transportType=http&mcpServer.myServer.url=...). This allows users to configure MCP servers without writing CDI producer methods.Currently only pre-built
McpClientbeans are tested (via the stdio transport withnpx). The inlinemcpServer.*configuration path — which involves runtime materialization ofLangChain4jMcpServerDefinitionobjects and transport construction — is untested.