curl --request POST \
--url https://guidinghand.ai/v1/start_states \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"from": "<string>",
"script": "<string>",
"instruction": "<string>",
"agent_id": "<string>",
"description": "<string>",
"metadata": {
"customer_id": "cus_42"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
from: '<string>',
script: '<string>',
instruction: '<string>',
agent_id: '<string>',
description: '<string>',
metadata: {customer_id: 'cus_42'}
})
};
fetch('https://guidinghand.ai/v1/start_states', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/start_states"
payload = {
"name": "<string>",
"from": "<string>",
"script": "<string>",
"instruction": "<string>",
"agent_id": "<string>",
"description": "<string>",
"metadata": { "customer_id": "cus_42" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "start_state",
"start_state_id": "ss_0aQ3Vb7sT2Lc",
"kind": "image",
"name": "Printer offline",
"description": "<string>",
"from": "win10-22h2",
"method": "hand",
"script": "<string>",
"instruction": "<string>",
"agent_id": "<string>",
"task_id": "<string>",
"status": "building",
"version": 123,
"os": "windows",
"labels": [
"vm"
],
"runner_id": "<string>",
"error": "<string>",
"view": {
"screen_url": "<string>",
"input_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"metadata": {
"customer_id": "cus_42"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Create a start state
Makes a machine from from on a runner that has it. With script, the script runs and the machine is saved (building, then ready or failed). With instruction, an Eager task sets it up (linked in task_id), then it’s saved. With neither (method: hand), the machine stays open for someone to set up by hand: watch it with /screen, drive it with /input, then /save. start_state.ready or start_state.failed is sent when it’s done. Needs the admin role or an API key.
curl --request POST \
--url https://guidinghand.ai/v1/start_states \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"from": "<string>",
"script": "<string>",
"instruction": "<string>",
"agent_id": "<string>",
"description": "<string>",
"metadata": {
"customer_id": "cus_42"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
from: '<string>',
script: '<string>',
instruction: '<string>',
agent_id: '<string>',
description: '<string>',
metadata: {customer_id: 'cus_42'}
})
};
fetch('https://guidinghand.ai/v1/start_states', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/start_states"
payload = {
"name": "<string>",
"from": "<string>",
"script": "<string>",
"instruction": "<string>",
"agent_id": "<string>",
"description": "<string>",
"metadata": { "customer_id": "cus_42" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "start_state",
"start_state_id": "ss_0aQ3Vb7sT2Lc",
"kind": "image",
"name": "Printer offline",
"description": "<string>",
"from": "win10-22h2",
"method": "hand",
"script": "<string>",
"instruction": "<string>",
"agent_id": "<string>",
"task_id": "<string>",
"status": "building",
"version": 123,
"os": "windows",
"labels": [
"vm"
],
"runner_id": "<string>",
"error": "<string>",
"view": {
"screen_url": "<string>",
"input_url": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"metadata": {
"customer_id": "cus_42"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Authorizations
Body
With script, the runner boots from, runs it and saves the machine. With instruction, an Eager task with that prompt sets it up, then it’s saved. With neither, the machine boots and stays open for someone to set it up by hand.
Response
OK
A machine to start each try from: a runner’s base OS install (kind: image, read-only, every org sees it) or a saved machine made from one (kind: state).