hylo-playground¶
Hylo playground: a local web UI to explore runs, replay episodes, run live episodes, compare agents and inspect improvement campaigns
Repository hylo-studio, packages/hylo-playground. Licence: Apache-2.0. Depends on: hylo-core, hylo-eval, hylo-catalog, fastapi>=0.110, uvicorn>=0.29, pillow>=10.
Registered entry points
| Group | Name | Object |
|---|---|---|
| commands | playground |
hylo.playground.app:main |
| Module | Summary |
|---|---|
hylo.playground.app |
Hylo playground: a local web UI over the existing system (FastAPI backend + React frontend) |
hylo.playground.control |
Control plane (S4): the playground backend as the operator's single entry point to workcells and policy servers |
hylo.playground.jobs |
Background jobs: the playground launches the same CLI commands a user would type (hylo run / evolve / learn / |
hylo.playground.live |
Live sandbox: run one episode of any experiment config and stream it to the browser as it happens |
hylo.playground.render |
Image encoding for the browser |
hylo.playground.app¶
Hylo playground: a local web UI over the existing system (FastAPI backend + React frontend).
hylo-playground --root runs --port 8765 # then open http://127.0.0.1:8765
Read-only pages go through the catalog API (hylo.catalog), never through other packages' internals.
Actions go through public paths only: live episodes through the kernel and SafetyShield, components through the
plugin registry, jobs and approval / rollback through the hylo command. Protected settings (safety, benchmark, trace, scoring)
cannot be overridden from the UI. Binds to 127.0.0.1 by default; with --token every API call needs it.
It is also the control plane for workcells and policy servers (control.py): --workcell name=url,
--policy name=url, and per-role tokens (--role-token viewer=... operator=... approver=...).
APPROVER_PATHS
module-attribute
¶
create_app ¶
create_app(root: str | Path = 'runs', *, repo: str | Path = '.', token: str | None = None, judge: str | None = None, workcells: list[Endpoint] | None = None, policies: list[Endpoint] | None = None, role_tokens: dict[str, str] | None = None) -> FastAPI
main ¶
run the playground: run explorer, live sandbox, campaigns and the workcell control plane
hylo.playground.control¶
Control plane (S4): the playground backend as the operator's single entry point to workcells and policy servers.
It never sends actions. It lists workcells and policy servers, starts episodes on a workcell (choosing the policy endpoint), relays operator events (reset confirmation, verdicts, stop, e-stop, clearing a fault) and proxies a workcell's live event stream to the browser.
Roles, by token (--role-token viewer=... --role-token operator=... --role-token approver=...):
- viewer: read everything, and press the e-stop (stopping is never gated behind a higher role);
- operator: start episodes, reset / verdict / stop / clear a fault, live sandbox, jobs;
- approver: everything, plus promote / roll back campaign versions.
Without role tokens (and without --token) the local user has every role.
hylo.playground.jobs¶
Background jobs: the playground launches the same CLI commands a user would type (hylo run / evolve / learn /
calibrate) as subprocesses, with their output in runs/playground/jobs/
KINDS
module-attribute
¶
KINDS = {'run': lambda a: ['run', a['config'], *(['--split', a['split']] if a.get('split') else []), *[x for kv in a.get('sets', []) for x in ('--set', kv)]], 'evolve': lambda a: ['evolve', 'run', a['config'], *[x for kv in a.get('sets', []) for x in ('--set', kv)]], 'learn': lambda a: ['learn', a['job'], *(['--python', a['python']] if a.get('python') else [])], 'calibrate': lambda a: ['calibrate', '--judge', json.dumps(a['judge']), '--runs', *a['runs'], '--splits', *a.get('splits', ['search_val']), *(['--task-prefix', a['task_prefix']] if a.get('task_prefix') else []), *(['--limit', str(a['limit'])] if a.get('limit') else []), *(['--out', a['out']] if a.get('out') else [])]}
JobManager ¶
run_cli ¶
Run one hylo command synchronously and return its last output line; raise with its output on failure.
hylo.playground.live¶
Live sandbox: run one episode of any experiment config and stream it to the browser as it happens.
The episode runs through the unchanged kernel (EpisodeRunner, SafetyShield). A bus subscriber turns events into
compact messages (camera frames as JPEG every step); the trace keeps every trace.image_every-th frame like any run,
in runs/playground/live/
User controls: task and seed from the benchmark, config overrides (protected scopes refused), an instruction override (the agent sees the user's text; the environment's task and success check are unchanged), stop.