Create a worker template
POST/api/workers
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.
Body ParametersJSON
instructions: optional string
Persistent system prompt the worker uses for every task it runs.
maxLength20000
outputSchema: optional map[unknown]
Optional JSON Schema (Draft-07) describing the structured object the worker must produce. When set, every task response is validated against the schema and exposed as structuredOutput.
prompt: optional string
Natural-language description of the worker to use for AI-generated instructions when instructions is omitted.
maxLength10000
summary: optional string
Short one-line description of the worker’s purpose. Auto-generated when omitted and a prompt is provided.
maxLength80
Create a worker template
curl https://handinger.com/api/workers \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $HANDINGER_API_KEY" \
-d "{
\"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.\",
\"outputSchema\": {
\"type\": \"bar\",
\"required\": \"bar\",
\"properties\": \"bar\"
},
\"prompt\": \"A worker that fact-checks short claims and returns a verdict with citations.\",
\"summary\": \"Audits copy against the Acme brand voice guide.\",
\"title\": \"Brand voice analyzer\",
\"visibility\": \"public\"
}"{
"id": "id",
"createdAt": "createdAt",
"instructions": "instructions",
"organizationId": "organizationId",
"outputSchema": {
"foo": "bar"
},
"summary": "summary",
"title": "title",
"updatedAt": "updatedAt",
"url": "https://v3.handinger.com/worker/wrk_vk81XUHKHG-qr4",
"userId": "userId",
"visibility": "public"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"instructions": "instructions",
"organizationId": "organizationId",
"outputSchema": {
"foo": "bar"
},
"summary": "summary",
"title": "title",
"updatedAt": "updatedAt",
"url": "https://v3.handinger.com/worker/wrk_vk81XUHKHG-qr4",
"userId": "userId",
"visibility": "public"
}