AS AgentScopeAPI 手册 / API Reference

AguiRuntimeContextRequest

public final class AguiRuntimeContextRequest<T>
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:34–207

AGUI 运行时上下文请求,在智能体、模型与前端之间传递结构化消息和事件。位于 io.agentscope.core.agui.runtime 包。核心成员包括 getInput、getHeaderAgentId、getPathAgentId、getTransport、getMethod、getPath。

Request-scoped data available when resolving an AG-UI io.agentscope.core.agent.RuntimeContext.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Transport枚举enum
定义传输层相关取值的枚举。
Transport that received the AG-UI request.
Builder类class
`AguiRuntimeContextRequest`的构建器。
Builder for `AguiRuntimeContextRequest`.

方法摘要Method Summary

方法Method说明Description
public RunAgentInput getInput()
获取输入。
Returns the input.
public String getHeaderAgentId()
获取请求头智能体标识。
Returns the header agent id.
public String getPathAgentId()
获取路径智能体标识。
Returns the path agent id.
public Transport getTransport()
获取传输层。
Returns the transport.
public String getMethod()
获取方法。
Returns the method.
public String getPath()
获取路径。
Returns the path.
public Map<String, List<String>> getHeaders()
获取请求头。
Returns the headers.
public String firstHeader(String name)
设置第一个请求头。
Performs the first header operation.
public Map<String, List<String>> getQueryParams()
获取查询参数。
Returns the query params.
public String firstQueryParam(String name)
设置第一个查询参数。
Performs the first query param operation.
public T getNativeRequest()
获取原生请求。
Returns the native request.
public static T Builder<T> builder()
static
返回构建器实例。
Returns the builder.

方法详情Method Detail

getInput

public RunAgentInput getInput()

获取输入。

Returns the input.

返回Returns RunAgentInput
返回RunAgentInput。Returns run agent input.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:65–67

getHeaderAgentId

public String getHeaderAgentId()

获取请求头智能体标识。

Returns the header agent id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:69–71

getPathAgentId

public String getPathAgentId()

获取路径智能体标识。

Returns the path agent id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:73–75

getTransport

public Transport getTransport()

获取传输层。

Returns the transport.

返回Returns Transport
返回传输层。Returns transport.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:77–79

getMethod

public String getMethod()

获取方法。

Returns the method.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:81–83

getPath

public String getPath()

获取路径。

Returns the path.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:85–87

getHeaders

public Map<String, List<String>> getHeaders()

获取请求头。

Returns the headers.

返回Returns Map<String, List<String>>
返回映射>。Returns map.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:89–91

firstHeader

public String firstHeader(String name)

设置第一个请求头。

Performs the first header operation.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:93–95

getQueryParams

public Map<String, List<String>> getQueryParams()

获取查询参数。

Returns the query params.

返回Returns Map<String, List<String>>
返回映射>。Returns map.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:97–99

firstQueryParam

public String firstQueryParam(String name)

设置第一个查询参数。

Performs the first query param operation.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:101–103

getNativeRequest

public T getNativeRequest()

获取原生请求。

Returns the native request.

返回Returns T
返回T。Returns t.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:105–107

builder

public static T Builder<T> builder()
static

返回构建器实例。

Returns the builder.

返回Returns Builder<T>
返回当前实例,以支持链式调用。Returns the current instance for chaining.
源码Source io/agentscope/core/agui/runtime/AguiRuntimeContextRequest.java:109–111

嵌套类详情Nested Class Detail

Transport

public enum Transport

定义传输层相关取值的枚举。位于 io.agentscope.core.agui.runtime 包。核心成员包括 MVC、WEBFLUX、CUSTOM。

Transport that received the AG-UI request.

Builder

public static final class Builder<T>

AguiRuntimeContextRequest的构建器。位于 io.agentscope.core.agui.runtime 包。核心成员包括 input、headerAgentId、pathAgentId、transport、method、path。

Builder for AguiRuntimeContextRequest.

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