接口 StreamableAgent

所有已知子接口:
Agent
所有已知实现类:
AgentBase, ReActAgent, StructuredOutputCapableAgent, UserAgent

public interface StreamableAgent
Interface for agents that support streaming events during execution.

This interface enables real-time streaming of execution events as the agent processes input. Events can include reasoning steps, tool results, and final output.

Streaming is useful for:

  • Displaying incremental progress to users
  • Monitoring agent reasoning in real-time
  • Building interactive chat interfaces
  • 方法概要

    修饰符和类型
    方法
    说明
    default reactor.core.publisher.Flux<Event>
    Stream execution events based on current state without adding new input.
    default reactor.core.publisher.Flux<Event>
    stream(StreamOptions options, Class<?> structuredModel)
    Stream execution events with structured output support based on current state.
    default reactor.core.publisher.Flux<Event>
    stream(Msg msg)
    Stream execution events for a single message with default options.
    default reactor.core.publisher.Flux<Event>
    stream(Msg msg, StreamOptions options)
    Stream execution events for a single message.
    default reactor.core.publisher.Flux<Event>
    stream(Msg msg, StreamOptions options, com.fasterxml.jackson.databind.JsonNode schema)
    Stream execution events for a single message with JSON schema support.
    default reactor.core.publisher.Flux<Event>
    stream(Msg msg, StreamOptions options, Class<?> structuredModel)
    Stream execution events for a single message with structured output support.
    default reactor.core.publisher.Flux<Event>
    stream(Class<?> structuredModel)
    Stream execution events with structured output support based on current state.
    default reactor.core.publisher.Flux<Event>
    stream(List<Msg> msgs)
    Stream execution events for multiple messages with default options.
    reactor.core.publisher.Flux<Event>
    stream(List<Msg> msgs, StreamOptions options)
    Stream execution events in real-time as the agent processes the input.
    reactor.core.publisher.Flux<Event>
    stream(List<Msg> msgs, StreamOptions options, com.fasterxml.jackson.databind.JsonNode schema)
    Stream execution events with JSON schema support.
    reactor.core.publisher.Flux<Event>
    stream(List<Msg> msgs, StreamOptions options, Class<?> structuredModel)
    Stream execution events with structured output support.
  • 方法详细资料

    • stream

      default reactor.core.publisher.Flux<Event> stream(StreamOptions options)
      Stream execution events based on current state without adding new input.
      参数:
      options - Stream configuration options
      返回:
      Flux of events emitted during execution
    • stream

      default reactor.core.publisher.Flux<Event> stream(Class<?> structuredModel)
      Stream execution events with structured output support based on current state.
      参数:
      structuredModel - Class defining the structure of the output
      返回:
      Flux of events emitted during execution
    • stream

      default reactor.core.publisher.Flux<Event> stream(StreamOptions options, Class<?> structuredModel)
      Stream execution events with structured output support based on current state.
      参数:
      options - Stream configuration options
      structuredModel - Class defining the structure of the output
      返回:
      Flux of events emitted during execution
    • stream

      default reactor.core.publisher.Flux<Event> stream(Msg msg)
      Stream execution events for a single message with default options.
      参数:
      msg - Input message
      返回:
      Flux of events emitted during execution
    • stream

      default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options)
      Stream execution events for a single message.
      参数:
      msg - Input message
      options - Stream configuration options
      返回:
      Flux of events emitted during execution
    • stream

      default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options, Class<?> structuredModel)
      Stream execution events for a single message with structured output support.
      参数:
      msg - Input message
      options - Stream configuration options
      structuredModel - Class defining the structure of the output
      返回:
      Flux of events emitted during execution
    • stream

      default reactor.core.publisher.Flux<Event> stream(Msg msg, StreamOptions options, com.fasterxml.jackson.databind.JsonNode schema)
      Stream execution events for a single message with JSON schema support.
      参数:
      msg - Input message
      options - Stream configuration options
      schema - JSON schema defining the structure
      返回:
      Flux of events emitted during execution
    • stream

      default reactor.core.publisher.Flux<Event> stream(List<Msg> msgs)
      Stream execution events for multiple messages with default options.
      参数:
      msgs - Input messages
      返回:
      Flux of events emitted during execution
    • stream

      reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options)
      Stream execution events in real-time as the agent processes the input.
      参数:
      msgs - Input messages
      options - Stream configuration options
      返回:
      Flux of events emitted during execution
    • stream

      reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options, Class<?> structuredModel)
      Stream execution events with structured output support.
      参数:
      msgs - Input messages
      options - Stream configuration options
      structuredModel - Class defining the structure of the output
      返回:
      Flux of events emitted during execution
    • stream

      reactor.core.publisher.Flux<Event> stream(List<Msg> msgs, StreamOptions options, com.fasterxml.jackson.databind.JsonNode schema)
      Stream execution events with JSON schema support.
      参数:
      msgs - Input messages
      options - Stream configuration options
      schema - JSON schema defining the structure
      返回:
      Flux of events emitted during execution