OpenClaw EnterpriseDOCSGitHub

Agent native admin UI

Agent native admin UI access lets an authorized operator open the selected Agent's native OpenClaw administration UI from the platform console. It is an explicit pilot capability for trusted operators. It exposes the stock native administrator surface for one Agent gateway; it does not create an OCE-managed configuration editor.

The feature is disabled by default. When enabled, the console shows Native admin UI on the Agent detail tabs only for callers with exact Agent administer permission. Opening the Agent host uses the operator's ordinary OCE console session cookie, resolves the exact Agent represented by that host, then serves native HTTP and WebSocket traffic through OCC.

Requirements

Authorization and availability

GET /namespaces/:namespaceId/agents/:agentId/native-admin is the console-facing availability check. It is a protected OCC API route with a human session, exact Agent administer authorization, and exact Agent existence. OCC verifies that authorization boundary before returning any feature status, including disabled; Agent read, Agent operate, native device credentials, native tokens, service keys for unrelated principals, and possession of a derived Agent host do not grant this API route.

The response reports:

Status Meaning
disabled The Installation has not enabled native admin UI access.
stopped The Agent is not in desired running state.
unsupported The selected Compute Driver, active revision, or native configuration does not support native admin UI access.
unavailable OCC cannot resolve the active Agent revision while checking availability.
available The caller may open the returned url for the current active revision.

A stopped Agent with no active revision returns only status: "stopped", including before its first deployment and after stop reconciliation clears its active revision. A stopped Agent with a selectable active revision still includes its target fields. If a desired-running Agent has no active revision, OCC returns unavailable in the success envelope so the console can show a retryable dependency state. Malformed requests, denied IAM access, missing sessions, and failures outside that availability branch use the normal protected-route error envelope.

Agent host identity

OCC derives a stable browser host from the Installation ID, Namespace ID, Agent ID, and configured agentNativeAdmin.domain. The hostname is opaque and must not be reused for another Agent identity. The derived host is separate from the console origin, which gives each Agent UI its own browser origin.

An Agent URL uses the derived host directly:

text
https://agent-<opaque-hash>.<agentNativeAdmin.domain>/

The host hash is not reversible, so native-host admission resolves the host to the exact Agent using existing platform state. Unknown hosts, wrong suffixes, deleted Agents, and hosts that do not map to exactly one Agent fail closed. This lookup does not require a persistent registry or cache.

The private upstream base remains the Compute Driver's existing gateway endpoint:

text
wss://<private-host>/namespaces/<namespaceId>/agents/<agentId>

For browser proxying, OCC maps that value to the same authority and Agent path over https:. Workspace-file access continues to use the original wss: endpoint. Native admin HTTP requests and WebSocket upgrades both pass through the OCC API process before reaching the private gateway. The HTTP proxy blocks native service-worker script requests and appends worker-src 'none' to proxied Content Security Policy so Agent content cannot register a browser service worker on the isolated Agent origin.

Shared session boundary

The console and Agent hosts share the ordinary OCE session cookie through the configured cookie parent domain. That expands the cookie trust boundary: every host under the console and Agent subdomains that can receive the cookie must be a trusted OCE ingress endpoint. Public Agent hosts route to OCC, not Envoy or tenant gateway Services. OCC strips browser cookies, Authorization, API keys, forwarded identity, scope headers, and native Set-Cookie before forwarding upstream, so the native gateway never receives the OCE session cookie.

Native chat or other activity in the Agent tab does not renew the console session. Session expiry, logout, session revocation, permission removal, pilot disablement, Agent unavailability, or a revision change closes active WebSockets during the authorization lease. Reconnecting uses the same stable Agent host and the current active revision when the shared OCE session, exact Agent permission, and native configuration remain valid.

Native authority and drift

The native admin UI runs with the same shared native trusted-proxy identity used by workspace files: occ-workspace-files with operator.admin. OCC attributes availability, proxy admission, and socket closure checks to the human session and exact Agent IAM decision. The native gateway sees the shared service identity, not a per-human native account.

Native admin changes affect gateway-local state outside OCE Configurations and immutable AgentRevisions. Manage durable configuration through OCE. In the Kubernetes pilot, native configuration edits affect a Pod-local copy that resets from the managed snapshot when the Pod is recreated or the Agent is redeployed. See Kubernetes managed native configuration for the opt-in predicate, mounts, and copy lifecycle.

Redeployment does not imply a factory reset of native files, conversations, device state, plugins, or other persistent gateway data.

Failure behavior

Search documentation