---
title: "Generate agent based on input text prompts"
method: POST
path: "/generateAgent"
tags: ["Agent"]
---

# Generate agent based on input text prompts

`POST /generateAgent`

## Request

- Base URL: `https://www.taskade.com/api/v2`
- URL: `https://www.taskade.com/api/v2/generateAgent`
- Auth: OAuth 2 and HTTP bearer
  - Authorization code: `https://www.taskade.com/oauth2/authorize`
  - Token URL: `https://www.taskade.com/oauth2/token`

## Request body

- object
  - `folderId` string, required
  - `text` string, required

## Response `200`

Default response

- object
  - `ok` true, required
  - `item` SpaceAgent, required
    - `id` string, required
    - `name` string, required
    - `space_id` string, required
    - `data` object, required
      - `commands` object[], required
        - `name` string, required: Human-readable name of the command in title case. This should probably be a verb.
        - `description` string, nullable: Short summary for discovery (e.g. progressive disclosure / skill listing). The full instruction stays in `prompt`.
        - `prompt` string, required: Tell the agent what this command will do. It should be positioned as a direct instruction to the agent. At least 30 words.
        - `id` string, required: ID based on the name in snake case.
        - `mode` 'default' | 'plan-and-execute-v1' | 'plan-and-execute-v2'
      - `description` string: Role and purpose of agent, positioned as a direct instruction to the agent. Example: "You are a doctor that helps save lives.". At least 100 words.
      - `tone` 'authoritative' | 'clinical' | 'cold' | 'confident' | 'cynical' | 'emotional' | 'empathetic' | 'formal' | 'friendly' | 'humourous' | 'informal' | 'ironic' | 'optimistic' | 'pessimistic' | 'playful' | 'sarcastic' | 'serious' | 'sympathetic' | 'tentative' | 'warm' | 'creative' | 'inspiring' | 'casual'
      - `avatar` object
        - `type` 'emoji', required
        - `data` object, required
          - `value` string, required: Pick the most suitable emoji for this agent.
      - `knowledgeEnabled` boolean
      - `language` string: The language of the agent, e.g. en-US, zh-Hans
      - `inputPlaceholder` string, nullable

---

[API](https://skmtc.dev/taskade/apis/taskade-public-api-v2.md) - [All operations](https://skmtc.dev/taskade/apis/taskade-public-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/taskade/apis/taskade-public-api-v2/revisions/45f0e74ec083?raw)
