# Mix-of-Agents Executable Dashboard Adapter

Local-only browser dashboard aligned with the executable workspace at:

```text
your extracted AgentOS folder
```

## Files

- `AgentOS_Dashboard.html` — lean live workspace UI with chat/task staging, logs, connectors, setup notes, and endpoint tiles.
- `dashboard_server.py` — local HTTP bridge serving the executable workspace and reading/writing `Config/providers.json` plus legacy `Config/provider.json`.
- `Launch-Dashboard.ps1` — Windows PowerShell launcher for the dashboard bridge.

## Provider behavior

The dashboard uses the executable schema, not the older `AgentOSKernel/Config/providers.dashboard.json` schema.

Primary config:

```text
Config/providers.json
```

Legacy compatibility config:

```text
Config/provider.json
```

Current intended defaults:

- `gemini` — active default; uses `Config/Keys/gemini.key.txt` and `gemini-3.5-flash`.
- `ollama-cloud` — existing Ollama cloud route.
- `local-ollama` — existing local Ollama route.
- `chatgpt-oauth` — OAuth/login route, not an API-key tile.
- `openai-api`, `anthropic`, `grok` — frontier/API options.

## API vs OAuth tiles

API tiles include:

- endpoint/chat-completions URL
- default model dropdown
- current API keys, masked only
- add additional API key row
- save tile action

OAuth tiles include:

- OAuth/login endpoint
- default model dropdown
- login/config link
- OAuth config-key generator

OAuth tiles intentionally do not show the API-key section. They are not set up the same way. A shocking discovery, apparently worth writing down.

## Secret handling

- Raw API keys are never returned by `/api/providers`.
- Existing keys are shown only as masked tails.
- Added keys are stored under `Config/Keys/<provider>/`.
- OAuth config keys are stored under `Config/OAuth/<provider>/`, returned once when generated, and later exposed only as a masked tail.

## Run

From the executable root:

```powershell
cd your extracted AgentOS folder
python Adapters\UI\LiveDashboard\dashboard_server.py --host 127.0.0.1 --port 8000
```

Open:

```text
http://127.0.0.1:8000/Adapters/UI/LiveDashboard/AgentOS_Dashboard.html
```

## Verification performed

- Python syntax check for `dashboard_server.py`.
- JavaScript syntax check with `node --check`.
- `GET /api/status` reports executable workspace and active provider `gemini`.
- `GET /api/providers` returns executable providers without raw key leakage.
- API-key add/delete smoke test passed and cleanup completed.
- OAuth config-key generation smoke test passed and cleanup completed.
- Browser check confirmed OAuth tile has no API-key section and no JavaScript console errors.
- `AgentOS.ps1 -SelfTest` passed against the executable workspace.
