All Classes and Interfaces

Class
Description
Configuration for a named agentic service agent.
Configuration for agent chat memory.
Registers a LangChain4j declarative agentic service using AgenticServices.createAgenticSystem(Class, ...).
Factory for building LangChain4j agentic service proxies.
Definition of an Agentic service (typed agent) to be created.
Interceptor that builds and caches a LangChain4j declarative agentic service instance from an interface annotated with AgenticService.
Registry caching built agent proxies per agent interface.
Registers an AI service.
The default no-op customizer.
Configuration of the AI services.
A context object when an AiService is created.
Interface that allows customization the creation of AiServices.
Models a AiService definition.
An AI services factory.
 
Interceptor implementation for register AI service.
 
Adds the AllowsReflection stereotype to the LangChain4j annotations that LangChain4j reads reflectively from the Java class (@SystemMessage, @UserMessage, @V, @Agent, @SequenceAgent, @Description, ...), so that a compiler generating the Java class for a declaration written in another language (the Python compiler) copies them onto the generated class without the user declaring @AllowsReflection or the micronaut.introspection.allow-reflection option.
The @Agent annotation.
The declarative agentic annotations: @SequenceAgent, @ParallelAgent, @Output, ...
The annotations of AI services: @SystemMessage, @UserMessage, @V, @MemoryId, ...
The @Description annotation of the structured outputs.
The tool annotations: @Tool, @P, @ToolMemoryId, ...
Sends the audio file at the URL of a parameter of an AiService method to the model, as a AudioContent, together with the user message.
 
Configuration for CassandraChatMemoryStore.Builder.
 
Configures the default ChatMemoryProvider of the AI services: the chat memory store the conversations are kept in, and how the memory evicts old messages.
How the memory evicts old messages.
Makes the CompensateFor methods executable, so that the tool registry finds them without reflection and reports that their compensating actions are not registered.
Configures a EmbeddingStoreContentRetriever that retrieves the segments of an embedding store relevant to the user message.
Registers a LangChain4j decision service: an interface whose methods are answered by a DecisionModel, created with DecisionServices.
Implements the DecisionService interfaces with LangChain4j's DecisionServices.
 
Assertions of evaluation results.
Captures the prompt, optional context, and generated response for an evaluation.
Represents the result of an evaluation.
A sample of an evaluation: the input sent to the AI service, with the optional context that the response must be grounded in and the optional expected response, loaded from a sample file by EvaluationSamples.
Loads evaluation samples from a YAML (or JSON) file of the classpath: a list of samples, or a map with a samples list.
Provides the evaluation samples of a classpath file to a JUnit ParameterizedTest, one invocation per sample.
Evaluates an AI response against a request.
A LangChain4j ToolExecutor that invokes a Tool method of a bean through its Micronaut ExecutableMethod, with a ToolSpecification built from the compile-time annotation metadata and argument names of the method.
Evaluates whether the generated response is grounded in the supplied context.
 
 
 
Configures the Google Gen AI Client shared by the Google Gen AI models: the Gemini API with an API key, or Vertex AI with a project, a location and the application's GoogleCredentials.
Utility class to create ImageContent instances.
Sends the image at the URL of a parameter of an AiService method to the model, as a ImageContent, together with the user message.
Configures the ingestion of documents into an embedding store: the documents are loaded from the sources, split into segments, embedded with the embedding model and stored.
Configuration for the creation of InMemoryChatMemoryStore instances.
Configuration for in-memory stores.
Factory for in-memory stores.
Configures a JDBC SQLChatMemoryStore for a data source.
The SQL dialects.
 
Identifies chat models that accept a JSON schema response format on each request although they do not declare Capability.RESPONSE_FORMAT_JSON_SCHEMA.
Generates the code necessary to integrate a LangChain4j model provider.
Add configuration for the given model.
Configuration for an individual property.
 
 
Configuration for MessageWindowChatMemory.
ConfigurationProperties for MessageWindowChatMemoryConfiguration.
Utility class to obtain instances of MessageWindowChatMemory.Builder.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Provides the credentials of each request that a model sends with the Micronaut HTTP client, for example a token of the current user or a short-lived token in place of the API key of the model configuration.
A request of a model, passed to the ModelAuthProvider beans.
 
Configures a MongoDB chat memory store, with the database-name, collection-name and expire-after-seconds properties.
Configures for MongoDbEmbeddingStore.
Writes the GraalVM native image metadata (META-INF/native-image/.../reachability-metadata.json) of the types LangChain4j still reads and implements reflectively: the AI service interfaces, which LangChain4j implements with Proxy and whose methods, annotations and parameters it reads reflectively, and the agentic services and agents, which LangChain4j also implements with proxies combining the agent type with its own interfaces and whose static @Agent, @Output, @ExitCondition, ...
Configuration for Neo4jChatMemoryStore.Builder.
 
 
 
 
Configuration for OracleChatMemoryStore.Builder.
Configures for OracleEmbeddingStore.
Factory for PgVector embedding store.
Sends the PDF file at the URL of a parameter of an AiService method to the model, as a PdfFileContent, together with the user message.
Configures for PgVectorEmbeddingStore.
Factory for PgVector embedding store.
Base class for evaluators that use a judge model.
Qdrant utility class.
 
Configuration for RedisChatMemoryStore.Builder.
 
Verifies the GraalVM reachability metadata a provider module ships for the LangChain4j types that are mapped with Jackson reflectively (the request and response types of the provider's REST API).
Evaluates whether the generated response is relevant to the user request.
The JSON schemas of the structured outputs of one AI service or agent, keyed by the name LangChain4j gives the schema of the response format (the simple name of the return type, or List_of_<Type> for a list).
Configures a DefaultRetrievalAugmentor that retrieves content from one or more content retrievers and, with a scoring model, re-ranks it.
Resolves the retrieval augmented generation (RAG) configuration of an AI or agentic service.
Configures a RoutingChatModel: a ChatModel bean that sends each request to one of several chat models, chosen by a ChatModelRouter.
A chat model for tests that answers each request with the first matching rule, and records the requests.
The answer of a rule.
Builds the rules of a ScriptedChatModel, evaluated in order.
When Micronaut Serialization is on the annotation processor path, imports into it (@SerdeImport) the records LangChain4j maps to and from JSON: the structured outputs of the AI services and agents, and the parameters and results of the tools, with the records they are made of.
Registers the SerdeJsonCodec as LangChain4j's general purpose JSON codec (dev.langchain4j.internal.Json), ahead of other factories.
Configures a set of Agent Skills, exposed as a LangChain4j Skills bean named after the configuration, and offered to the AI services that select it with AiService.skills().
Configuration of the structured outputs backed by generated JSON schemas.
Supplies the JSON schema sent to the chat model when an AiService or agent method returns the given type, instead of the schema LangChain4j derives reflectively.
Configures the AI services and agents whose methods return a type with a schema supplied by a StructuredOutputSchemaProvider (by default, a type annotated with io.micronaut.jsonschema.JsonSchema), so that this schema is sent to the chat model as the structured output format.
 
Lets AI service methods return a Reactive Streams Publisher<String>, the reactive type of the Micronaut APIs, with any streaming chat model: the partial responses are streamed like with Reactor's Flux<String>, which langchain4j-reactor supports and which is the Publisher returned.
 
Register of tools.
Sends the video at the URL of a parameter of an AiService method to the model, as a VideoContent, together with the user message.