docs/web/tui.md
openclaw gateway
openclaw tui
Remote Gateway:
openclaw tui --url ws://<host>:<port> --token <gateway-token>
Use --password if your Gateway uses password auth.
Run the TUI without a Gateway:
openclaw chat
# or
openclaw tui --local
openclaw chat and openclaw terminal are aliases for openclaw tui --local.--local cannot be combined with --url, --token, or --password.openclaw (no subcommand) picks a target automatically: unconfigured install runs onboarding; invalid config opens Crestodian; valid config opens this TUI shell in gateway mode if a Gateway is reachable, otherwise in local mode.tui.footer.showRemoteHost is enabled, remote Gateway connections also show the connection host.Agents are unique slugs (e.g. main, research). The Gateway exposes the list.
Sessions belong to the current agent.
Session keys are stored as agent:<agentId>:<sessionKey>.
/session main, the TUI expands it to agent:<currentAgent>:main./session agent:other:main, you switch to that agent session explicitly.Session scope:
per-sender (default): each agent has many sessions.global: the TUI always uses the global session (the picker may be empty).The current agent + session are always visible in the footer.
To show the Gateway host for non-local URL-backed connections, opt in with:
openclaw config set tui.footer.showRemoteHost true
Default is false. Loopback and embedded local connections never show a host label.
If the session has a goal, the footer shows its compact state:
Pursuing goal, Goal paused (/goal resume), Goal blocked (/goal resume), or Goal achieved.
When started without --session, gateway-mode TUI resumes the last selected session for the same gateway, agent, and session scope if that session still exists. Passing --session, /session, /new, or /reset remains explicit.
tools.message for visible replies can satisfy the active TUI turn with a targetless message.send; explicit provider delivery still uses normal configured channels and never falls back to lastChannel.openclaw tui --deliver to turn it on. There is no /deliver slash command or Settings toggle to flip it mid-session; restart the TUI to change it./session <key> to jump to an older known session./settings): toggle tool output expansion and thinking visibility. This panel does not control delivery.Core:
/help/status (Gateway-forwarded; shows session/model summary)/gateway-status (alias /gwstatus; shows Gateway connection status directly)/agent <id> (or /agents)/session <key> (or /sessions)/model <provider/model> (or /models)Session controls:
/think <off|minimal|low|medium|high> (higher tiers may add levels like xhigh/max depending on the model)/fast <status|auto|on|off>/verbose <on|full|off>/trace <on|off>/reasoning <on|off|stream>/usage <off|tokens|full|reset> (reset/inherit/clear/default clears the session override)/goal [status] | /goal start <objective> | /goal edit <objective> | /goal pause|resume|complete|block|clear/elevated <on|off|ask|full> (alias: /elev)/activation <mention|always>Session lifecycle:
/new (spawn a fresh, isolated session under a new key; does not affect other TUI clients on the old session)/reset (reset the current session key in place)/abort (abort the active run)/settings/exit (or /quit)Local mode only:
/auth [provider] opens the provider auth/login flow inside the TUI.Crestodian:
/crestodian [request] returns from the normal agent TUI to the Crestodian setup/repair chat, optionally forwarding one request.Other Gateway slash commands (for example, /context) are forwarded to the Gateway and shown as system output. See Slash commands.
! to run a local shell command on the TUI host.! disabled for the session.cd/env).OPENCLAW_SHELL=tui-local in their environment.! is sent as a normal message; leading spaces do not trigger local exec.Crestodian is the ring-zero setup/repair assistant, exposed as openclaw crestodian (or launched automatically when bare openclaw finds an invalid config). It runs inside the same local TUI shell as openclaw tui --local, backed by a dedicated dialogue/operations layer instead of a live model+tools session:
openclaw crestodian # start interactively
openclaw crestodian -m "status" # run one request and exit
openclaw crestodian -m "set default model openai/gpt-5.2" --yes # apply a config write
--yes.--json prints the startup overview as JSON instead of starting the chat.open-tui request (for example, asking to talk to a normal agent) exits Crestodian and opens the regular agent TUI; use /crestodian there to come back.Use local mode when the current config already validates and you want the embedded agent to inspect it on the same machine, compare it against the docs, and help repair drift without depending on a running Gateway.
If openclaw config validate is already failing, start with openclaw configure or openclaw doctor --fix first; openclaw chat still needs a loadable config to start.
Typical loop:
openclaw chat
Compare my gateway auth config with the docs and suggest the smallest fix.
!openclaw config file
!openclaw docs gateway auth token secretref
!openclaw config validate
!openclaw doctor
openclaw config set or openclaw configure, then rerun !openclaw config validate.!openclaw doctor --fix.Tips:
openclaw config set or openclaw configure over hand-editing openclaw.json.openclaw docs "<query>" searches the live docs index from the same machine.openclaw config validate --json is useful when you want structured schema and SecretRef/resolvability errors.OPENCLAW_THEME=light before launching openclaw tui.OPENCLAW_THEME=dark.openclaw-tui under the coarse ui client mode (the same mode Control UI and WebChat use for Gateway policy).--local: Run against the local embedded agent runtime--url <url>: Gateway WebSocket URL (defaults to gateway.remote.url from config, or ws://127.0.0.1:<port> on loopback)--token <token>: Gateway token (if required)--password <password>: Gateway password (if required)--session <key>: Session key (default: main, or global when scope is global)--deliver: Deliver assistant replies to the provider (default off)--thinking <level>: Override thinking level for sends--message <text>: Send an initial message after connecting--timeout-ms <ms>: Agent timeout in ms (defaults to agents.defaults.timeoutSeconds)--history-limit <n>: History entries to load (default 200)No output after sending a message:
/status in the TUI to confirm the Gateway is connected and idle/busy.openclaw logs --follow.openclaw status and openclaw models status.--deliver (this cannot be turned on later without restarting).disconnected: ensure the Gateway is running and your --url/--token/--password are correct.openclaw agents list and your routing config.openclaw.json