Skip to content

Create workflow persistence (agent-initiated, limited privileges)

POST
/api/v4/ai/duo_workflows/agent_workflows

Accessible via ai_workflows scope token. Does not accept agent_privileges or pre_approved_agent_privileges.

Media type application/json
object
project_id

The ID or path of the workflow project

string
nullable
Example
1
namespace_id

The ID or path of the workflow namespace

string
nullable
Example
1
ai_catalog_item_consumer_id

The ID of AI Catalog ItemConsumer that configures which catalog item to execute.

integer
nullable
Example
1
start_workflow

Optional parameter to start workflow in a CI pipeline.This feature is currently in an experimental state.

boolean
nullable
Example
true
goal

Goal of the workflow

string
nullable
Example
Fix pipeline for merge request 1 in project 1
workflow_definition

Workflow type based on its capability

string
nullable
Example
software_developer
allow_agent_to_request_user

When this is enabled Duo Agent Platform may stop to ask the user questions before proceeding. When it is disabled Duo Agent Platform will always just run through the workflow without ever asking for user input. Defaults to true.

boolean
nullable
Example
true
image

Container image to use for running the workflow in CI pipeline.

string
nullable
Example
registry.gitlab.com/gitlab-org/duo-workflow/custom-image:latest
source_branch

Source branch for the CI pipeline. Uses default branch when not specified.

string
nullable
Example
main
environment

Environment for the workflow.

string
nullable
Allowed values: ide web chat_partial chat ambient
ai_catalog_item_version_id

The ID of AI Catalog ItemVersion that sourced flow config used by the workflow.

integer
nullable
Example
1
additional_context

Additional Context required by the Flow, in JSON format. Contains an array of context details, where each detail is a Hash with a minimum of “Category” and “Content” keys.

Array<object>
nullable
object
Category
required

The category of the context detail

string
nullable
Content
required

The content type of the context detail

string
nullable
shallow_clone

Whether or not the workflow should use a shallow clone of the repository during its execution. Defaults to true.

boolean
default: true nullable
Example
true
issue_id

IID of the Issue noteable that the workflow is associated with.

integer
nullable
Example
123
merge_request_id

IID of the MergeRequest noteable that the workflow is associated with.

integer
nullable
Example
123

Created

Validation failed

Unauthorized

403 Forbidden

Not found