Update a worker template
workers.update(strworker_id, WorkerUpdateParams**kwargs) -> WorkerTemplate
PATCH/api/workers/{workerId}
Update a worker’s instructions, title, summary, visibility, or output schema. Only the fields you send are changed; omitted fields keep their current values. Only the worker creator can update a worker.
Parameters
instructions: Optional[str]
Replaces the persistent system prompt. Subsequent tasks pick up the new instructions immediately; in-flight tasks keep using the previous version.
maxLength20000
Update a worker template
import os
from handinger import Handinger
client = Handinger(
api_key=os.environ.get("HANDINGER_API_KEY"), # This is the default and can be omitted
)
worker_template = client.workers.update(
worker_id="t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM",
title="Claim verdict v2",
)
print(worker_template.id){
"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"
}