Hire an agent from a role template (ai.manage and organisation admin)
import requests
url = "https://platform.ankra.app/api/v1/org/ai-tasks/templates/{template_id}/hire"
payload = { "cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/ai-tasks/templates/{template_id}/hire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-tasks/templates/{template_id}/hire \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"name": "<string>",
"goal_prompt": "<string>",
"trigger": {
"kind": "mission",
"cron_expression": "<string>",
"timezone": "<string>",
"alert_id": "<string>",
"purpose": "<string>",
"application_id": "<string>",
"branch": "<string>"
},
"tool_profile": "read_only",
"autonomy_level": "read_only",
"enabled": true,
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget": {
"max_runs_per_day": 123,
"max_tool_calls": 123,
"max_write_actions": 123,
"max_turns": 123,
"max_runtime_minutes": 123,
"max_tokens_per_day": 123,
"tier_overrides": {}
},
"model_mode": "<string>",
"board_worker": true,
"acts_as_service_principal": true,
"capabilities": {},
"next_run_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"template_id": "<string>",
"template_version": 123,
"template_current_version": 123,
"template_customised": true,
"can_work_board": true,
"cannot_work_board_reason": "<string>",
"latest_run": {}
}AI Management
Hire an agent from a role template (ai.manage and organisation admin)
POST
/
api
/
v1
/
org
/
ai-tasks
/
templates
/
{template_id}
/
hire
Hire an agent from a role template (ai.manage and organisation admin)
import requests
url = "https://platform.ankra.app/api/v1/org/ai-tasks/templates/{template_id}/hire"
payload = { "cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({cluster_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/ai-tasks/templates/{template_id}/hire', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/ai-tasks/templates/{template_id}/hire \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"name": "<string>",
"goal_prompt": "<string>",
"trigger": {
"kind": "mission",
"cron_expression": "<string>",
"timezone": "<string>",
"alert_id": "<string>",
"purpose": "<string>",
"application_id": "<string>",
"branch": "<string>"
},
"tool_profile": "read_only",
"autonomy_level": "read_only",
"enabled": true,
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"budget": {
"max_runs_per_day": 123,
"max_tool_calls": 123,
"max_write_actions": 123,
"max_turns": 123,
"max_runtime_minutes": 123,
"max_tokens_per_day": 123,
"tier_overrides": {}
},
"model_mode": "<string>",
"board_worker": true,
"acts_as_service_principal": true,
"capabilities": {},
"next_run_at": "2023-11-07T05:31:56Z",
"last_run_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"template_id": "<string>",
"template_version": 123,
"template_current_version": 123,
"template_customised": true,
"can_work_board": true,
"cannot_work_board_reason": "<string>",
"latest_run": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Agent created
Show child attributes
Show child attributes
Available options:
read_only, standard, admin Available options:
read_only, propose, auto Show child attributes
Show child attributes