---
title: "Create Agent Insights job"
method: POST
path: "/v1/private/agent-insights/jobs/{projectId}"
tags: ["Agent Insights Jobs"]
---

# Create Agent Insights job

`POST /v1/private/agent-insights/jobs/{projectId}`

## Request

- Base URL: `http://localhost:5173/api`
- URL: `http://localhost:5173/api/v1/private/agent-insights/jobs/{projectId}`
- Auth: none declared

Creates the Agent Insights job for a project, disabled: the daily schedule stays off until the job is enabled with PATCH. 409 if one already exists.

## Path parameters

- `projectId` string, uuid, required

## Response `201`

Job created

- AgentInsightsJob
  - `id` string, uuid
  - `project_id` string, uuid, required
  - `status` 'enabled' | 'disabled'
  - `auto_first_run_enrolled` boolean
  - `auto_first_run_at` string, date-time
  - `last_scan_at` string, date-time
  - `last_failure_reason` string
  - `last_failure_detail` string
  - `last_failed_at` string, date-time
  - `guidance` string: Project guidance sent to every run; null when none
  - `guidance_updated_by` string: Who last saved the guidance
  - `guidance_updated_at` string, date-time: When the guidance was last saved
  - `guidance_version` integer: Bumped each time the guidance text changes; 0 = never saved
  - `results_guidance_version` integer: Guidance version the current results were produced with; null = no run since guidance existed
  - `created_at` string, date-time
  - `created_by` string
  - `last_updated_at` string, date-time
  - `last_updated_by` string

## Other responses

- `404`: Project not found
- `409`: Job already exists

## Changes

- **2026-10-16** `4343d6730050`: 5 info
  - added the optional property `guidance` to the response with the `201` status
  - added the optional property `guidance_updated_at` to the response with the `201` status
  - added the optional property `guidance_updated_by` to the response with the `201` status
  - added the optional property `guidance_version` to the response with the `201` status
  - …1 more
- **2026-09-25** `3ab3b8180ae9`: 2 info
  - added the optional property `auto_first_run_at` to the response with the `201` status
  - added the optional property `auto_first_run_enrolled` to the response with the `201` status
- **2026-07-02** `3144ea40dac0`: 3 info
  - added the optional property `last_failed_at` to the response with the `201` status
  - added the optional property `last_failure_detail` to the response with the `201` status
  - added the optional property `last_failure_reason` to the response with the `201` status
- **2026-06-23** `d4ccb2feb097`: 1 info
  - added the optional property `last_scan_at` to the response with the `201` status
- **2026-06-19** `78b5cd88d461`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/comet-ml/apis/opik-rest-api/changes/v1/private/agent-insights/jobs/:projectId/post.md)

---

[API](https://skmtc.dev/comet-ml/apis/opik-rest-api.md) - [All operations](https://skmtc.dev/comet-ml/apis/opik-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/comet-ml/apis/opik-rest-api/revisions/0067fada8962?raw)
