Agent Viewer

Agent Viewer Help Documentation

Agent Viewer is the web-based real-time observation panel for Hawa Code. Once enabled, it starts a local HTTP + WebSocket service, allowing you to view messages from the main Agent and each SubAgent in your browser, synchronized with the terminal CLI.


1. Enable Agent Viewer

Method 1: Via the /config Interface

  1. Enter /config in the Hawa Code REPL to open the configuration interface.

  2. Find the Web Server option and toggle it to on.

  3. After saving the configuration, the service will start automatically and the terminal will print the access address, for example:

    WebServer started at http://127.0.0.1:3210
  4. Open the address in your browser to enter Agent Viewer.

Method 2: Edit settings.json Directly

Add a webServer configuration to the global settings.json:

{
"webServer": {
"enabled": true,
"port": 3210,
"host": "127.0.0.1"
}
}

Configuration details:

Field Type Default Description
enabled boolean false Whether to enable the WebServer
port number 3210 Listening port
host string 127.0.0.1 Listening address; defaults to local access only

Restart Hawa Code and the service will start automatically.


2. Interface Layout

The Agent Viewer interface consists of four parts:

  1. Top title bar: Displays Hawa Code - Agent Viewer and the WebSocket connection status.
  2. Agent tabs: Switch between the currently displayed Agents, including the main Agent and each SubAgent.
  3. Message list area: Shows conversation messages, tool calls, execution results, etc. for the current Agent.
  4. Bottom status bar: Displays the total number of Agents, active Agents, message count, and WebSocket connection status.

alt text


3. Auto-scroll and Manual Pause

  • Auto-scroll is enabled by default; new messages automatically scroll to the bottom.
  • When you manually scroll up to view history, auto-scroll pauses automatically.
  • After pausing, a Resume auto-scroll button appears; click it to resume auto-scroll.

4. WebSocket Real-time Connection

  • Agent Viewer maintains a long connection with the Hawa Code backend via WebSocket.
  • When the connection drops, the frontend automatically attempts to reconnect every 3 seconds.
  • Connection status is shown in the top title bar and bottom status bar:
    • connected: connected
    • connecting: connecting
    • disconnected: disconnected

5. Multi-Agent Switching

When Hawa Code enables Agent Team or multi-Agent collaboration, Agent Viewer displays all active Agents in the tab bar:

  • main: the main Agent, always present.
  • Other SubAgents: display the Agent name and type, such as Explore, Coder, etc.
  • The dot color on the tab indicates the Agent status:
    • Green / running: currently executing
    • Gray / ended: task finished

Click a tab to switch to the message stream of the corresponding Agent.