> ## 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.

# Create Single Task Agent

> Creates a new agent specifically for a single-task operation.

### **Endpoint:**

**POST** `/v3/agents/template/single-task`

### **Description:**

Creates a new agent specifically for a single-task operation.

### **Request Headers:**

| Header       | Type   | Required | Description                                 |
| ------------ | ------ | -------- | ------------------------------------------- |
| x-api-key    | String | Yes      | API key for authentication                  |
| accept       | String | Yes      | Expected response format (application/json) |
| content-type | String | Yes      | Format of request body (application/json)   |

### **Request Body:**

```json theme={null}
{
  "name": "string",
  "description": "string",
  "agent_role": "string",
  "agent_instructions": "string",
  "examples": "string",
  "features": [
    {
      "type": "string",
      "config": {},
      "priority": 0
    }
  ],
  "tool": "string",
  "tool_usage_description": "string",
  "llm_credential_id": "string",
  "response_format": {},
  "provider_id": "string",
  "model": "string",
  "top_p": 0,
  "temperature": 0
}
```

### **Request Example (cURL):**

```sh theme={null}
curl -X POST "https://agent-prod.studio.lyzr.ai/v3/agents/template/single-task" ^
-H "accept: application/json" ^
-H "content-type: application/json" ^
-H "x-api-key: sk-default-XXXXXXX" ^
-d "{\"name\":\"string\",\"description\":\"string\",\"agent_role\":\"string\",\"agent_instructions\":\"string\",\"examples\":\"string\",\"features\":[{\"type\":\"string\",\"config\":{},\"priority\":0}],\"tool\":\"string\",\"tool_usage_description\":\"string\",\"llm_credential_id\":\"string\",\"response_format\":{},\"provider_id\":\"string\",\"model\":\"string\",\"top_p\":0,\"temperature\":0}"
```


## OpenAPI

````yaml post /agents/template/single-task
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:
    post:
      tags:
        - Agents
      summary: Create Single Task Agent
      description: Creates a new agent specifically for a single-task operation.
      operationId: createSingleTaskAgent
      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
                response_format:
                  type: object
                provider_id:
                  type: string
                model:
                  type: string
                top_p:
                  type: number
                temperature:
                  type: number
              required:
                - name
                - description
                - agent_role
                - agent_instructions
                - tool
      responses:
        '201':
          description: Single task agent created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: 67890
                  message:
                    type: string
                    example: Single task agent created successfully.
        '400':
          description: Invalid request
        '401':
          description: Unauthorized - Invalid API key
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````