Class SubagentStartedEvent


  • public final class SubagentStartedEvent
    extends ConversationStreamEvent
    The Agent has spawned a subagent to work on a sub-task. When the Agent spawns a subagent, the subagent's lifecycle is reported with this dedicated event family instead of node_tool_use_*.
    • Constructor Detail

      • SubagentStartedEvent

        public SubagentStartedEvent()
    • Method Detail

      • getNodeId

        public String getNodeId()
        Returns the ID of the node that spawned the subagent.
        Returns:
        ID of the node that spawned the subagent
      • getToolUseId

        public String getToolUseId()
        Returns the unique ID of this spawn; matches the finished event.
        Returns:
        unique ID of this spawn
      • getStartedAt

        public long getStartedAt()
        Returns the start time, Unix timestamp in seconds.
        Returns:
        start time
      • getGoal

        public String getGoal()
        Returns the goal assigned to the subagent.
        Returns:
        goal assigned to the subagent
      • getPrompt

        public String getPrompt()
        Returns the full task prompt given to the subagent.
        Returns:
        full task prompt given to the subagent
      • getSubagentId

        public String getSubagentId()
        Returns the subagent identifier; may be empty.
        Returns:
        subagent identifier
      • getTools

        public String[] getTools()
        Returns the tools granted to the subagent, each as JSON text; may be empty.
        Returns:
        tools granted to the subagent