curl --request POST \
--url 'https://response.stateset.com/api/v1/agents/provision' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"template_id": "string",
"type": "string",
"description": "string",
"instructions": "string",
"goal": "string",
"role": "string",
"activated": true,
"rules": [
{
"rule_name": "string",
"rule_type": "string",
"description": "string",
"activated": true,
"conditions": {
"any": null,
"all": null
},
"actions": []
}
],
"functions": [
{
"function_name": "string",
"endpoint": "string",
"method": "string",
"description": "string",
"activated": true,
"parameters": [],
"headers": {},
"timeout": 1
}
],
"settings": {
"model_name": "string",
"model_provider": "string",
"model_type": "string",
"temperature": 1,
"max_tokens": 1,
"top_p": 1,
"escalation_tag_name": "string",
"escalation_team_id": "string",
"agent_take_over_tag": "string"
}
}'
{
"object": "string",
"id": "string",
"name": null,
"type": null,
"description": null,
"activated": true,
"goal": null,
"role": null,
"updated_at": null,
"instructions": null,
"settings": {
"object": "string",
"configured": true
}
}
Build a complete agent — rules, tools and settings — in one atomic call
Preferred over create + configure + add_rule + add_function. Pass template_id to seed a proven ruleset.
POST
/
api
/
v1
/
agents
/
provision
curl --request POST \
--url 'https://response.stateset.com/api/v1/agents/provision' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"template_id": "string",
"type": "string",
"description": "string",
"instructions": "string",
"goal": "string",
"role": "string",
"activated": true,
"rules": [
{
"rule_name": "string",
"rule_type": "string",
"description": "string",
"activated": true,
"conditions": {
"any": null,
"all": null
},
"actions": []
}
],
"functions": [
{
"function_name": "string",
"endpoint": "string",
"method": "string",
"description": "string",
"activated": true,
"parameters": [],
"headers": {},
"timeout": 1
}
],
"settings": {
"model_name": "string",
"model_provider": "string",
"model_type": "string",
"temperature": 1,
"max_tokens": 1,
"top_p": 1,
"escalation_tag_name": "string",
"escalation_team_id": "string",
"agent_take_over_tag": "string"
}
}'
{
"object": "string",
"id": "string",
"name": null,
"type": null,
"description": null,
"activated": true,
"goal": null,
"role": null,
"updated_at": null,
"instructions": null,
"settings": {
"object": "string",
"configured": true
}
}
Preferred over create + configure + add_rule + add_function. Pass template_id to seed a proven ruleset.
Request body
ProvisionAgent
string
required
string
Seeds rules/attributes/examples from a starter template.
string
One of: assistant, customer_service, sales.
string
string
The system prompt / persona.
string
string
boolean
object[]
object[]
object
Model config. Defaults to the template’s when a template is used.
Response
Agent
string
string
string,null
string,null
string,null
boolean
string,null
string,null
string,null
string,null
Present on single-agent reads and writes only.
AgentSettingsOut
Status codes
| Code | Meaning |
|---|---|
201 | The provisioned agent, with a summary of what was created |
400 | Invalid request. issues names the offending field(s). |
401 | Missing, invalid, or expired API key. |
403 | The key lacks a required scope. |
409 | Conflict — either the creation ceiling was reached for this organization (agent_limit_reached), or a request with the same Idempotency-Key is still in flight (idempotency_in_progress); retry the latter after the first attempt settles. |
422 | The Idempotency-Key was already used with a DIFFERENT request body (idempotency_key_reused). Reuse a key only to retry the identical request. |
429 | Rate limit exceeded. |
Access
| Required scope | agents:write |
| Rate limit | 10 requests per minute |
curl --request POST \
--url 'https://response.stateset.com/api/v1/agents/provision' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"template_id": "string",
"type": "string",
"description": "string",
"instructions": "string",
"goal": "string",
"role": "string",
"activated": true,
"rules": [
{
"rule_name": "string",
"rule_type": "string",
"description": "string",
"activated": true,
"conditions": {
"any": null,
"all": null
},
"actions": []
}
],
"functions": [
{
"function_name": "string",
"endpoint": "string",
"method": "string",
"description": "string",
"activated": true,
"parameters": [],
"headers": {},
"timeout": 1
}
],
"settings": {
"model_name": "string",
"model_provider": "string",
"model_type": "string",
"temperature": 1,
"max_tokens": 1,
"top_p": 1,
"escalation_tag_name": "string",
"escalation_team_id": "string",
"agent_take_over_tag": "string"
}
}'
{
"object": "string",
"id": "string",
"name": null,
"type": null,
"description": null,
"activated": true,
"goal": null,
"role": null,
"updated_at": null,
"instructions": null,
"settings": {
"object": "string",
"configured": true
}
}