AS AgentScopeAPI 手册 / API Reference

RunAgentInput

public class RunAgentInput
源码Source 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

构造器Constructor说明Description
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.
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.

方法摘要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.

参数Parameters
名称Name类型Type说明Description
threadIdString会话线程标识用于此会话。The thread ID for this conversation
runIdString运行标识(类型 `String`)。The unique run ID
messagesList<AguiMessage>会话消息。The conversation messages
toolsList<AguiTool>工具列表(类型 `List`)。Frontend-provided tools
contextList<AguiContext>上下文(类型 `List`)。Additional context information
stateMap<String, Object>状态对象(类型 `Map`)。Initial state to load
forwardedPropsMap<String, Object>forwarded Props(类型 `Map`)。Additional properties to forward
源码Source io/agentscope/core/agui/model/RunAgentInput.java:54–63

RunAgentInput

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.

参数Parameters
名称Name类型Type说明Description
threadIdString会话线程标识用于此会话。The thread ID for this conversation
runIdString运行标识(类型 `String`)。The unique run ID
messagesList<AguiMessage>会话消息。The conversation messages
toolsList<AguiTool>工具列表(类型 `List`)。Frontend-provided tools
contextList<AguiContext>上下文(类型 `List`)。Additional context information
stateMap<String, Object>状态对象(类型 `Map`)。Initial state to load
forwardedPropsMap<String, Object>forwarded Props(类型 `Map`)。Additional properties to forward
resumeList<AguiResume>恢复(类型 `List`)。Resume responses for previously emitted interrupts
源码Source io/agentscope/core/agui/model/RunAgentInput.java:77–104

方法详情Method Detail

getThreadId

public String getThreadId()

获取会话线程标识。

Get the thread ID.

返回Returns String
会话线程标识。The thread ID
源码Source io/agentscope/core/agui/model/RunAgentInput.java:111–113

getRunId

public String getRunId()

获取运行标识。

Get the run ID.

返回Returns String
运行标识。The run ID
源码Source io/agentscope/core/agui/model/RunAgentInput.java:120–122

getMessages

public List<AguiMessage> getMessages()

获取会话消息。

Get the conversation messages.

返回Returns List<AguiMessage>
消息 as 不可变列出。The messages as an immutable list
源码Source io/agentscope/core/agui/model/RunAgentInput.java:129–131

getTools

public List<AguiTool> getTools()

获取工具。

Get the frontend-provided tools.

返回Returns List<AguiTool>
工具 as 不可变列出。The tools as an immutable list
源码Source io/agentscope/core/agui/model/RunAgentInput.java:138–140

getContext

public List<AguiContext> getContext()

获取上下文。

Get the context information.

返回Returns List<AguiContext>
上下文 as 不可变列出。The context as an immutable list
源码Source io/agentscope/core/agui/model/RunAgentInput.java:147–149

getState

public Map<String, Object> getState()

获取状态。

Get the initial state.

返回Returns Map<String, Object>
状态 as 不可变映射。The state as an immutable map
源码Source io/agentscope/core/agui/model/RunAgentInput.java:156–158

getForwardedProps

public Map<String, Object> getForwardedProps()

获取 getForwardedProps。

Get the forwarded properties.

返回Returns Map<String, Object>
返回映射。The forwarded properties as an immutable map
源码Source io/agentscope/core/agui/model/RunAgentInput.java:165–167

getResume

public List<AguiResume> getResume()

获取恢复。

Get resume responses for previously emitted interrupts.

返回Returns List<AguiResume>
返回列出。The resume responses as an immutable list
源码Source io/agentscope/core/agui/model/RunAgentInput.java:174–176

getForwardedProp

public Object getForwardedProp(String key)

获取 getForwardedProp。

Get a specific forwarded property.

参数Parameters
名称Name类型Type说明Description
keyString属性密钥。The property key
返回Returns Object
返回对象。The property value, or null if not present
源码Source io/agentscope/core/agui/model/RunAgentInput.java:184–186

getForwardedProp

public Object getForwardedProp(String key, Object defaultValue)

获取 getForwardedProp。

Get a specific forwarded property with a default value.

参数Parameters
名称Name类型Type说明Description
keyString属性密钥。The property key
defaultValueObject默认值(类型 `Object`)。The default value if not present
返回Returns Object
返回对象。The property value, or the default if not present
源码Source io/agentscope/core/agui/model/RunAgentInput.java:195–197

hasMessages

public boolean hasMessages()

判断是否具有消息。

Check if there are any messages.

返回Returns boolean
返回布尔值,表示判断结果。true if messages are present
源码Source io/agentscope/core/agui/model/RunAgentInput.java:204–206

hasTools

public boolean hasTools()

判断是否具有工具。

Check if there are any frontend tools.

返回Returns boolean
返回布尔值,表示判断结果。true if tools are present
源码Source io/agentscope/core/agui/model/RunAgentInput.java:213–215

hasContext

public boolean hasContext()

判断是否具有上下文。

Check if there is any context.

返回Returns boolean
返回布尔值,表示判断结果。true if context is present
源码Source io/agentscope/core/agui/model/RunAgentInput.java:222–224

hasState

public boolean hasState()

判断是否具有状态。

Check if there is initial state.

返回Returns boolean
返回布尔值,表示判断结果。true if state is present
源码Source io/agentscope/core/agui/model/RunAgentInput.java:231–233

hasResume

public boolean hasResume()

判断是否具有恢复。

Check if there are any interrupt resume responses.

返回Returns boolean
返回布尔值,表示判断结果。true if resume responses are present
源码Source io/agentscope/core/agui/model/RunAgentInput.java:240–242

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/model/RunAgentInput.java:244–263

builder

public static Builder builder()
static

创建新的构建器用于 RunAgentInput。

Creates a new builder for RunAgentInput.

返回Returns Builder
一种新的构建器实例。A new builder instance
源码Source io/agentscope/core/agui/model/RunAgentInput.java:270–272

嵌套类详情Nested Class Detail

Builder

public static class Builder

RunAgentInput的构建器。位于 io.agentscope.core.agui.model 包。核心成员包括 threadId、runId、messages、tools、context、state。

Builder for RunAgentInput.

基于官方固定版本源码静态生成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.