Workers
Create a worker template
Create a new worker. The worker is a reusable agent template; tasks are runs against this template. Use POST /tasks to actually run the agent.
post/api/workers
Request body
Example request
{
"title": "Brand voice analyzer",
"instructions": "You are a brand voice analyzer. Read the input text and report whether it matches Acme's playful, plain-spoken house style. Quote specific phrases.",
"summary": "Audits copy against the Acme brand voice guide.",
"prompt": "A worker that fact-checks short claims and returns a verdict with citations.",
"visibility": "public",
"outputSchema": {
"type": "object",
"required": [
"verdict",
"summary"
],
"properties": {
"verdict": {
"type": "string",
"enum": [
"supported",
"debunked",
"mixed",
"unknown"
]
},
"summary": {
"type": "string"
},
"citations": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}Response
Created worker template.
Example response
{
"url": "https://v3.handinger.com/worker/wrk_vk81XUHKHG-qr4"
}