Class AgentMonitor
java.lang.Object
dev.langchain4j.agentic.observability.AgentMonitor
- All Implemented Interfaces:
AgentListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterAgentInvocation(AgentResponse agentResponse) voidbeforeAgentInvocation(AgentRequest agentRequest) failedExecutionsFor(AgenticScope agenticScope) failedExecutionsFor(Object memoryId) booleanIndicates whether this listener should be used only to the agent where it is registered (default) or also inherited by its subagents.voidonAgentInvocationError(AgentInvocationError agentInvocationError) ongoingExecutionFor(AgenticScope agenticScope) ongoingExecutionFor(Object memoryId) successfulExecutionsFor(AgenticScope agenticScope) successfulExecutionsFor(Object memoryId) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AgentListener
afterAgenticScopeCreated, beforeAgenticScopeDestroyed
-
Constructor Details
-
AgentMonitor
public AgentMonitor()
-
-
Method Details
-
beforeAgentInvocation
- Specified by:
beforeAgentInvocationin interfaceAgentListener
-
afterAgentInvocation
- Specified by:
afterAgentInvocationin interfaceAgentListener
-
onAgentInvocationError
- Specified by:
onAgentInvocationErrorin interfaceAgentListener
-
inheritedBySubagents
public boolean inheritedBySubagents()Description copied from interface:AgentListenerIndicates whether this listener should be used only to the agent where it is registered (default) or also inherited by its subagents.- Specified by:
inheritedBySubagentsin interfaceAgentListener- Returns:
- true if the listener should be inherited by sub-agents, false otherwise
-
ongoingExecutions
-
ongoingExecutionFor
-
ongoingExecutionFor
-
successfulExecutions
-
successfulExecutionsFor
-
successfulExecutionsFor
-
failedExecutions
-
failedExecutionsFor
-
failedExecutionsFor
-