RunAgentInput
public class RunAgentInput
io/agentscope/core/agui/model/RunAgentInput.java:32–332运行智能体输入,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.agui.model 包。核心成员包括 getThreadId、getRunId、getMessages、getTools、getContext、getState。
Input model for running an agent via the AG-UI protocol.
This class represents the complete input needed to invoke an agent, including messages, tools, context, state, and forwarded properties.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
Builder | 类class | RunAgentInput的构建器。 Builder for RunAgentInput. |
构造器摘要Constructor Summary
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getThreadId() | 获取会话线程标识。 Get the thread ID. |
public String getRunId() | 获取运行标识。 Get the run ID. |
public List<AguiMessage> getMessages() | 获取会话消息。 Get the conversation messages. |
public List<AguiTool> getTools() | 获取工具。 Get the frontend-provided tools. |
public List<AguiContext> getContext() | 获取上下文。 Get the context information. |
public Map<String, Object> getState() | 获取状态。 Get the initial state. |
public Map<String, Object> getForwardedProps() | 获取 `getForwardedProps`。 Get the forwarded properties. |
public List<AguiResume> getResume() | 获取恢复。 Get resume responses for previously emitted interrupts. |
public Object getForwardedProp(String key) | 获取 `getForwardedProp`。 Get a specific forwarded property. |
public Object getForwardedProp(String key, Object defaultValue) | 获取 `getForwardedProp`。 Get a specific forwarded property with a default value. |
public boolean hasMessages() | 判断是否具有消息。 Check if there are any messages. |
public boolean hasTools() | 判断是否具有工具。 Check if there are any frontend tools. |
public boolean hasContext() | 判断是否具有上下文。 Check if there is any context. |
public boolean hasState() | 判断是否具有状态。 Check if there is initial state. |
public boolean hasResume() | 判断是否具有恢复。 Check if there are any interrupt resume responses. |
public String toString() | 返回 `toString` 结果。 Returns the to string. |
public static Builder builder()static | 创建新的构建器用于 RunAgentInput。 Creates a new builder for RunAgentInput. |
构造器详情Constructor Detail
RunAgentInput
public RunAgentInput(String threadId, String runId, List<AguiMessage> messages, List<AguiTool> tools, List<AguiContext> context, Map<String, Object> state, Map<String, Object> forwardedProps)
创建新的RunAgentInput。
Creates a new RunAgentInput.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
threadId | String | 会话线程标识用于此会话。The thread ID for this conversation |
runId | String | 运行标识(类型 `String`)。The unique run ID |
messages | List<AguiMessage> | 会话消息。The conversation messages |
tools | List<AguiTool> | 工具列表(类型 `List`)。Frontend-provided tools |
context | List<AguiContext> | 上下文(类型 `List`)。Additional context information |
state | Map<String, Object> | 状态对象(类型 `Map`)。Initial state to load |
forwardedProps | Map<String, Object> | forwarded Props(类型 `Map`)。Additional properties to forward |
io/agentscope/core/agui/model/RunAgentInput.java:54–63RunAgentInput
public RunAgentInput(String threadId, String runId, List<AguiMessage> messages, List<AguiTool> tools, List<AguiContext> context, Map<String, Object> state, Map<String, Object> forwardedProps, List<AguiResume> resume)
创建新的RunAgentInput。
Creates a new RunAgentInput.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
threadId | String | 会话线程标识用于此会话。The thread ID for this conversation |
runId | String | 运行标识(类型 `String`)。The unique run ID |
messages | List<AguiMessage> | 会话消息。The conversation messages |
tools | List<AguiTool> | 工具列表(类型 `List`)。Frontend-provided tools |
context | List<AguiContext> | 上下文(类型 `List`)。Additional context information |
state | Map<String, Object> | 状态对象(类型 `Map`)。Initial state to load |
forwardedProps | Map<String, Object> | forwarded Props(类型 `Map`)。Additional properties to forward |
resume | List<AguiResume> | 恢复(类型 `List`)。Resume responses for previously emitted interrupts |
io/agentscope/core/agui/model/RunAgentInput.java:77–104方法详情Method Detail
getThreadId
public String getThreadId()
获取会话线程标识。
Get the thread ID.
Stringio/agentscope/core/agui/model/RunAgentInput.java:111–113getRunId
public String getRunId()
获取运行标识。
Get the run ID.
Stringio/agentscope/core/agui/model/RunAgentInput.java:120–122getMessages
public List<AguiMessage> getMessages()
获取会话消息。
Get the conversation messages.
List<AguiMessage>io/agentscope/core/agui/model/RunAgentInput.java:129–131getTools
public List<AguiTool> getTools()
获取工具。
Get the frontend-provided tools.
List<AguiTool>io/agentscope/core/agui/model/RunAgentInput.java:138–140getContext
public List<AguiContext> getContext()
获取上下文。
Get the context information.
List<AguiContext>io/agentscope/core/agui/model/RunAgentInput.java:147–149getState
public Map<String, Object> getState()
获取状态。
Get the initial state.
Map<String, Object>io/agentscope/core/agui/model/RunAgentInput.java:156–158getForwardedProps
public Map<String, Object> getForwardedProps()
获取 getForwardedProps。
Get the forwarded properties.
Map<String, Object>io/agentscope/core/agui/model/RunAgentInput.java:165–167getResume
public List<AguiResume> getResume()
获取恢复。
Get resume responses for previously emitted interrupts.
List<AguiResume>io/agentscope/core/agui/model/RunAgentInput.java:174–176getForwardedProp
public Object getForwardedProp(String key)
获取 getForwardedProp。
Get a specific forwarded property.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 属性密钥。The property key |
Objectio/agentscope/core/agui/model/RunAgentInput.java:184–186getForwardedProp
public Object getForwardedProp(String key, Object defaultValue)
获取 getForwardedProp。
Get a specific forwarded property with a default value.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 属性密钥。The property key |
defaultValue | Object | 默认值(类型 `Object`)。The default value if not present |
Objectio/agentscope/core/agui/model/RunAgentInput.java:195–197hasMessages
public boolean hasMessages()
判断是否具有消息。
Check if there are any messages.
booleanio/agentscope/core/agui/model/RunAgentInput.java:204–206hasTools
public boolean hasTools()
判断是否具有工具。
Check if there are any frontend tools.
booleanio/agentscope/core/agui/model/RunAgentInput.java:213–215hasContext
public boolean hasContext()
判断是否具有上下文。
Check if there is any context.
booleanio/agentscope/core/agui/model/RunAgentInput.java:222–224hasState
public boolean hasState()
判断是否具有状态。
Check if there is initial state.
booleanio/agentscope/core/agui/model/RunAgentInput.java:231–233hasResume
public boolean hasResume()
判断是否具有恢复。
Check if there are any interrupt resume responses.
booleanio/agentscope/core/agui/model/RunAgentInput.java:240–242toString
public String toString()
返回 toString 结果。
Returns the to string.
Stringio/agentscope/core/agui/model/RunAgentInput.java:244–263builder
public static Builder builder()
创建新的构建器用于 RunAgentInput。
Creates a new builder for RunAgentInput.
Builderio/agentscope/core/agui/model/RunAgentInput.java:270–272嵌套类详情Nested Class Detail
Builder
public static class BuilderRunAgentInput的构建器。位于 io.agentscope.core.agui.model 包。核心成员包括 threadId、runId、messages、tools、context、state。
Builder for RunAgentInput.