Creating your account

First, you need to sign up for a Skylight account.

Quickstart

1

Fetch API key

Sign in to your Dashboard to get your auto-generated API key.

2

Install SDK

Install the Python SDK.

pip install skylight-sdk
3

Configure client

Configure the client with your API key.

from skylight_sdk import Skylight

client = Skylight(apikey="your_api_key")
4

Start a Windows instance

instance = client.windows.start()

This returns:

{
    "id": "i-123456",          # Unique identifier of the created instance
    "message": "Instance ready to use",  # Human-readable status message
    "livestream_url": "launchskylight.com/embed/i-123456",  # URL to livestream the instance
    "state": "running"         # State of the instance (running, pending, hibernated, terminated)
}
5

Interact with the Windows desktop

Control the Windows desktop with built-in tools.

# Move the mouse
instance.computer(
    action="move_mouse",
    coordinates=[500, 300]
)

# Left click
instance.computer(
    action="click_mouse"
)

# Type text
instance.computer(
    action="type_text",
    text="Hello from Skylight!"
)

# Open an application
instance.computer(
    action="open_app",
    app_name="Excel"
)
6

Take actions with your agent

Control your Windows desktop programmatically using the agent.

# Run a workflow
result = instance.agent.run("Open PowerPoint and make a 3 slide presentation about San Francisco, include a diagram")

# Get structured data
emails = instance.agent.run({
    "task": "Open Outlook and get all unread emails",
    "output_schema": {
        "emails": [{"subject": "str", "sender": "str", "date": "str"}]
    }
})
7

Stop the instance

Stop the instance when you’re done.

instance.stop()