OptionalclientDirectory of static client assets to serve at /.
OptionalenvEnvironment for host-mode connections (a ?host=1 WebSocket whose first
config frame supplies its own agent) and the source of secrets for the
per-connection runtime.
Supplying env does not by itself enable host mode: it is opt-in via
AAI_ALLOW_HOST (see isHostAllowed). Omitting env disables host mode
unconditionally — any ?host=1 connection is rejected.
OptionalgreetingAgent greeting, included in the GET /client-config response.
OptionalhostThe deployed agent. Host-mode sessions inherit its stt/llm/tts
provider config so they run the operator's configured pipeline instead of
the default S2S path. Only prompt/greeting/tools come from the client.
OptionalloggerStructured logger. Defaults to the console logger.
OptionalnameDisplay name served by GET /client-config. Defaults to "agent".
OptionalrequestFirst look at every HTTP request (after /health). Return true to claim
it — the server then leaves the response alone. The upgrade hook's
HTTP twin: lets an embedder (the platform's guest harness) add its own
HTTP surface — the studio coding agent's chat endpoint — without a
second HTTP server.
The runtime sessions are started on — see createRuntime.
OptionalupgradeFirst look at every WebSocket upgrade. Return true to claim it (the
server then leaves the socket alone); return false to fall through to
the standard /websocket session handling. Lets an embedder (the
platform's guest harness) add its own upgrade surface — its host
control channel — without a second HTTP server.
Configuration for createServer.