Quickstart
Request your first workstation, connect to it using VNC, and run test commands.
1. Get API key
Request an API key by signing up for our waitlist. You will set your login credentials as part of sign-up.
We will email you once your account is unlocked, after which you will be able to find your API key on the dashboard.
2. Request Workstation
Set API Key environment variable
Open a new terminal window and run the following command, swapping out {YOUR-API-KEY}
with the key you received in the previous step:
export WORKSTATION_API_KEY="{YOUR-API-KEY}"
Run Command in Terminal
We will use the Request Workstation endpoint to provision a new workstation.
- Swap the placeholder in
Authorization
with your API key. type
is how you select a prebuilt spec for the workstation. For this quickstart, leave this value asdefault
, which will provision the workstation with all software & hardware enabled.
curl -L "https://api.agentstation.ai/v1/workstations" \
-H 'Accept: application/json' \
-H 'Authorization: $WORKSTATION_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"type": "default"
}'
If successful, you will receive a response which will include a workstation id
. You will need this value to connect to the workstation via VNC.
{
"id": "{WORKSTATION-ID}",
"type": "default",
"status": "active",
"startedAt": "2024-12-01T10:30:00Z"
}
3. Connect with VNC
You can use any VNC client to connect to the workstation. For this quickstart, we'll use TigerVNC.
First, download and install the appropriate binary from their Github releases page.
Next, open the TigerVNC viewer and add the following to the address field. Make sure to replace {WORKSTATION-ID}
with the workstation id
you received in the previous step:
api.agentstation.ai/v1/workstations/{WORKSTATION-ID}:5900
On successful connection, you should see a desktop open. Your very own virtual workstation! You can move your mouse around and interact with the desktop just like any other computer.
4. Run 'Hello World' Google Search in Terminal
To test sending commands to the workstation, we will open a new browser tab, navigate to google.com, and search for "hello world".
Navigate back to your terminal. We recommend having the terminal and VNC window open side by side so you can see the commands being executed in real-time.
Set workstationID environment variable
In your terminal, run the following command, swapping out {WORKSTATION-ID}
with your workstation id
:
export WORKSTATION_ID="{WORKSTATION-ID}"
Run Commands
In your terminal, run the following commands to open a new browser tab, navigate to google.com, search for "hello world", and press Enter to submit the search.
As you run each command, you should see the agent perform the action in the VNC window.
Open a new browser tab and go to url
curl -L "https://api.agentstation.ai/v1/workstations/$WORKSTATION_ID/browser/tabs" \
-H 'Accept: application/json' \
-H 'Authorization: $WORKSTATION_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://www.google.com/"
}'
Input text
curl -L "https://api.agentstation.ai/v1/workstations/$WORKSTATION_ID/browser/text" \
-H 'Accept: application/json' \
-H 'Authorization: $WORKSTATION_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"selector": "textarea[title=\'Search\']",
"speed": "slow",
"copy": "Hello World"
}'
Press Enter
curl -L "https://api.agentstation.ai/v1/workstations/$WORKSTATION_ID/browser/keyboard" \
-H 'Accept: application/json' \
-H 'Authorization: $WORKSTATION_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"event": "press",
"text": "Enter"
}'
5. Release Workstation
Finally, you can release the workstation using the Release workstation endpoint:
curl -L -X DELETE "https://api.agentstation.ai/v1/workstations/$WORKSTATION_ID/release" \
-H 'Accept: application/json' \
-H 'Authorization: $WORKSTATION_API_KEY'
You should receive a response indicating that the workstation has been released:
{
"type": "default",
"released": true
}
6. Next Steps
This quickstart runs through the basics of requesting a workstation and how commands can be used to control agent workflows.
To build more autonomous agents, we recommend reading the Levels of Autonomy guide to get a broader understanding of how AgentStation can be used with AI models to drive workstation actions, as well as how to build "human-in-the-loop" capabilities into your application.