Agents
Update a routine
Changes the prompt, cadence or next run time (scheduledAt), or
pauses and resumes it (enabled). At least one field is required.
Retries: safe: setting the same values again changes nothing.
PATCH
/
v1
/
workspaces
/
{workspaceId}
/
agents
/
{agentId}
/
routines
/
{routineId}
Update a routine
curl --request PATCH \
--url https://api.lusor.ai/v1/workspaces/{workspaceId}/agents/{agentId}/routines/{routineId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"prompt": "<string>",
"cadenceMinutes": 262802,
"scheduledAt": "2023-11-07T05:31:56Z",
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
prompt: '<string>',
cadenceMinutes: 262802,
scheduledAt: '2023-11-07T05:31:56Z',
enabled: true
})
};
fetch('https://api.lusor.ai/v1/workspaces/{workspaceId}/agents/{agentId}/routines/{routineId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/workspaces/{workspaceId}/agents/{agentId}/routines/{routineId}"
payload = {
"name": "<string>",
"prompt": "<string>",
"cadenceMinutes": 262802,
"scheduledAt": "2023-11-07T05:31:56Z",
"enabled": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": "<string>",
"name": "<string>",
"prompt": "<string>",
"cadenceMinutes": 123,
"scheduledAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"lastSessionId": "<string>",
"lastError": "<string>",
"enabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
ApiKeyBearerAuth
Path Parameters
Body
application/json
Was this page helpful?
⌘I
Update a routine
curl --request PATCH \
--url https://api.lusor.ai/v1/workspaces/{workspaceId}/agents/{agentId}/routines/{routineId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"prompt": "<string>",
"cadenceMinutes": 262802,
"scheduledAt": "2023-11-07T05:31:56Z",
"enabled": true
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
prompt: '<string>',
cadenceMinutes: 262802,
scheduledAt: '2023-11-07T05:31:56Z',
enabled: true
})
};
fetch('https://api.lusor.ai/v1/workspaces/{workspaceId}/agents/{agentId}/routines/{routineId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/workspaces/{workspaceId}/agents/{agentId}/routines/{routineId}"
payload = {
"name": "<string>",
"prompt": "<string>",
"cadenceMinutes": 262802,
"scheduledAt": "2023-11-07T05:31:56Z",
"enabled": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdBy": "<string>",
"name": "<string>",
"prompt": "<string>",
"cadenceMinutes": 123,
"scheduledAt": "2023-11-07T05:31:56Z",
"lastRunAt": "2023-11-07T05:31:56Z",
"lastSessionId": "<string>",
"lastError": "<string>",
"enabled": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
