AguiAdapterConfig
public class AguiAdapterConfig
io/agentscope/core/agui/adapter/AguiAdapterConfig.java:33–420用于AG-UI 智能体适配器的配置。位于 io.agentscope.core.agui.adapter 包。核心成员包括 getToolMergeMode、isEmitStateEvents、isEmitToolCallArgs、isEmitTokenUsage、isEnableReasoning、isEmitRunFinishedAfterError。
Configuration for the AG-UI agent adapter.
This class provides configuration options for how the adapter handles tool merging, state events, and other behaviors.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | AguiAdapterConfig的构建器。 Builder for AguiAdapterConfig. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public ToolMergeMode getToolMergeMode() | 获取 `getToolMergeMode`。 Get the tool merge mode. |
public boolean isEmitStateEvents() | 判断是否发出状态事件。 Check if state events should be emitted. |
public boolean isEmitToolCallArgs() | 判断是否发出工具调用参数。 Check if tool call arguments should be streamed. |
public boolean isEmitTokenUsage() | 判断是否发出令牌用量。 Check if model token usage should be emitted. |
public boolean isEnableReasoning() | 判断是否启用推理。 Check if reasoning/thinking content should be emitted. |
public boolean isEmitRunFinishedAfterError() | 判断是否 `isEmitRunFinishedAfterError`。 Check whether `RUN_FINISHED` should be emitted after `RUN_ERROR`. |
public Duration getRunTimeout() | 获取运行超时时长。 Get the run timeout duration. |
public String getDefaultAgentId() | 获取默认智能体标识。 Get the default agent ID. |
public List<AgentEventConverter> getEventConverters() | 获取 `getEventConverters`。 Get custom AgentEvent converters. |
public List<AguiEventEnricher> getEventEnrichers() | 获取 `getEventEnrichers`。 Get configured AG-UI event enrichers, including the default base properties enricher when
enabled. |
public boolean isBaseEventPropertiesEnricherEnabled() | 判断是否 `isBaseEventPropertiesEnricherEnabled`。 Check whether the default base event properties enricher is enabled. |
public boolean isEmitSubagentEventsAsNative() | 判断是否发出子智能体事件 As 原生。 When `false` (default), AgentEvents with a non-null `source` (subagent events)
are emitted as AG-UI `CUSTOM` events under the `subagent.*` namespace instead of
native `TEXT_MESSAGE_*` / run lifecycle events. |
public static Builder builder()static | 创建新的构建器用于 AguiAdapterConfig。 Creates a new builder for AguiAdapterConfig. |
public static AguiAdapterConfig defaultConfig()static | 创建默认配置。 Creates a default configuration. |
方法详情Method Detail
getToolMergeMode
public ToolMergeMode getToolMergeMode()
获取 getToolMergeMode。
Get the tool merge mode.
ToolMergeModeio/agentscope/core/agui/adapter/AguiAdapterConfig.java:69–71isEmitStateEvents
public boolean isEmitStateEvents()
判断是否发出状态事件。
Check if state events should be emitted.
booleanio/agentscope/core/agui/adapter/AguiAdapterConfig.java:78–80isEmitToolCallArgs
public boolean isEmitToolCallArgs()
判断是否发出工具调用参数。
Check if tool call arguments should be streamed.
booleanio/agentscope/core/agui/adapter/AguiAdapterConfig.java:87–89isEmitTokenUsage
public boolean isEmitTokenUsage()
判断是否发出令牌用量。
Check if model token usage should be emitted.
booleanio/agentscope/core/agui/adapter/AguiAdapterConfig.java:99–101isEnableReasoning
public boolean isEnableReasoning()
判断是否启用推理。
Check if reasoning/thinking content should be emitted.
booleanio/agentscope/core/agui/adapter/AguiAdapterConfig.java:112–114isEmitRunFinishedAfterError
public boolean isEmitRunFinishedAfterError()
判断是否 isEmitRunFinishedAfterError。
Check whether RUN_FINISHED should be emitted after RUN_ERROR.
booleanio/agentscope/core/agui/adapter/AguiAdapterConfig.java:125–127getRunTimeout
public Duration getRunTimeout()
获取运行超时时长。
Get the run timeout duration.
Durationio/agentscope/core/agui/adapter/AguiAdapterConfig.java:134–136getDefaultAgentId
public String getDefaultAgentId()
获取默认智能体标识。
Get the default agent ID.
Stringio/agentscope/core/agui/adapter/AguiAdapterConfig.java:143–145getEventConverters
public List<AgentEventConverter> getEventConverters()
获取 getEventConverters。
Get custom AgentEvent converters.
List<AgentEventConverter>io/agentscope/core/agui/adapter/AguiAdapterConfig.java:152–154getEventEnrichers
public List<AguiEventEnricher> getEventEnrichers()
获取 getEventEnrichers。
Get configured AG-UI event enrichers, including the default base properties enricher when enabled.
List<AguiEventEnricher>io/agentscope/core/agui/adapter/AguiAdapterConfig.java:162–164isBaseEventPropertiesEnricherEnabled
public boolean isBaseEventPropertiesEnricherEnabled()
判断是否 isBaseEventPropertiesEnricherEnabled。
Check whether the default base event properties enricher is enabled.
booleanio/agentscope/core/agui/adapter/AguiAdapterConfig.java:171–173isEmitSubagentEventsAsNative
public boolean isEmitSubagentEventsAsNative()
判断是否发出子智能体事件 As 原生。
When false (default), AgentEvents with a non-null source (subagent events) are emitted as AG-UI CUSTOM events under the subagent.* namespace instead of native TEXT_MESSAGE_* / run lifecycle events.
booleanio/agentscope/core/agui/adapter/AguiAdapterConfig.java:182–184builder
public static Builder builder()
创建新的构建器用于 AguiAdapterConfig。
Creates a new builder for AguiAdapterConfig.
Builderio/agentscope/core/agui/adapter/AguiAdapterConfig.java:191–193defaultConfig
public static AguiAdapterConfig defaultConfig()
创建默认配置。
Creates a default configuration.
AguiAdapterConfigio/agentscope/core/agui/adapter/AguiAdapterConfig.java:200–202嵌套类详情Nested Class Detail
Builder
public static class BuilderAguiAdapterConfig的构建器。位于 io.agentscope.core.agui.adapter 包。核心成员包括 toolMergeMode、emitStateEvents、emitToolCallArgs、emitTokenUsage、enableReasoning、emitRunFinishedAfterError。
Builder for AguiAdapterConfig.