Interface MonitoredAgent
public interface MonitoredAgent
Interface that agent service interfaces can extend to automatically register
an
AgentMonitor as a listener. The monitor is created during agent building
and can be retrieved via agentMonitor().
Example usage:
public interface MyAgent extends MonitoredAgent {
@Agent("Performs some task")
String run(String input);
}
MyAgent agent = new AgentBuilder<>(MyAgent.class)
.chatModel(model)
.build();
AgentMonitor monitor = agent.agentMonitor();
-
Method Summary
Modifier and TypeMethodDescriptionReturns theAgentMonitorautomatically registered for this agent.
-
Method Details
-
agentMonitor
AgentMonitor agentMonitor()Returns theAgentMonitorautomatically registered for this agent.
-