Skip to main content
The HUD is a floating overlay for development. It streams your agent’s execution live on top of your running app: steps, tool calls, tokens, and cost. It uses the same telemetry Foglamp already collects, so you watch your tools run (and fail, and recover) without leaving your app.
The HUD does not need an API key. With hud: true and no apiKey, traces stream to the overlay but aren’t sent to the backend. If you have a key, both happen at once.

What you need

  • A React app (the overlay is a React component). Nothing to install beyond foglamp.
  • A server running on Node. The overlay connects to a small localhost event server that foglamp({ hud: true }) starts inside your process. It does not work on edge or serverless (see Caveats).

1. Install

If you already use Foglamp, you have everything. Otherwise:

2. Turn the HUD on (server)

Pass hud: true where you create the collector:
That’s the first line. Everything else, like fog.integration(...) on your calls, stays the same. The HUD uses the telemetry you already send.

3. Drop in the overlay (client)

Render <FoglampHUD /> once near the root of your client app, for example in your root layout. Its styles are isolated from yours, and it does nothing unless the local event server is running, so it’s safe to leave in.
That’s the second line. Run your app, trigger an AI flow, and watch it stream.

<FoglampHUD /> props

Server options

Two fields on foglamp(config) control the event server. See Configuration for the full table.
The client port and the server hudPort must match. If you run more than one HUD-enabled process locally, give each its own port and point its <FoglampHUD port={…} /> at it.

Recording a demo

Set redact before you record or screen share. It hides every prompt, response, and tool payload while keeping the timing, token, and cost view:

Caveats

The HUD is for local development only. hud: true is ignored in production and on edge or serverless runtimes, because the event server needs a long-lived Node process. Your normal telemetry is unaffected; only the overlay is turned off.
  • Node runtime, not edge. On Next.js, the route or handler that creates foglamp({ hud: true }) must run on the Node runtime (the default), not export const runtime = "edge".
  • No production cost. The HUD’s server code is loaded lazily and never enters your edge or browser bundle. The core foglamp entry stays free of React and HTTP code.
  • Safe to commit. <FoglampHUD /> does nothing unless the event server is running, so leaving both lines in is harmless. To be explicit, gate it to dev: