AS AgentScopeAPI 手册 / API Reference

StreamableAgent

@Deprecated(since = "2.0.0", forRemoval = true) public interface StreamableAgent
源码Source io/agentscope/core/agent/StreamableAgent.java:43–211

定义 Streamable 智能体契约的接口。位于 io.agentscope.core.agent 包。核心成员包括 stream。

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

方法摘要Method Summary

方法Method说明Description
default public Flux<Event> stream(StreamOptions options)
defaultdeprecated
设置流。
Stream execution events based on current state without adding new input.
default public Flux<Event> stream(Class<?> structuredModel)
defaultdeprecated
设置流。
Stream execution events with structured output support based on current state.
default public Flux<Event> stream(StreamOptions options, Class<?> structuredModel)
defaultdeprecated
执行流相关操作。
Stream execution events with structured output support based on current state.
default public Flux<Event> stream(Msg msg)
defaultdeprecated
设置流。
Stream execution events for a single message with default options.
default public Flux<Event> stream(Msg msg, StreamOptions options)
defaultdeprecated
执行流相关操作。
Stream execution events for a single message.
default public Flux<Event> stream(Msg msg, StreamOptions options, Class<?> structuredModel)
defaultdeprecated
执行流相关操作。
Stream execution events for a single message with structured output support.
default public Flux<Event> stream(Msg msg, StreamOptions options, JsonNode schema)
defaultdeprecated
执行流相关操作。
Stream execution events for a single message with JSON schema support.
default public Flux<Event> stream(List<Msg> msgs)
defaultdeprecated
设置流。
Stream execution events for multiple messages with default options.
public Flux<Event> stream(List<Msg> msgs, StreamOptions options)
deprecated
执行流相关操作。
Stream execution events in real-time as the agent processes the input.
default public Flux<Event> stream(List<Msg> msgs, StreamOptions options, RuntimeContext context)
defaultdeprecated
执行流相关操作。
Stream execution events with a caller-supplied per-call runtime context.
public Flux<Event> stream(List<Msg> msgs, StreamOptions options, Class<?> structuredModel)
deprecated
执行流相关操作。
Stream execution events with structured output support.
public Flux<Event> stream(List<Msg> msgs, StreamOptions options, JsonNode schema)
deprecated
执行流相关操作。
Stream execution events with JSON schema support.

方法详情Method Detail

stream

default public Flux<Event> stream(StreamOptions options)
defaultdeprecated

设置流。

Stream execution events based on current state without adding new input.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(...)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:54–57

stream

default public Flux<Event> stream(Class<?> structuredModel)
defaultdeprecated

设置流。

Stream execution events with structured output support based on current state.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(...)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
structuredModelClass<?>结构化模型(类型 `Class`)。Class defining the structure of the output
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:67–70

stream

default public Flux<Event> stream(StreamOptions options, Class<?> structuredModel)
defaultdeprecated

执行流相关操作。

Stream execution events with structured output support based on current state.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(...)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
structuredModelClass<?>结构化模型(类型 `Class`)。Class defining the structure of the output
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:81–84

stream

default public Flux<Event> stream(Msg msg)
defaultdeprecated

设置流。

Stream execution events for a single message with default options.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(Msg)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgMsg消息(类型 `Msg`)。Input message
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:94–97

stream

default public Flux<Event> stream(Msg msg, StreamOptions options)
defaultdeprecated

执行流相关操作。

Stream execution events for a single message.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(Msg)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgMsg消息(类型 `Msg`)。Input message
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:108–111

stream

default public Flux<Event> stream(Msg msg, StreamOptions options, Class<?> structuredModel)
defaultdeprecated

执行流相关操作。

Stream execution events for a single message with structured output support.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(...)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgMsg消息(类型 `Msg`)。Input message
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
structuredModelClass<?>结构化模型(类型 `Class`)。Class defining the structure of the output
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:123–126

stream

default public Flux<Event> stream(Msg msg, StreamOptions options, JsonNode schema)
defaultdeprecated

执行流相关操作。

Stream execution events for a single message with JSON schema support.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(...)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgMsg消息(类型 `Msg`)。Input message
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
schemaJsonNode模式定义(类型 `JsonNode`)。JSON schema defining the structure
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:138–141

stream

default public Flux<Event> stream(List<Msg> msgs)
defaultdeprecated

设置流。

Stream execution events for multiple messages with default options.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(List)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgsList<Msg>消息列表(类型 `List`)。Input messages
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:151–154

stream

public Flux<Event> stream(List<Msg> msgs, StreamOptions options)
deprecated

执行流相关操作。

Stream execution events in real-time as the agent processes the input.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(List)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgsList<Msg>消息列表(类型 `List`)。Input messages
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:165–166

stream

default public Flux<Event> stream(List<Msg> msgs, StreamOptions options, RuntimeContext context)
defaultdeprecated

执行流相关操作。

Stream execution events with a caller-supplied per-call runtime context.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(...)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgsList<Msg>消息列表(类型 `List`)。Input messages
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
contextRuntimeContext用于此调用的运行时元数据。Runtime metadata for this call
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:181–184

stream

public Flux<Event> stream(List<Msg> msgs, StreamOptions options, Class<?> structuredModel)
deprecated

执行流相关操作。

Stream execution events with structured output support.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(...)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgsList<Msg>消息列表(类型 `List`)。Input messages
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
structuredModelClass<?>结构化模型(类型 `Class`)。Class defining the structure of the output
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:196–197

stream

public Flux<Event> stream(List<Msg> msgs, StreamOptions options, JsonNode schema)
deprecated

执行流相关操作。

Stream execution events with JSON schema support.

已弃用。Deprecated. 已弃用,请改用受支持的替代 API。since 2.0.0, for removal. Use `ReActAgent#streamEvents(...)` for the fine-grained `AgentEvent` stream.
参数Parameters
名称Name类型Type说明Description
msgsList<Msg>消息列表(类型 `List`)。Input messages
optionsStreamOptions选项(类型 `StreamOptions`)。Stream configuration options
schemaJsonNode模式定义(类型 `JsonNode`)。JSON schema defining the structure
返回Returns Flux<Event>
返回Flux。Flux of events emitted during execution
源码Source io/agentscope/core/agent/StreamableAgent.java:209–210
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.