Custom Agents
List custom agents
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/custom-agents"{
"$schema": "/api/v1/schemas/ListCustomAgentsOutputBody.json",
"agents": [
{
"$schema": "/api/v1/schemas/CustomAgentDTO.json",
"agent_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"disable_tools": true,
"findings_schema": {
"property1": null,
"property2": null
},
"max_tool_rounds": 0,
"model": "string",
"name": "string",
"project_id": "string",
"slug": "string",
"system": "string",
"tools": [
"string"
],
"updated_at": "2019-08-24T14:15:22Z"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Create a custom agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/custom-agents" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "name": "string", "slug": "string", "system": "string" }'{
"$schema": "/api/v1/schemas/CustomAgentDTO.json",
"agent_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"disable_tools": true,
"findings_schema": {
"property1": null,
"property2": null
},
"max_tool_rounds": 0,
"model": "string",
"name": "string",
"project_id": "string",
"slug": "string",
"system": "string",
"tools": [
"string"
],
"updated_at": "2019-08-24T14:15:22Z"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get a custom agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Custom agent UUID
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/custom-agents/string"{
"$schema": "/api/v1/schemas/CustomAgentDTO.json",
"agent_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"disable_tools": true,
"findings_schema": {
"property1": null,
"property2": null
},
"max_tool_rounds": 0,
"model": "string",
"name": "string",
"project_id": "string",
"slug": "string",
"system": "string",
"tools": [
"string"
],
"updated_at": "2019-08-24T14:15:22Z"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Delete a custom agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Custom agent UUID
Response Body
application/problem+json
curl -X DELETE "https://loading/api/v1/custom-agents/string"{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Update a custom agent
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
Custom agent UUID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X PUT "https://loading/api/v1/custom-agents/string" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "name": "string", "slug": "string", "system": "string" }'{
"$schema": "/api/v1/schemas/CustomAgentDTO.json",
"agent_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"description": "string",
"disable_tools": true,
"findings_schema": {
"property1": null,
"property2": null
},
"max_tool_rounds": 0,
"model": "string",
"name": "string",
"project_id": "string",
"slug": "string",
"system": "string",
"tools": [
"string"
],
"updated_at": "2019-08-24T14:15:22Z"
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}