> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glasswarp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ways to run agents

> Two ways to run agents on a rig: chat-driven MCP for quick tasks, scaffolded SDK agents for multi-step work — plus pre-built demos.

There are two ways to drive a rig, and the right one depends on how many steps
the task takes.

Both need the same prerequisite: an online rig with API access enabled by the
owner — see [Pair a rig](/get-started/pair-rig).

## Chat-driven (MCP)

Your assistant drives the PC step by step through MCP tools: it captures the
screen, decides, clicks or types, and captures again. This is great for quick
tasks and supervision — "what's on my screen?", "open Notepad and type hello",
approving a dialog while you watch.

The tradeoff: each *step* costs a model turn. Predictable sequences — menus,
dialogs, typing into a field you just clicked — can be batched into one call
(`send_actions`), so you are not paying a turn per keystroke. Adaptive loops
where every move depends on new information — clearing a board, anything that
repeats — still add up, and that is what the SDK path is for.

Setup: [Connect via MCP](/get-started/mcp).

## Scaffolded SDK agents

For multi-step work, a small Python script loops `observe → decide → act` at
full speed. The decision logic lives inside the script — heuristics, computer
vision, or an LLM call — so there's no chat round-trip per step. This is the
right tool for games, workflows, and anything that repeats.

If you're connected through a code-capable assistant, it will typically offer to
write this script for you; you can also start from the
[SDK quickstart](/quickstart) or the [agent loop guide](/guides/agent-loop).

```bash theme={null}
pip install glasswarp
export GLASSWARP_API_KEY=gw_live_sk_...
python my_agent.py
```

## Pre-built demos

Some pre-built demo agents ship with the SDK — install and run, no code to
write:

```bash theme={null}
pip install "glasswarp[demos]"
export GLASSWARP_API_KEY=gw_live_sk_...

glasswarp-demo list
glasswarp-demo minesweeper
```

| id            | Command                      |
| ------------- | ---------------------------- |
| `minesweeper` | `glasswarp-demo minesweeper` |
| `mona-lisa`   | `glasswarp-demo mona-lisa`   |
| `paint`       | `glasswarp-demo paint`       |
| `notepad`     | `glasswarp-demo notepad`     |

MCP clients can browse the same catalog with the `list_demos` / `get_demo`
tools, which return the install command and the exact command to run.

## Billing

Both paths use the same metered sessions: wall-clock minutes from session start
to end, and idle sessions auto-end after about 15 minutes. See
[pricing](https://www.glasswarp.com/pricing).

## Related

* [Connect via MCP](/get-started/mcp)
* [Build an agent loop](/guides/agent-loop)
* [Safe agent sessions](/guides/safe-agent-sessions)
* [Python SDK](/quickstart)
