> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lyzr.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Single Task Agent Endpoint

> Updates an existing single-task agent with new configuration details.

### Description

Updates an existing single-task agent with new configuration details.

### Endpoint

**PUT** `/v3/agents/template/single-task/{agent_id}`

### Authentication

* Requires an API key (`x-api-key`) in the request headers.

### Path Parameters

| Parameter  | Type   | Description                                           |
| ---------- | ------ | ----------------------------------------------------- |
| `agent_id` | string | Unique identifier of the single-task agent to update. |

### Request Body (JSON)


## OpenAPI

````yaml put /agents/template/single-task/{agent_id}
openapi: 3.0.3
info:
  title: Lyzr Agent API
  version: 1.0.0
servers:
  - url: https://agent-prod.studio.lyzr.ai/v3
security: []
paths:
  /agents/template/single-task/{agent_id}:
    put:
      tags:
        - Single Task Agents
      summary: Update Single Task Agent
      description: Updates an existing single-task agent with new configuration details.
      operationId: updateSingleTaskAgent
      parameters:
        - name: agent_id
          in: path
          required: true
          description: Unique identifier of the single-task agent to update.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                agent_role:
                  type: string
                agent_instructions:
                  type: string
                examples:
                  type: string
                features:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                      config:
                        type: object
                      priority:
                        type: integer
                tool:
                  type: string
                tool_usage_description:
                  type: string
                llm_credential_id:
                  type: string
                provider_id:
                  type: string
                model:
                  type: string
                top_p:
                  type: number
                temperature:
                  type: number
                response_format:
                  type: object
      responses:
        '200':
          description: Single-task agent updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Agent updated successfully.
        '400':
          description: Invalid request
        '401':
          description: Unauthorized - Invalid API key
        '404':
          description: Agent not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````