Skip to content
Draft, pre-release documentation

Kasm Session Runtime is one program. It runs inside the session container as the session user, next to the applications it drives, and the image needs nothing else installed for it. Kasm’s session container is the isolation boundary.

The runtime is one process inside the session container, running as the session user. Inside the container it talks to the X server over X11 and XTEST, to Chrome’s DevTools over CDP on loopback, to the accessibility bus over AT-SPI, and to the session user’s processes and files. From outside the container, an agent over MCP or HTTP and a person in the viewer’s sidebar reach it through Kasm’s proxy. Its own connection out of the session is to the model server, when one is configured; what it drives uses the network as the container allows.Session containerisolated by KasmKasm Session Runtimeone binary, as the session userX serverX11 and XTESTscreen, keys, clicksDevToolsCDP on loopbackpage elementsAccessibilityAT-SPI busnamed controlsProcesses, filesthe sessionuser’s ownYour agentMCP or HTTP, with the tokenA personthe sidebar in the viewerthrough Kasm’s proxyModel serveroptionalOpenAI-compatibleits own connection out
The runtime runs inside the session container as the session user. Callers reach it through Kasm's proxy. Its own connection out is to the model server, when one is configured; what it drives, the browser and the commands it runs, uses the network as the container allows.
Target What it reaches
The X server (the session’s display) The screen, key presses, clicks, typing and the list of windows
Chromium-family browsers The page’s elements, through the browser’s DevTools port (Chrome DevTools Protocol)
Firefox The page’s elements by selector, through WebDriver BiDi. Firefox has no accessibility tree
The accessibility bus (AT-SPI) Named controls in GTK, Qt and Electron applications, and their state
Processes and files The session user’s own processes and files, and the output folder a run writes to

The runtime has the session user’s rights and no more. See What the runtime can reach.

Caller How it connects
The sidebar A panel beside the desktop in the KasmVNC viewer. A person sends messages, answers questions and watches activity there
The agent in your workspace Runs in a terminal window inside the session and calls the runtime’s methods
Your agent or script Calls the runtime over MCP or plain HTTP, through Kasm’s proxy
A scenario A command inside the session runs the file, writes the report and stops

The runtime listens for outside callers only when the session starts with a session token. The token is also the credential every caller presents. Kasm’s proxy reaches the listener through the workspace’s port map entry named runtime, and it also requires the caller’s Kasm sign-in. See Enable the runtime on a workspace for the switch and Your agent or script for the calls.

Over HTTP the runtime serves a few routes.

Route What it is
/mcp MCP over HTTP, for agents
/v1/call/<method> The same 68 methods as plain HTTP calls, described by an OpenAPI document at /v1/openapi.json
/v1/files/, /v1/dirs/ File transfer, limited to the session user’s home folder and /tmp
/cdp/<name>/ A raw DevTools proxy, offered only when KASM_ENABLE_CDP is set
/events, /artifacts/ A live copy of the run’s activity and its output folder, which the sidebar reads

The full lists are in MCP methods and HTTP API.

The runtime’s own connection out of the session is to a vision model, when you configure one with KASM_RUNTIME_VISION_ENDPOINT. Screenshots it asks that model about go there. The agent in your workspace talks to its own provider with the workspace’s credentials. Applications and commands use the network as the container allows, and the runtime adds no restriction to that.

A model is optional. See When you need a model.