WorkflowServer debug UI defaults to wrong API endpoint (localhost:8000) #29

Closed
opened 2026-02-16 02:16:11 -05:00 by yindo · 2 comments
Owner

Originally created by @b-raines on GitHub (Dec 29, 2025).

Summary

The workflow debugger UI served by WorkflowServer defaults to http://localhost:8000 as the API endpoint, but this doesn't match the actual server port. Since the UI and API are served from the same origin, the UI should default to window.location.origin.

Steps to Reproduce

  1. Start a WorkflowServer using the CLI (which defaults to port 8080):

    python -m workflows.server my_server.py
    
  2. Open http://localhost:8080/ in a browser

  3. The debug UI shows "Workflow server is unreachable" because it's trying to connect to http://localhost:8000 instead of http://localhost:8080

Expected Behavior

The debug UI should automatically connect to the same origin it's served from (window.location.origin), since the UI and API are served by the same WorkflowServer.

Current Behavior

The UI defaults to a hardcoded http://localhost:8000, which doesn't match:

  • The __main__.py CLI default port (8080)
  • The serve() method default port (80)
  • Any custom port the user configures

Users must manually click the settings gear and change the API URL to match their actual server port.

Suggested Fix

In @llamaindex/workflow-debugger, change the default API URL from the hardcoded http://localhost:8000 to window.location.origin. This way the UI will automatically work regardless of which port the server runs on.

Environment

  • llama-index-workflows: 2.11.5
  • @llamaindex/workflow-debugger: 0.2.2 (loaded from CDN)

Workaround

Users can manually configure the API URL in the settings panel, but this is unintuitive since the UI and API are served from the same server.

Originally created by @b-raines on GitHub (Dec 29, 2025). ## Summary The workflow debugger UI served by `WorkflowServer` defaults to `http://localhost:8000` as the API endpoint, but this doesn't match the actual server port. Since the UI and API are served from the same origin, the UI should default to `window.location.origin`. ## Steps to Reproduce 1. Start a WorkflowServer using the CLI (which defaults to port 8080): ```bash python -m workflows.server my_server.py ``` 2. Open `http://localhost:8080/` in a browser 3. The debug UI shows "Workflow server is unreachable" because it's trying to connect to `http://localhost:8000` instead of `http://localhost:8080` ## Expected Behavior The debug UI should automatically connect to the same origin it's served from (`window.location.origin`), since the UI and API are served by the same `WorkflowServer`. ## Current Behavior The UI defaults to a hardcoded `http://localhost:8000`, which doesn't match: - The `__main__.py` CLI default port (8080) - The `serve()` method default port (80) - Any custom port the user configures Users must manually click the settings gear and change the API URL to match their actual server port. ## Suggested Fix In `@llamaindex/workflow-debugger`, change the default API URL from the hardcoded `http://localhost:8000` to `window.location.origin`. This way the UI will automatically work regardless of which port the server runs on. ## Environment - `llama-index-workflows`: 2.11.5 - `@llamaindex/workflow-debugger`: 0.2.2 (loaded from CDN) ## Workaround Users can manually configure the API URL in the settings panel, but this is unintuitive since the UI and API are served from the same server.
yindo closed this issue 2026-02-16 02:16:11 -05:00
Author
Owner

@adrianlyjak commented on GitHub (Dec 29, 2025):

Fair point. Its meant to be able to easily connect to backends rather than just be embedded, but localhost:8000 is a dumb default. Will fix.

Also, FYI, you can seed the backend url with an api query parameter. Probably not helpful here, but just in case, you can visit https://localhost:8090/?api=/ to auto configure it to your current host

@adrianlyjak commented on GitHub (Dec 29, 2025): Fair point. Its meant to be able to easily connect to backends rather than just be embedded, but localhost:8000 is a dumb default. Will fix. Also, FYI, you can seed the backend url with an `api` query parameter. Probably not helpful here, but just in case, you can visit `https://localhost:8090/?api=/` to auto configure it to your current host
Author
Owner

@adrianlyjak commented on GitHub (Jan 6, 2026):

Fix released just now in v2.11.7

@adrianlyjak commented on GitHub (Jan 6, 2026): Fix released just now in v2.11.7
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#29