AguiProperties
@ConfigurationProperties(prefix = "agentscope.agui") public class AguiProperties
io/agentscope/spring/boot/agui/common/AguiProperties.java:46–275AGUI 属性,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.agui.common 包。核心成员包括 getPathPrefix、setPathPrefix、isCorsEnabled、setCorsEnabled、getCorsAllowedOrigins、setCorsAllowedOrigins。
Configuration properties for AG-UI integration.
These properties can be configured in application.yml or application.properties:
agentscope:
agui:
path-prefix: /agui
cors-enabled: true
cors-allowed-origins:
- "*"
run-timeout: 10m
default-tool-merge-mode: MERGE_EXTERNAL_PRIORITY
default-agent-id: default
agent-id-header: X-Agent-Id
enable-path-routing: true
enable-reasoning: false
emit-token-usage: false
emit-run-finished-after-error: false
interrupt-on-disconnect: true
方法摘要Method Summary
方法详情Method Detail
getPathPrefix
public String getPathPrefix()
获取 getPathPrefix。
Returns the path prefix.
Stringio/agentscope/spring/boot/agui/common/AguiProperties.java:132–134setPathPrefix
public void setPathPrefix(String pathPrefix)
设置 setPathPrefix。
Sets the path prefix.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
pathPrefix | String | 路径 Prefix(类型 `String`)。The path prefix. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:136–138isCorsEnabled
public boolean isCorsEnabled()
判断是否 isCorsEnabled。
Returns whether the cors enabled.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:140–142setCorsEnabled
public void setCorsEnabled(boolean corsEnabled)
设置 setCorsEnabled。
Sets the cors enabled.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
corsEnabled | boolean | cors 已启用(类型 `boolean`)。The cors enabled. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:144–146getCorsAllowedOrigins
public List<String> getCorsAllowedOrigins()
获取 getCorsAllowedOrigins。
Returns the cors allowed origins.
List<String>io/agentscope/spring/boot/agui/common/AguiProperties.java:148–150setCorsAllowedOrigins
public void setCorsAllowedOrigins(List<String> corsAllowedOrigins)
设置 setCorsAllowedOrigins。
Sets the cors allowed origins.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
corsAllowedOrigins | List<String> | cors 已允许 Origins(类型 `List`)。The cors allowed origins. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:152–154getRunTimeout
public Duration getRunTimeout()
获取运行超时。
Returns the run timeout.
Durationio/agentscope/spring/boot/agui/common/AguiProperties.java:156–158setRunTimeout
public void setRunTimeout(Duration runTimeout)
设置运行超时。
Sets the run timeout.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runTimeout | Duration | 运行超时(类型 `Duration`)。The run timeout. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:160–162getDefaultToolMergeMode
public ToolMergeMode getDefaultToolMergeMode()
获取 getDefaultToolMergeMode。
Returns the default tool merge mode.
ToolMergeModeio/agentscope/spring/boot/agui/common/AguiProperties.java:164–166setDefaultToolMergeMode
public void setDefaultToolMergeMode(ToolMergeMode defaultToolMergeMode)
设置 setDefaultToolMergeMode。
Sets the default tool merge mode.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
defaultToolMergeMode | ToolMergeMode | 默认工具 Merge 模式(类型 `ToolMergeMode`)。The default tool merge mode. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:168–170isEmitStateEvents
public boolean isEmitStateEvents()
判断是否发出状态事件。
Returns whether the emit state events.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:172–174setEmitStateEvents
public void setEmitStateEvents(boolean emitStateEvents)
设置发出状态事件。
Sets the emit state events.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
emitStateEvents | boolean | 发出状态事件(类型 `boolean`)。The emit state events. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:176–178isEmitToolCallArgs
public boolean isEmitToolCallArgs()
判断是否发出工具调用参数。
Returns whether the emit tool call args.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:180–182setEmitToolCallArgs
public void setEmitToolCallArgs(boolean emitToolCallArgs)
设置发出工具调用参数。
Sets the emit tool call args.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
emitToolCallArgs | boolean | 发出工具调用参数(类型 `boolean`)。The emit tool call args. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:184–186isEmitTokenUsage
public boolean isEmitTokenUsage()
判断是否发出令牌用量。
Returns whether the emit token usage.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:188–190setEmitTokenUsage
public void setEmitTokenUsage(boolean emitTokenUsage)
设置发出令牌用量。
Sets the emit token usage.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
emitTokenUsage | boolean | 发出令牌用量(类型 `boolean`)。The emit token usage. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:192–194isEnableReasoning
public boolean isEnableReasoning()
判断是否启用推理。
Returns whether the enable reasoning.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:196–198setEnableReasoning
public void setEnableReasoning(boolean enableReasoning)
设置启用推理。
Sets the enable reasoning.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enableReasoning | boolean | 启用推理(类型 `boolean`)。The enable reasoning. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:200–202isEmitRunFinishedAfterError
public boolean isEmitRunFinishedAfterError()
判断是否 isEmitRunFinishedAfterError。
Returns whether the emit run finished after error.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:204–206setEmitRunFinishedAfterError
public void setEmitRunFinishedAfterError(boolean emitRunFinishedAfterError)
设置 setEmitRunFinishedAfterError。
Sets the emit run finished after error.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
emitRunFinishedAfterError | boolean | 发出运行 Finished 之后错误(类型 `boolean`)。The emit run finished after error. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:208–210getDefaultAgentId
public String getDefaultAgentId()
获取默认智能体标识。
Returns the default agent id.
Stringio/agentscope/spring/boot/agui/common/AguiProperties.java:212–214setDefaultAgentId
public void setDefaultAgentId(String defaultAgentId)
设置默认智能体标识。
Sets the default agent id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
defaultAgentId | String | 默认智能体标识(类型 `String`)。The default agent id. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:216–218isServerSideMemory
public boolean isServerSideMemory()
判断是否 isServerSideMemory。
Returns whether the server side memory.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:220–222setServerSideMemory
public void setServerSideMemory(boolean serverSideMemory)
设置 setServerSideMemory。
Sets the server side memory.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
serverSideMemory | boolean | 服务端 Side 记忆(类型 `boolean`)。The server side memory. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:224–226getMaxThreadSessions
public int getMaxThreadSessions()
获取最大会话线程会话。
Returns the max thread sessions.
intio/agentscope/spring/boot/agui/common/AguiProperties.java:228–230setMaxThreadSessions
public void setMaxThreadSessions(int maxThreadSessions)
设置最大会话线程会话。
Sets the max thread sessions.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxThreadSessions | int | 最大会话线程会话(类型 `int`)。The max thread sessions. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:232–234getSessionTimeoutMinutes
public int getSessionTimeoutMinutes()
获取会话超时分钟。
Returns the session timeout minutes.
intio/agentscope/spring/boot/agui/common/AguiProperties.java:236–238setSessionTimeoutMinutes
public void setSessionTimeoutMinutes(int sessionTimeoutMinutes)
设置会话超时分钟。
Sets the session timeout minutes.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionTimeoutMinutes | int | 会话超时分钟(类型 `int`)。The session timeout minutes. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:240–242getAgentIdHeader
public String getAgentIdHeader()
获取智能体标识请求头。
Returns the agent id header.
Stringio/agentscope/spring/boot/agui/common/AguiProperties.java:244–246setAgentIdHeader
public void setAgentIdHeader(String agentIdHeader)
设置智能体标识请求头。
Sets the agent id header.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentIdHeader | String | 智能体标识请求头(类型 `String`)。The agent id header. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:248–250isEnablePathRouting
public boolean isEnablePathRouting()
判断是否启用路径路由。
Returns whether the enable path routing.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:252–254setEnablePathRouting
public void setEnablePathRouting(boolean enablePathRouting)
设置启用路径路由。
Sets the enable path routing.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
enablePathRouting | boolean | 启用路径路由(类型 `boolean`)。The enable path routing. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:256–258getSseTimeout
public long getSseTimeout()
获取SSE 超时。
Returns the sse timeout.
longio/agentscope/spring/boot/agui/common/AguiProperties.java:260–262setSseTimeout
public void setSseTimeout(long sseTimeout)
设置SSE 超时。
Sets the sse timeout.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sseTimeout | long | SSE 超时(类型 `long`)。The sse timeout. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:264–266isInterruptOnDisconnect
public boolean isInterruptOnDisconnect()
判断是否中断 On 断开。
Returns whether the interrupt on disconnect.
booleanio/agentscope/spring/boot/agui/common/AguiProperties.java:268–270setInterruptOnDisconnect
public void setInterruptOnDisconnect(boolean interruptOnDisconnect)
设置中断 On 断开。
Sets the interrupt on disconnect.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
interruptOnDisconnect | boolean | 中断 On 断开(类型 `boolean`)。The interrupt on disconnect. |
io/agentscope/spring/boot/agui/common/AguiProperties.java:272–274