Class AgentProtocolConstants

java.lang.Object
io.agentscope.extensions.agentprotocol.AgentProtocolConstants

public final class AgentProtocolConstants extends Object
Workspace partitioning for persisted task records served by the protocol endpoints, plus the contract for caller-supplied context attributes.
  • Field Details

    • PROTOCOL_AGENT_ID

      public static final String PROTOCOL_AGENT_ID
      Synthetic parent agent id for agents/<id>/tasks/ paths.
      See Also:
    • PROTOCOL_SESSION_ID

      public static final String PROTOCOL_SESSION_ID
      Single session bucket file holding all protocol tasks as a task-id map.
      See Also:
    • CONTEXT_ATTRIBUTES_FIELD

      public static final String CONTEXT_ATTRIBUTES_FIELD
      Field inside the submission context that carries caller-defined attributes. Keeping them nested separates them from the protocol's own context fields (user_id, parent_session_id, stream, detail, deny_rules).
      See Also:
    • RUNTIME_CONTEXT_ATTRIBUTES_KEY

      public static final String RUNTIME_CONTEXT_ATTRIBUTES_KEY
      RuntimeContext key holding the whole context.attributes map as an unmodifiable Map<String, Object>.

      Attributes are namespaced under this single key so that no caller-controlled name can shadow a framework key. Tools and middlewares read them with ctx.get( AgentProtocolConstants.RUNTIME_CONTEXT_ATTRIBUTES_KEY); to expose an attribute under its own top-level key instead, use RuntimeContextCustomizer.flatten(String...).

      See Also:
  • Method Details

    • isReservedRuntimeContextKey

      public static boolean isReservedRuntimeContextKey(String key)
      Whether key is read by the framework itself and therefore unsafe to overwrite with a caller-supplied value. Examples: agentId drives async tool wakeup routing and outboundAddress carries the gateway reply address.