Package com.longbridge.agent
Class AgentToolFinishedEvent
- java.lang.Object
-
- com.longbridge.agent.ConversationStreamEvent
-
- com.longbridge.agent.AgentToolFinishedEvent
-
public final class AgentToolFinishedEvent extends ConversationStreamEvent
The delegated Agent's run has finished.
-
-
Constructor Summary
Constructors Constructor Description AgentToolFinishedEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAgentToolName()Returns the identifier of the Agent being called.doublegetElapsedTime()Returns the total duration in seconds.StringgetError()Returns the error description on failure.StringgetNodeId()Returns the ID of the calling node.StringgetOutputs()Returns the result of the delegated Agent, as JSON text.longgetStartedAt()Returns the start time, Unix timestamp in seconds.StringgetStatus()Returns the status:succeeded/failed.String[]getTipChips()Returns the short tags; may be empty.StringgetTips()Returns the progress text; may be empty.StringgetToolArgs()Returns the call arguments as a JSON string.StringgetToolType()Returns the tool category.StringgetToolUseId()Returns the ID matching thetoolUseIdofAgentToolStartedEvent.booleanisThinking()Returns whether the call happened during the thinking phase.StringtoString()
-
-
-
Method Detail
-
getNodeId
public String getNodeId()
Returns the ID of the calling node.- Returns:
- ID of the calling node
-
getToolUseId
public String getToolUseId()
Returns the ID matching thetoolUseIdofAgentToolStartedEvent.- Returns:
- matching tool use ID
-
getAgentToolName
public String getAgentToolName()
Returns the identifier of the Agent being called.- Returns:
- identifier of the Agent being called
-
getStatus
public String getStatus()
Returns the status:succeeded/failed.- Returns:
- status
-
getStartedAt
public long getStartedAt()
Returns the start time, Unix timestamp in seconds.- Returns:
- start time
-
getElapsedTime
public double getElapsedTime()
Returns the total duration in seconds.- Returns:
- total duration in seconds
-
getError
public String getError()
Returns the error description on failure.- Returns:
- error description
-
getToolArgs
public String getToolArgs()
Returns the call arguments as a JSON string.- Returns:
- call arguments (JSON string)
-
getOutputs
public String getOutputs()
Returns the result of the delegated Agent, as JSON text.- Returns:
- result of the delegated Agent (JSON text), or
null
-
getToolType
public String getToolType()
Returns the tool category.- Returns:
- tool category
-
getTips
public String getTips()
Returns the progress text; may be empty.- Returns:
- progress text
-
getTipChips
public String[] getTipChips()
Returns the short tags; may be empty.- Returns:
- short tags
-
isThinking
public boolean isThinking()
Returns whether the call happened during the thinking phase.- Returns:
trueif during the thinking phase
-
-