You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dashboard: let embedding tools limit engines, providers and the Chat tab
#2525
Tools that embed the dashboard in their own UI can't trim it to what they support. For example, a workspace app that proxies the dashboard into a panel and only manages local Chrome still shows Lightpanda, AgentCore, Browserbase, Browserless, Browser Use and Kernel in the New Session dialog, plus a Chat tab that opens by default. Choosing one of those options fails or does something the host app doesn't manage. Today the only way to remove them is to string-replace the minified JS that the dashboard serves, which breaks on every release.
What the dashboard does today:
BROWSER_OPTIONS in session-tree.tsx hardcodes Chrome, Lightpanda and the five cloud providers. The list doesn't come from the server, so it also can't show providers added by plugins.
page.tsx always renders the Chat tab with defaultValue="chat".
/api/chat/status already returns {"enabled": false} when AI_GATEWAY_API_KEY is unset, and useChatStatusSync stores it in chatEnabledAtom, but nothing reads that atom. Without a key, users land on a Chat tab whose first message fails with "AI_GATEWAY_API_KEY not set".
Proposal
1. Use the chat status the dashboard already fetches
When /api/chat/status reports enabled: false, hide the Chat tab and open Activity by default. This needs no new option. An embedder that doesn't want chat starts the dashboard without AI_GATEWAY_API_KEY.
If hiding the tab makes chat too hard to discover, the alternative is to keep the tab, open Activity by default, and show a setup hint in the Chat panel. That would still need an option for embedders.
2. Let dashboard start limit engines and providers
These options follow the --allowed-origins / AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINS pattern:
The New Session dialog would build its browser buttons from these lists and hide the picker when only one option is left. The server and UI ship in the same binary, so /api/chat/status could be replaced instead of kept.
This only changes what the UI offers. It isn't a security boundary, because /api/exec still runs any CLI command.
Alternative: derive the providers from credentials
doctor already maps each provider to its API key variable. The dashboard could list only providers whose credentials are set, and only engines that are installed. That avoids new flags but has two downsides: new users stop seeing which providers exist, and an embedder still can't hide an engine that happens to be installed, such as Lightpanda.
Questions
For chat, do you prefer hiding the tab when it's disabled, or keeping it with a setup hint?
For engines and providers, do you prefer explicit dashboard start options, derived availability, or both (derived by default, options to narrow it)?
Is /api/dashboard/config a good name for the endpoint, or would you rather extend an existing one?
I can open a PR for whichever design you prefer. A related PR, #2524, lets the dashboard run under a reverse-proxy path prefix, which is how these tools usually mount it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
Tools that embed the dashboard in their own UI can't trim it to what they support. For example, a workspace app that proxies the dashboard into a panel and only manages local Chrome still shows Lightpanda, AgentCore, Browserbase, Browserless, Browser Use and Kernel in the New Session dialog, plus a Chat tab that opens by default. Choosing one of those options fails or does something the host app doesn't manage. Today the only way to remove them is to string-replace the minified JS that the dashboard serves, which breaks on every release.
What the dashboard does today:
BROWSER_OPTIONSinsession-tree.tsxhardcodes Chrome, Lightpanda and the five cloud providers. The list doesn't come from the server, so it also can't show providers added by plugins.page.tsxalways renders the Chat tab withdefaultValue="chat"./api/chat/statusalready returns{"enabled": false}whenAI_GATEWAY_API_KEYis unset, anduseChatStatusSyncstores it inchatEnabledAtom, but nothing reads that atom. Without a key, users land on a Chat tab whose first message fails with "AI_GATEWAY_API_KEY not set".Proposal
1. Use the chat status the dashboard already fetches
When
/api/chat/statusreportsenabled: false, hide the Chat tab and open Activity by default. This needs no new option. An embedder that doesn't want chat starts the dashboard withoutAI_GATEWAY_API_KEY.If hiding the tab makes chat too hard to discover, the alternative is to keep the tab, open Activity by default, and show a setup hint in the Chat panel. That would still need an option for embedders.
2. Let
dashboard startlimit engines and providersThese options follow the
--allowed-origins/AGENT_BROWSER_DASHBOARD_ALLOWED_ORIGINSpattern:--engines <list>AGENT_BROWSER_DASHBOARD_ENGINES--providers <list|none>AGENT_BROWSER_DASHBOARD_PROVIDERSdashboard startmust match.agent_browser_dashboard_starttool gets matchingenginesandprovidersarguments.The UI would read one endpoint instead of
/api/chat/status, for exampleGET /api/dashboard/config:{ "engines": ["chrome"], "providers": [], "chat": { "enabled": false } }The New Session dialog would build its browser buttons from these lists and hide the picker when only one option is left. The server and UI ship in the same binary, so
/api/chat/statuscould be replaced instead of kept.This only changes what the UI offers. It isn't a security boundary, because
/api/execstill runs any CLI command.Alternative: derive the providers from credentials
doctoralready maps each provider to its API key variable. The dashboard could list only providers whose credentials are set, and only engines that are installed. That avoids new flags but has two downsides: new users stop seeing which providers exist, and an embedder still can't hide an engine that happens to be installed, such as Lightpanda.Questions
dashboard startoptions, derived availability, or both (derived by default, options to narrow it)?/api/dashboard/configa good name for the endpoint, or would you rather extend an existing one?I can open a PR for whichever design you prefer. A related PR, #2524, lets the dashboard run under a reverse-proxy path prefix, which is how these tools usually mount it.
Written by Opus 5.5 (opus-5.5) through Sprocket.
All reactions