Eyes and hands for AI agents on real Windows — Python SDK for the Glasswarp Platform API.
Project description
Glasswarp Python SDK
See any screen. Control any PC. One API.
Glasswarp gives your agent eyes and hands on a real Windows machine; you
supply the brain (model, prompts, CV, solvers). Example task logic lives under
examples/ and outcome-named starters under templates/ — not in the platform.
Public plans: Free / Builder / Growth / Enterprise. Game Mode at /play is a frozen
demo of the same capture pipeline.
pip install glasswarp
# optional SoM / image helpers:
pip install "glasswarp[grounding]"
Publish status: packaging targets PyPI as
glasswarp(0.1.0). Until the first upload lands, install from this repo:pip install -e sdk/python. Operator steps:docs/PYPI_PUBLISH.md.
Want Claude / Cursor with no project code? Use the remote MCP server instead — glasswarp.com/mcp · docs.
Quickstart
from glasswarp import GlasswarpClient
gw = GlasswarpClient(api_key="gw_live_sk_...")
# List your rigs
rigs = gw.list_rigs()
rig = rigs[0]
# Start a desktop session
session = gw.create_session(rig_id=rig.id)
# Take a screenshot (returns JPEG bytes)
screenshot = gw.screenshot(session.session_id)
with open("screen.jpg", "wb") as f:
f.write(screenshot.jpeg)
# Send input
gw.click(session.session_id, x=500, y=400)
gw.type_text(session.session_id, "Hello from Python!")
gw.key_press(session.session_id, "Enter")
# End the session
gw.end_session(session.session_id)
Configuration
| Parameter | Env var | Default |
|---|---|---|
api_key |
GLASSWARP_API_KEY |
(required) |
base_url |
GLASSWARP_BASE_URL |
https://signal.glasswarp.com |
API reference
Rigs
list_rigs()— all rigs accessible to this keyget_rig(rig_id)— single rig detail
Sessions
create_session(rig_id, mode="desktop")— start a sessionget_session(session_id)— current statuslist_sessions()— all active sessionsend_session(session_id)— end and trigger safety_restore
Visual
screenshot(session_id, max_width=None, quality=None, x=y=w=h=None)— JPEG; optional ROI cropdirty_rects(session_id)— accumulated DXGI dirty rects since last poll (VP0)list_targets(session_id)— sparse click targets from host UIA (P8); empty if noneobserve(session_id, mark=True, targets=None, …)— one RTT: JPEG + dirty + targets (SoM when marked)
Grounding (SoM)
Agents should click targets, not guessed pixels:
from glasswarp import targets_from_grid, som_annotate
# Host UIA targets (P8) or client CV/grid:
targets = targets_from_grid(x0=100, y0=200, x1=900, y1=800, rows=8, cols=8)
obs = gw.observe(session.session_id, max_width=1280, mark=True, targets=targets)
# obs.jpeg is Set-of-Mark annotated; model returns target id →
gw.click_target(session.session_id, "12", targets=targets)
som_annotate(jpeg, targets, native_width=…, native_height=…)— draw numbered marks (needspip install pillow)targets_from_grid(…)— build cell targets for a rectangular boardclick_target(session_id, target_or_id, targets=…)— click bbox center
Apps
launch_app(session_id, path, args=None)— spawn a process on the rig (returnspid)kill_app(session_id, pid=None)— kill session-launched apps (pidoptional)
Input
send_input(session_id, events)— batch input eventsclick(session_id, x, y, button)— click at coordinatestype_text(session_id, text)— type a stringkey_press(session_id, key)— press a keymove_mouse(session_id, x, y)— move cursorscroll(session_id, dx, dy)— scroll
Stream
stream(session_id)— WebRTC signaling credentials for a live 60fps feed
Templates
Outcome-named starters in templates/ (observe → think → act → verify):
templates/observe_think_act/— minimal agent-loop skeletontemplates/notepad_type/— Notepad via UIA + typetemplates/live_view_hitl/— hold a session for Console Live View
Examples
See examples/ for complete runnable scripts:
quickstart.py— connect, screenshot, click, type, disconnectvp0_smoke.py— dirty rects + ROI screenshot smokevp0_observe.py— shared VP0 helper (dirty skip + ROI coalesce) for agent loopspaint_mark_demo.py— an agent draws a themed GLASSWARP outline in Paint (custom colors + native drag). See Paint quickstart.paint_mona_lisa_demo.py— an agent reproduces the Mona Lisa in Paint (observe→think→act→verify: vision placement, UIA colors, tile fills, Save As→Desktop). VNC-hard differentiator. See Mona Lisa quickstart.notepad_uia_demo.py— Notepad via UIA targets + type. See Notepad quickstart.minesweeper_solver_demo.py— Minesweeper demo (CV + solver). See quickstart.gemini_agent_loop.py— Minesweeper demo with Gemini + SoM →click_target→ verifyclaude_agent_loop.py— observe → Claude → act; VP0 on by default (VP0=0for full frames)
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glasswarp-0.1.0.tar.gz.
File metadata
- Download URL: glasswarp-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3941e29eb5a0bed886cc709cc51e2cf7d1993ab3c2df0fb35a8c941c149c1782
|
|
| MD5 |
20ab4634c4c54bc6adf6b374366ba8a0
|
|
| BLAKE2b-256 |
355e937bca9bc838b0fcaa4b3d5cbdd9b81ac6092d8db7fb56870d14e56c52ad
|
Provenance
The following attestation bundles were made for glasswarp-0.1.0.tar.gz:
Publisher:
publish-sdk.yml on saferelay/project-x
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glasswarp-0.1.0.tar.gz -
Subject digest:
3941e29eb5a0bed886cc709cc51e2cf7d1993ab3c2df0fb35a8c941c149c1782 - Sigstore transparency entry: 2216249641
- Sigstore integration time:
-
Permalink:
saferelay/project-x@31a8b1ebc86e4ca199b35fe6e2f6d1913a5d5358 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/saferelay
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@31a8b1ebc86e4ca199b35fe6e2f6d1913a5d5358 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file glasswarp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: glasswarp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3656a16d3dab2f3292b277a167e80e2e1aec072b78af6233dabafddfe9794f2b
|
|
| MD5 |
43a549f38ac6c62a3aca89fcc4328c2e
|
|
| BLAKE2b-256 |
76d924237cc0f1f72fcdecd04c7f9a4dcfab6f0e12e64418022599a22339b3a0
|
Provenance
The following attestation bundles were made for glasswarp-0.1.0-py3-none-any.whl:
Publisher:
publish-sdk.yml on saferelay/project-x
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
glasswarp-0.1.0-py3-none-any.whl -
Subject digest:
3656a16d3dab2f3292b277a167e80e2e1aec072b78af6233dabafddfe9794f2b - Sigstore transparency entry: 2216249671
- Sigstore integration time:
-
Permalink:
saferelay/project-x@31a8b1ebc86e4ca199b35fe6e2f6d1913a5d5358 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/saferelay
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdk.yml@31a8b1ebc86e4ca199b35fe6e2f6d1913a5d5358 -
Trigger Event:
workflow_dispatch
-
Statement type: