---
title: "Create Agent"
method: POST
path: "/api/v1/agents"
tags: ["agents"]
---

# Create Agent

`POST /api/v1/agents`

## Request body

- AgentCreateCommand
  - `name` string, required — The name of the agent. The name must only contain the following characters: a-z, A-Z, 0-9, -, _, and space. The name must not be empty. The name must start and end with a letter or a number. The name must not be longer than 64 characters.
  - `description` string
  - `dataSchema` JsonSchema
    - `title` string
    - `description` string
    - `type` 'object'
    - `properties` object, required
    - `required` string[]
  - `autoConfirm` boolean — If true, the agent will automatically confirm the data extracted, i.e., no review is necessary.
  - `dataDestinations` union[]
    - union
      - DataDestinationAskUiWorkflowCreate
        - `type` 'ASKUI_WORKFLOW'
        - `host` 'SELF' | 'ASKUI'
        - `runnerTags` string[]
        - `workflows` string[]
      - DataDestinationWebhookCreate
        - `type` 'WEBHOOK'
        - `url` string, uri, required
        - `headers` object
  - `parentId` string, uuid4, nullable — The ID of an agent that this agent is created from, i.e., of the previous version of this agent. Parent is going to be archived as part of the creation of the new (active) agent.
  - `emailTrigger` EmailAgentTriggerCreate
    - `active` boolean — If false, no emails can be send to trigger agent.
    - `allowedSenders` string[] — The email addresses that are allowed to send emails to trigger the agent. If empty, no emails can be send to trigger agent.
    - `localPart` string, nullable — Defaults to a unique email string if not provided.
  - `workspaceId` string, uuid4, required
  - `templateId` string, required — The ID of the template to copy files from.

## Response `201`

Successful Response

- Agent
  - `id` string, uuid4
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `name` string, required — The name of the agent. The name must only contain the following characters: a-z, A-Z, 0-9, -, _, and space. The name must not be empty. The name must start and end with a letter or a number. The name must not be longer than 64 characters.
  - `status` 'ACTIVE' | 'ARCHIVED', required
  - `autoConfirm` boolean, required — If true, the agent will automatically confirm the data extracted, i.e., no review is necessary.
  - `description` string
  - `emailTrigger` EmailAgentTrigger, required
    - `active` boolean — If false, no emails can be send to trigger agent.
    - `allowedSenders` string[] — The email addresses that are allowed to send emails to trigger the agent. If empty, no emails can be send to trigger agent.
    - `email` string, required — The email address of the agent to send emails to to trigger the agent. The email address must be unique for each agent. The domain of the email address is fixed. The local part of the email address must be between 1 and 64 characters long and can only contain the following characters: a-z, A-Z, 0-9, -, _, . and +.
  - `dataSchema` JsonSchema
    - `title` string
    - `description` string
    - `type` 'object'
    - `properties` object, required
    - `required` string[]
  - `dataDestinations` union[], required
    - union
      - DataDestinationAskUiWorkflow
        - `type` 'ASKUI_WORKFLOW'
        - `host` 'SELF' | 'ASKUI', required
        - `runnerTags` string[], required
        - `workflows` string[], required
      - DataDestinationWebhook
        - `type` 'WEBHOOK'
        - `url` string, uri, required
        - `headers` object, required
  - `workspaceId` string, uuid4, required
  - `folderPath` string, nullable

## Other responses

- `409` — Conflict
- `422` — Validation Error
- `500` — Internal server error

---

[API](https://skmtc.net/askui/apis/askui-workspaces-api.md) · [All operations](https://skmtc.net/askui/apis/askui-workspaces-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/askui/askui-workspaces-api/versions/b796c74292ac/schema)
