Annotation Interface AgenticService


@Target(TYPE) @Introduction @Retention(RUNTIME) @Documented public @interface AgenticService
Registers a LangChain4j declarative agentic service using AgenticServices.createAgenticSystem(Class, ...). Apply on an interface that declares methods annotated with dev.langchain4j.agentic.Agent (and optionally @UserMessage, @V) and workflow annotations as described in LangChain4j Agentic docs. Chat models, memory and tools are wired via Micronaut DI; no sub-agent array is required.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of a configured AI model to use (qualifier).
    The agent output key.
    Class<?>[]
    Tool types to include for this agent.
    Defines the service name.
  • Element Details

    • value

      @AliasFor(annotation=jakarta.inject.Named.class,member="value") @AliasFor(member="named") String value
      Defines the service name. Same as named().
      Returns:
      The service name
      Default:
      ""
    • named

      @AliasFor(annotation=jakarta.inject.Named.class, member="value") String named
      The name of a configured AI model to use (qualifier). Typically matches a ChatModel bean name configured via other Micronaut-LangChain4j modules.
      Returns:
      The model bean name (qualifier)
      Default:
      ""
    • tools

      Class<?>[] tools
      Tool types to include for this agent. An empty array means no tools will be registered explicitly.
      Returns:
      The tool types
      Default:
      {}
    • outputKey

      String outputKey
      The agent output key.
      Returns:
      the output key
      Default:
      ""