Interface AgentListener
- All Known Implementing Classes:
AgentMonitor, ComposedAgentListener
public interface AgentListener
Listener interface for monitoring agent invocations.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidafterAgenticScopeCreated(AgenticScope agenticScope) default voidafterAgentInvocation(AgentResponse agentResponse) default voidafterAgentToolExecution(AfterAgentToolExecution afterAgentToolExecution) default voidbeforeAgenticScopeDestroyed(AgenticScope agenticScope) default voidbeforeAgentInvocation(AgentRequest agentRequest) default voidbeforeAgentToolExecution(BeforeAgentToolExecution beforeAgentToolExecution) default booleanIndicates whether this listener should be used only to the agent where it is registered (default) or also inherited by its subagents.default voidonAgenticSystemSuspended(AgenticScope agenticScope) default voidonAgentInvocationError(AgentInvocationError agentInvocationError) default voidonAgentSkipped(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.
-
Method Details
-
beforeAgentInvocation
-
afterAgentInvocation
-
onAgentInvocationError
-
onAgentSkipped
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
-
beforeAgenticScopeDestroyed
-
onAgenticSystemSuspended
-
beforeAgentToolExecution
-
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
-