## Update a worker template `workers.update(worker_id, **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 - `worker_id: String` - `instructions: String` Replaces the persistent system prompt. Subsequent tasks pick up the new instructions immediately; in-flight tasks keep using the previous version. - `output_schema: Hash[Symbol, untyped]` Replace the worker's structured output schema. Pass `null` to clear it and return to free-form text responses. - `summary: String` Replaces the worker's short one-line summary. - `title: String` New display name for the worker. - `visibility: :public | :private` Change visibility between `public` (any org member can run tasks) and `private` (only invited members). - `:public` - `:private` ### Returns - `class WorkerTemplate` - `id: String` - `created_at: String` - `instructions: String` - `organization_id: String` - `output_schema: Hash[Symbol, untyped]` - `summary: String` - `title: String` - `updated_at: String` - `url: String` Web URL of the worker in the Handinger dashboard. - `user_id: String` - `visibility: :public | :private` - `:public` - `:private` ### Example ```ruby require "handinger" handinger = Handinger::Client.new(api_key: "My API Key") worker_template = handinger.workers.update("t_org_123_w_01HZY2ZJQ8G7K42W2D7WF6V4GM") puts(worker_template) ``` #### Response ```json { "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" } ```