Interface AgentEventConverter


public interface AgentEventConverter
Extension point for converting AgentScope events to AG-UI protocol events.

Implementations declare the AgentEvent types they handle and emit AG-UI events through the provided AguiStreamContext. Custom converters can be registered through AguiAdapterConfig to extend or override built-in semantic mappings.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    convert(io.agentscope.core.event.AgentEvent event, AguiStreamContext context)
    Convert a source AgentScope event by emitting AG-UI events to the stream context.
    Set<Class<? extends io.agentscope.core.event.AgentEvent>>
    Return the AgentScope event types handled by this converter.
  • Method Details

    • eventTypes

      Set<Class<? extends io.agentscope.core.event.AgentEvent>> eventTypes()
      Return the AgentScope event types handled by this converter.
      Returns:
      supported AgentScope event types
    • convert

      void convert(io.agentscope.core.event.AgentEvent event, AguiStreamContext context)
      Convert a source AgentScope event by emitting AG-UI events to the stream context.
      Parameters:
      event - source AgentScope event
      context - stream conversion context used to emit AG-UI events