---
title: "POST /api/v1/projects/{projectUuid}/code/aiAgents"
method: POST
path: "/api/v1/projects/{projectUuid}/code/aiAgents"
---

# POST /api/v1/projects/{projectUuid}/code/aiAgents

`POST /api/v1/projects/{projectUuid}/code/aiAgents`

## Path parameters

- `projectUuid` string, required

## Query parameters

- `force` boolean

## Request body

- object
  - `agents` AgentAsCode[], required
    - `downloadedAt` string, date-time
    - `updatedAt` string, date-time
    - `evaluations` AgentAsCodeEvaluation[]
      - `prompts` AgentAsCodeEvaluationPrompt[], required
        - `expectedResponse` string, nullable, required
        - `prompt` string, required
      - `title` string, required
    - `modelConfig` AiAgentModelConfig, required
      - `reasoning` boolean
      - `modelProvider` string, required
      - `modelName` string, required
    - `enableUserContext` boolean, required
    - `enableContentTools` boolean, required
    - `enableSelfImprovement` boolean, required
    - `enableDataAccess` boolean, required
    - `tags` string[], nullable, required
    - `instruction` string, nullable, required
    - `imageUrl` string, nullable, required
    - `description` string, nullable, required
    - `name` string, required
    - `slug` string, required
    - `agentVersion` 1 | 2, required
    - `version` number, double, required
    - `contentType` 'ai_agent', required

## Response `200`

Success

- ApiAgentAsCodeUpsertResponse
  - `results` AgentAsCodeUpsertChanges, required
    - `deleted` string[], required
    - `unchanged` string[], required
    - `updated` string[], required
    - `created` string[], required
  - `status` 'ok', required

## Other responses

- `default` — Error

---

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