AS AgentScopeAPI 手册 / API Reference

AgentProtocolConstants

public final class AgentProtocolConstants
源码Source io/agentscope/extensions/agentprotocol/AgentProtocolConstants.java:25–79

智能体协议 Constants,为框架提供通用类型与基础能力。位于 io.agentscope.extensions.agentprotocol 包。核心成员包括 isReservedRuntimeContextKey、PROTOCOL_AGENT_ID、PROTOCOL_SESSION_ID、CONTEXT_ATTRIBUTES_FIELD、RUNTIME_CONTEXT_ATTRIBUTES_KEY。

Workspace partitioning for persisted task records served by the protocol endpoints, plus the contract for caller-supplied context attributes.

字段摘要Field Summary

字段Field类型Type说明Description
PROTOCOL_AGENT_ID
staticfinal
String
协议智能体标识字段。
Synthetic parent agent id for `agents/<id>/tasks/` paths.
PROTOCOL_SESSION_ID
staticfinal
String
协议会话标识字段。
Single session bucket file holding all protocol tasks as a task-id map.
CONTEXT_ATTRIBUTES_FIELD
staticfinal
String
上下文属性 FIELD字段。
Field inside the submission `context` that carries caller-defined attributes.
RUNTIME_CONTEXT_ATTRIBUTES_KEY
staticfinal
String
运行时上下文属性键字段。
`io.agentscope.core.agent.RuntimeContext` key holding the whole ` context.attributes` map as an unmodifiable `Map<String, Object>`.

方法摘要Method Summary

方法Method说明Description
public static boolean isReservedRuntimeContextKey(String key)
static
判断是否 `isReservedRuntimeContextKey`。
Whether `key` is read by the framework itself and therefore unsafe to overwrite with a caller-supplied value.

字段详情Field Detail

PROTOCOL_AGENT_ID

public static final String PROTOCOL_AGENT_ID
staticfinal

协议智能体标识字段。声明为 public static final String PROTOCOL_AGENT_ID。

Synthetic parent agent id for agents/ /tasks/ paths.

源码Source io/agentscope/extensions/agentprotocol/AgentProtocolConstants.java:30

PROTOCOL_SESSION_ID

public static final String PROTOCOL_SESSION_ID
staticfinal

协议会话标识字段。声明为 public static final String PROTOCOL_SESSION_ID。

Single session bucket file holding all protocol tasks as a task-id map.

源码Source io/agentscope/extensions/agentprotocol/AgentProtocolConstants.java:33

CONTEXT_ATTRIBUTES_FIELD

public static final String CONTEXT_ATTRIBUTES_FIELD
staticfinal

上下文属性 FIELD字段。声明为 public static final String CONTEXT_ATTRIBUTES_FIELD。

Field inside the submission context that carries caller-defined attributes.

源码Source io/agentscope/extensions/agentprotocol/AgentProtocolConstants.java:40

RUNTIME_CONTEXT_ATTRIBUTES_KEY

public static final String RUNTIME_CONTEXT_ATTRIBUTES_KEY
staticfinal

运行时上下文属性键字段。声明为 public static final String RUNTIME_CONTEXT_ATTRIBUTES_KEY。

io.agentscope.core.agent.RuntimeContext key holding the whole context.attributes map as an unmodifiable Map.

源码Source io/agentscope/extensions/agentprotocol/AgentProtocolConstants.java:51

方法详情Method Detail

isReservedRuntimeContextKey

public static boolean isReservedRuntimeContextKey(String key)
static

判断是否 isReservedRuntimeContextKey。

Whether key is read by the framework itself and therefore unsafe to overwrite with a caller-supplied value.

参数Parameters
名称Name类型Type说明Description
keyString键(类型 `String`)。The key.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/extensions/agentprotocol/AgentProtocolConstants.java:65–78
基于官方固定版本源码静态生成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.