Three ways to drive a session
Kasm Session Runtime runs inside a Kasm session and lets AI agents and scripts use the desktop’s real applications. Three setups cover most uses, and they differ in who decides what happens next.
| Agent in your workspace | Your agent or script | Scenarios | |
|---|---|---|---|
| Who decides the steps | A coding agent (Claude Code, Codex or OpenCode) that the runtime starts inside the session, guided by you and by playbooks | Your code, or an agent you run, outside the session | The author, in a YAML file. A goal: step hands one stretch to the runtime’s own loop |
| Where the model runs | The agent’s own provider, on the workspace’s credentials | Wherever your agent runs | Nowhere, or on an endpoint you configure |
| Who watches | A person, in the sidebar beside the desktop | Your process | Nobody needs to |
| What you get back | Work done in the session’s applications and files, and the conversation | The result of each call | A verdict and a report with evidence |
| Typical use | Delegating desktop work with a person on hand for sign-ins and decisions | Adding a Kasm desktop to an agent or test suite you already have | Regression checks in CI, the same job across many sessions |
Which one fits
Section titled “Which one fits”Three questions settle most cases.
Is a person working in the session? If someone opens a workspace and wants an agent beside them, to take a task, ask when it needs a sign-in or a decision, and leave its work in the session, use Agent in your workspace. Nothing needs installing outside the workspace.
Do you already have an agent or a script? If you run Claude Code, Codex, another MCP client, a Playwright test or a Python program, and you want it to use a Kasm desktop, use Your agent or script. The runtime offers it the same 68 methods over MCP and plain HTTP.
Do you know the steps in advance? If the job is the same each time, such as a check that runs after every build or one task across many sessions, write a scenario. The runtime runs the file unattended, checks each step and writes a verdict and a report.
When the answers are mixed, pick the one that matches the part you care about most and combine from there.
Combining them
Section titled “Combining them”- A scenario can include a
goal:step. The runtime’s own loop works that stretch and the scripted steps around it stay fixed. The loop needs a vision model. See When you need a model. - A program outside the session can give the agent in your workspace its task, follow its progress and collect what it made. See From your own code.
- Playbooks and recipes serve all three. A playbook is a task brief that a person starts from the sidebar and an agent follows. A recipe is a checked operation any agent can call, and it returns a receipt. See Recipes.
- All three reach applications the same way: a page element or key chord first, a screen position last. See How an action reaches an application.