Class RunItemUtils

java.lang.Object
ai.acolite.agentsdk.core.runner.RunItemUtils

public class RunItemUtils extends Object
RunItemUtils

Static utility methods for analyzing lists of RunItems. Extracted from RunState for better testability and reusability.

  • Method Details

    • hasPendingToolCalls

      public static boolean hasPendingToolCalls(List<RunItem> items)
      Checks if there are any tool calls without corresponding outputs.
      Parameters:
      items - List of conversation items to check
      Returns:
      true if there are pending tool calls, false otherwise
    • hasToolCallOutput

      public static boolean hasToolCallOutput(List<RunItem> items, String toolCallId)
      Checks if a specific tool call has a corresponding output.
      Parameters:
      items - List of conversation items to search
      toolCallId - ID of the tool call to find output for
      Returns:
      true if output exists, false otherwise