Interface AguiEvent

All Known Implementing Classes:
AguiEvent.ActivityDelta, AguiEvent.ActivitySnapshot, AguiEvent.Custom, AguiEvent.MessagesSnapshot, AguiEvent.Raw, AguiEvent.ReasoningEncryptedValue, AguiEvent.ReasoningEnd, AguiEvent.ReasoningMessageChunk, AguiEvent.ReasoningMessageContent, AguiEvent.ReasoningMessageEnd, AguiEvent.ReasoningMessageStart, AguiEvent.ReasoningStart, AguiEvent.RunError, AguiEvent.RunFinished, AguiEvent.RunStarted, AguiEvent.StateDelta, AguiEvent.StateSnapshot, AguiEvent.StepFinished, AguiEvent.StepStarted, AguiEvent.TextMessageChunk, AguiEvent.TextMessageContent, AguiEvent.TextMessageEnd, AguiEvent.TextMessageStart, AguiEvent.ToolCallArgs, AguiEvent.ToolCallChunk, AguiEvent.ToolCallEnd, AguiEvent.ToolCallResult, AguiEvent.ToolCallStart

Sealed interface for all AG-UI protocol events.

All events in the AG-UI protocol implement this interface and provide common properties like event type, thread ID, and run ID. Using sealed interface with records provides a cleaner, more concise implementation.

  • Method Details

    • getType

      AguiEventType getType()
      Get the event type.
      Returns:
      The event type
    • getThreadId

      String getThreadId()
      Get the thread ID associated with this event.
      Returns:
      The thread ID
    • getRunId

      String getRunId()
      Get the run ID associated with this event.
      Returns:
      The run ID
    • timestamp

      Long timestamp()
      Get the optional timestamp indicating when the event was created.
      Returns:
      The event timestamp, or null if not provided
    • rawEvent

      Object rawEvent()
      Get the optional field containing the original event data if transformed.
      Returns:
      The raw source event, or null if not provided