Annotation Interface AgentListenerSupplier


@Retention(RUNTIME) @Target(METHOD) public @interface AgentListenerSupplier
Marks a method as a supplier of a listener for this agent. The method must be static and return an instance of AgentListener.

Example:


   public interface CreativeWriter {
        @Agent(description = "Generate a story based on the given topic", outputKey = "story")
        String generateStory(@V("topic") String topic);

        @AgentListenerSupplier
        static AgentListener listener() {
            return new AgentListener() {
                @Override
                public void beforeAgentInvocation(AgentRequest request) {
                    requestedTopic = (String) request.inputs().get("topic");
                }
            };
        }
    }