Interface AgentListener

All Known Implementing Classes:
AgentMonitor, ComposedAgentListener

public interface AgentListener
Listener interface for monitoring agent invocations.
  • Method Details

    • beforeAgentInvocation

      default void beforeAgentInvocation(AgentRequest agentRequest)
    • afterAgentInvocation

      default void afterAgentInvocation(AgentResponse agentResponse)
    • onAgentInvocationError

      default void onAgentInvocationError(AgentInvocationError agentInvocationError)
    • onAgentSkipped

      default void onAgentSkipped(AgentSkipped agentSkipped)
      Called when an agent is skipped instead of being invoked, because its activation condition is false or because it is optional and one of its arguments is missing. A skipped agent is not followed by any other callback.
    • afterAgenticScopeCreated

      default void afterAgenticScopeCreated(AgenticScope agenticScope)
    • beforeAgenticScopeDestroyed

      default void beforeAgenticScopeDestroyed(AgenticScope agenticScope)
    • onAgenticSystemSuspended

      default void onAgenticSystemSuspended(AgenticScope agenticScope)
    • beforeAgentToolExecution

      default void beforeAgentToolExecution(BeforeAgentToolExecution beforeAgentToolExecution)
    • afterAgentToolExecution

      default void afterAgentToolExecution(AfterAgentToolExecution afterAgentToolExecution)
    • inheritedBySubagents

      default boolean inheritedBySubagents()
      Indicates whether this listener should be used only to the agent where it is registered (default) or also inherited by its subagents.
      Returns:
      true if the listener should be inherited by sub-agents, false otherwise