---
title: "Create agent"
method: POST
path: "/agents"
tags: ["agents"]
---

# Create agent

`POST /agents`

Creates an agent in a workspace.

## Query parameters

- `workspaceId` integer

## Request body

- CreateAgentRequest
  - `agentInstructions` string
  - `agentInstructionsTemplateId` string, nullable
  - `description` string, nullable
  - `name` string

## Response `200`

OK

- CreateAgentResponse
  - `agent` AgentDbDto
    - `agentInstructions` string
    - `agentInstructionsTemplateId` string, nullable
    - `createdBy` integer
    - `dateCreated` string, date-time
    - `description` string, nullable
    - `id` string
    - `lastUpdated` string, date-time
    - `name` string
    - `status` 'active' | 'inactive' | 'deleted'
    - `updatedBy` integer
    - `workspaceId` integer

## Other responses

- `400` — Bad request
- `403` — Operation not allowed
- `409` — Duplicate element

## Changes

> 14 revisions in range; 1 not diffed.

- **2026-07-24** `13316c9fe5ff` — 4 warning, 4 info
  - removed the request property `systemPrompt`
  - removed the request property `templateId`
  - removed the optional property `agent/systemPrompt` from the response with the `200` status
  - removed the optional property `agent/templateId` from the response with the `200` status
  - …4 more
- **2026-07-09** `aa8544683897` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/seqeralabs/apis/seqera-api/changes/agents/post.md)

---

[API](https://skmtc.dev/seqeralabs/apis/seqera-api.md) · [All operations](https://skmtc.dev/seqeralabs/apis/seqera-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/seqeralabs/seqera-api/revisions/97f7655d105a/schema)
