# Code pipelines

9 calls. Every request needs the `Authorization` header: see [the overview](https://docs.maitento.com/reference.md).

## `pipelines.list`

```http
GET /code-pipelines
```

Every definition of the tenant, or of one namespace with `{ namespace }`.

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=GET%20%2Fcode-pipelines).

**Response:** [`CodePipeline`](https://docs.maitento.com/reference/types/code-pipeline.md)`[]` (200)

```bash title="curl"
curl -X GET "https://api.maitento.com/code-pipelines" \
  -H "Authorization: $MAITENTO_AUTH"
```
```ts title="TypeScript"
const pipelines = await mt.pipelines.list();
```
```python title="Python"
mt.pipelines.list()
```

## `pipelines.delete`

```http
DELETE /code-pipelines/by-id/{id}
```

Deletes the definition (refused with a 400 while something still uses it or a run of it is going).

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=DELETE%20%2Fcode-pipelines%2Fby-id%2F%7Bid%7D).

**Path parameters**

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | `uuid` | yes |  |

**Response:** no body (204)

```bash title="curl"
curl -X DELETE "https://api.maitento.com/code-pipelines/by-id/<id>" \
  -H "Authorization: $MAITENTO_AUTH"
```
```ts title="TypeScript"
await mt.pipelines.delete("f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b");
```
```python title="Python"
mt.pipelines.delete("d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a")
```

## `pipelines.get`

```http
GET /code-pipelines/by-id/{id}
```

The definition with this id. Throws `NotFoundError` when there is none.

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=GET%20%2Fcode-pipelines%2Fby-id%2F%7Bid%7D).

**Path parameters**

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | `uuid` | yes |  |

**Response:** [`CodePipeline`](https://docs.maitento.com/reference/types/code-pipeline.md) (200)

```bash title="curl"
curl -X GET "https://api.maitento.com/code-pipelines/by-id/<id>" \
  -H "Authorization: $MAITENTO_AUTH"
```
```ts title="TypeScript"
const pipeline = await mt.pipelines.get("f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b");
```
```python title="Python"
mt.pipelines.get("d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a")
```

## `pipelines.update`

```http
PUT /code-pipelines/by-id/{id}
```

Updates a pipeline (always a new version).

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=PUT%20%2Fcode-pipelines%2Fby-id%2F%7Bid%7D).

**Path parameters**

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | `uuid` | yes |  |

**Request body:** [`CodePipelineUpdateRequest`](https://docs.maitento.com/reference/types/code-pipeline-update-request.md)

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | yes | The pipeline's name, unique within its namespace. At most 128 characters. |
| `agents` | [`CodePipelineAgentInput`](https://docs.maitento.com/reference/types/code-pipeline-agent.md#in-a-request)`[]` | yes | The pipeline's agents. At least one. |
| `phases` | [`CodePipelinePhaseDefinitionInput`](https://docs.maitento.com/reference/types/code-pipeline-phase-definition.md#in-a-request)`[]` | yes | The pipeline's phases, each a group of steps. At least one. |
| `externalOperationsMcp` | [`McpExternalOperationBindingInput`](https://docs.maitento.com/reference/types/mcp-external-operation-binding.md#in-a-request)`[]` |  | MCP tools every agent of the pipeline may use. |
| `externalOperationsOpenApi` | [`OpenApiExternalOperationBindingInput`](https://docs.maitento.com/reference/types/open-api-external-operation-binding.md#in-a-request)`[]` |  | OpenAPI tools every agent of the pipeline may use. |
| `authenticationSecretInputs` | [`ConnectorAuthenticationSecretInputInput`](https://docs.maitento.com/reference/types/connector-authentication-secret-input.md#in-a-request)`[]` |  | Inputs a run supplies as secrets for the tools' authentication. |
| `bindingInputs` | [`ConnectorBindingInputInput`](https://docs.maitento.com/reference/types/connector-binding-input.md#in-a-request)`[]` |  | Inputs a run supplies as values bound into the tools' calls. |
| `promptInputs` | [`PromptInputInput`](https://docs.maitento.com/reference/types/prompt-input.md#in-a-request)`[]` |  | Inputs a run supplies for the step prompts (`%%input:name%%`). |
| `vfsBindings` | [`CodePipelineVfsBindingInput`](https://docs.maitento.com/reference/types/code-pipeline-vfs-binding.md#in-a-request)`[]` |  | File systems the pipeline declares for its agents. A run mounts only the file systems in its own `vfsMounts`. |
| `cogniscriptAppId` | `uuid \| null` |  | The app that holds the pipeline's hooks (its Cogniscript methods). Null: no hooks. |
| `systemPrompts` | `string[] \| null` |  | System prompts every agent of the pipeline gets. |
| `systemPromptMode` | [`CodePipelineSystemPromptMode`](https://docs.maitento.com/reference/types/code-pipeline-system-prompt-mode.md)`\| null` |  | How the pipeline's `systemPrompts` combine with the ones before them. Null: `Additional`. |
| `resumeVfsNamespace` | `string \| null` |  | The namespace of a file system to save the agents' sessions in, so a resumed or restarted run carries on from them. Null: sessions are not saved. |
| `resumeVfsName` | `string \| null` |  | The name of that file system, within `resumeVfsNamespace`. Null: `default`. |
| `durationWarning` | `timespan \| null` |  | Not used by code pipeline runs. |
| `durationAutoTermination` | `timespan \| null` |  | The longest any step may run, for steps whose step and phase set no `durationAutoTermination`. Null: Maitento's default. |
| `durationActivityTimeout` | `timespan \| null` |  | How long any step may go without activity before it is stopped, for steps whose step and phase set no `durationActivityTimeout`. Null: Maitento's default. |
| `hookDurationLimit` | `timespan \| null` |  | The longest one hook may run. Null: 30 seconds. |
| `includeEnvironmentInfo` | `boolean` |  | Not used by code pipeline runs. |
| `allowHumanInteraction` | `boolean` |  | Whether the agents may stop and ask a person a question. The run then waits in `HumanInteractionRequired` until it is answered. |
| `allowWebTools` | `boolean` |  | Whether the pipeline's agents get Maitento's web search and fetch tools. Off by default. |
| `onErrorHook` | `string \| null` |  | The name of a hook to run when the run hits an infrastructure error, such as a failed clone or push. |
| `maxFixIterations` | `integer \| null` |  | The most review-and-fix rounds a hook's fix loop may run. Null: 3. Capped at 5. |
| `confidenceThreshold` | `number \| null` |  | For a fix loop that ends on the agents' own confidence: the confidence, from 0 to 1, at which it stops. Null: 0.8. |
| `maxInjectedPhases` | `integer \| null` |  | The most phases hooks may add to one run in total. Null: 24. |
| `maxParallelSteps` | `integer \| null` |  | How many of a phase's steps may run at once. Null: 6. Between 1 and 16. |
| `credentialStack` | `string \| null` |  | The credential stack the pipeline's runs use, by id or name, when their start doesn't name one: its API keys and coding-agent sign-ins serve the engines, and Maitento's own keys never do. Null: the namespace's default stack, then your tenant's. |

**Response:** [`CodePipeline`](https://docs.maitento.com/reference/types/code-pipeline.md) (200)

```bash title="curl"
curl -X PUT "https://api.maitento.com/code-pipelines/by-id/<id>" \
  -H "Authorization: $MAITENTO_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"name":"...","agents":[],"phases":[]}'
```
```ts title="TypeScript"
const pipeline = await mt.pipelines.update("f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b", { ...definition, name: "fix-bug" });
```
```python title="Python"
mt.pipelines.update("d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a", name="code-generator", agents=[], phases=[])
```

## `pipelines.start`

```http
PUT /code-pipelines/processes/by-id/{id}/start
```

Starts a run of the pipeline's latest enabled version. Never retried; `launchIntentId` makes a deliberate re-send safe (the server answers with the run that id already started).

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=PUT%20%2Fcode-pipelines%2Fprocesses%2Fby-id%2F%7Bid%7D%2Fstart).

**Path parameters**

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | `uuid` | yes |  |

**Request body:** [`CodePipelineProcessStartRequestInput`](https://docs.maitento.com/reference/types/code-pipeline-process-start-request.md#in-a-request)

| Field | Type | Required | Description |
|---|---|---|---|
| `launchIntentId` | `uuid \| null` |  | Your own id for this start, to make retries safe: starting again with the same id returns the run it already created instead of starting a second one. Null: every start creates a new run. |
| `inputs` | [`NameValuePair`](https://docs.maitento.com/reference/types/name-value-pair.md)`[]` | yes | The run's input values, by input name. Send an empty array when there are none. |
| `agentOverrides` | [`CodePipelineProcessAgentOverrideInput`](https://docs.maitento.com/reference/types/code-pipeline-process-agent-override.md#in-a-request)`[] \| null` |  | Different engines or models for some of the agents, for this run. |
| `additionalAgents` | [`CodePipelineAgentInput`](https://docs.maitento.com/reference/types/code-pipeline-agent.md#in-a-request)`[] \| null` |  | Agents for this run only, alongside the pipeline's own. Steps, overrides and the review panel can name them. Each needs a `role` and a name of lower-case letters, digits and hyphens (up to 63 characters, not starting with a hyphen) that no other agent has. At most 16. |
| `reviewPanel` | [`CodePipelineReviewPanelInput`](https://docs.maitento.com/reference/types/code-pipeline-review-panel.md#in-a-request)`\| null` |  | The run's review panel. Each reviewer's step must be in the panel's phase (from the pipeline, or added with `additionalSteps`) with the same agent and output variable, and each reviewer's output variable must be unique. |
| `maxParallelSteps` | `integer \| null` |  | For this run, how many of a phase's steps may run at once, in place of the pipeline's `maxParallelSteps`. Null: the pipeline's value. Between 1 and 16. |
| `additionalSteps` | [`CodePipelineProcessAdditionalStepsInput`](https://docs.maitento.com/reference/types/code-pipeline-process-additional-steps.md#in-a-request)`[] \| null` |  | Steps to add to the pipeline's phases for this run only. |
| `credentials` | [`CodePipelineProcessCredentialsInput`](https://docs.maitento.com/reference/types/code-pipeline-process-credentials.md)`[]` |  | Credentials for the engines, tried before your tenant's model keys. Optional: without them, the engines use your tenant's model keys, then (unless your tenant forbids it) Maitento's own. Your own API keys must not be empty. |
| `credentialStack` | `string \| null` |  | The credential stack the run's engines use, by id or name: its API keys and coding-agent sign-ins, in the stack's order, and never Maitento's own keys. An engine the stack can't serve stops the run before it starts. Leave it out to use the pipeline's own stack, then the namespace's default, then your tenant's. Can't be combined with `credentials`. |
| `repos` | [`CodePipelineProcessRepoInput`](https://docs.maitento.com/reference/types/code-pipeline-process-repo.md)`[]` | yes | The git repositories to work on, with credentials that can push. Send an empty array to run without one. |
| `vfsMounts` | [`CodePipelineProcessVfsMountInput`](https://docs.maitento.com/reference/types/code-pipeline-process-vfs-mount.md#in-a-request)`[] \| null` |  | File systems to mount for the run's agents. |
| `systemPromptOverride` | `string \| null` |  | An extra system prompt for this run, applied on top of the pipeline's and agents' prompts. |
| `inputFileIds` | `uuid[] \| null` |  | Uploaded files to copy into the agents' `files/` folder before the run starts. They must belong to your tenant. |
| `outputFilesPartitionId` | `uuid \| null` |  | A knowledge base (partition) to upload the files the agents write to `output_files/` to, as the run goes. It must belong to your tenant. Null: output files aren't uploaded. |
| `autoRebase` | `boolean` |  | Whether to rebase each work branch onto its source branch when they have diverged, with an agent resolving any conflicts. Default `true`. Skipped for a repository whose work branch is its source branch. |
| `rebaseAgent` | `string \| null` |  | The agent that resolves rebase conflicts. Null: the first available of the run's agents by engine, in this order: Claude, Glm, Codex, Gemini, Qwen, DeepSeek, Kimi. |
| `maxCheckLoops` | `integer \| null` |  | For this run, the most rounds of a step's `runChallengeLoop` check, in place of the pipeline's `maxCheckLoops`. Null: the pipeline's value. Capped at 8. |
| `maxFixIterations` | `integer \| null` |  | For this run, the most review-and-fix rounds, in place of the pipeline's `maxFixIterations`. Null: the pipeline's value. Capped at 5. |
| `allowWebTools` | `boolean \| null` |  | For this run, whether every agent gets Maitento's web tools. Null: each agent's and the pipeline's own `allowWebTools`. |
| `webDownloadPartitionId` | `uuid \| null` |  | The temporary knowledge base (partition) the run's web fetches are kept in. Null: the pipeline's namespace default, then your tenant's. A run whose agents may use the web tools is refused when none of the three is set. |
| `stepMax` | `timespan \| null` |  | For this run, the longest every step may run, in place of each step's own `durationAutoTermination`. |
| `stepActivity` | `timespan \| null` |  | For this run, how long every step may go without activity, in place of each step's own `durationActivityTimeout`. |
| `phaseMax` | `timespan \| null` |  | For this run, each phase's `durationAutoTermination`: the limit for steps that set none of their own. |
| `phaseActivity` | `timespan \| null` |  | For this run, each phase's `durationActivityTimeout`: the limit for steps that set none of their own. |
| `processMax` | `timespan \| null` |  | For this run, the pipeline's `durationAutoTermination`: the limit for steps whose step and phase set none. |
| `processActivity` | `timespan \| null` |  | For this run, the pipeline's `durationActivityTimeout`: the limit for steps whose step and phase set none. |
| `hook` | `timespan \| null` |  | For this run, the longest one hook may run, in place of the pipeline's `hookDurationLimit`. |

**Response:** [`CodePipelineProcess`](https://docs.maitento.com/reference/types/code-pipeline-process.md) (200)

```bash title="curl"
curl -X PUT "https://api.maitento.com/code-pipelines/processes/by-id/<id>/start" \
  -H "Authorization: $MAITENTO_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"inputs":[],"repos":[]}'
```
```ts title="TypeScript"
const run = await mt.pipelines.start({ id: "f1e2d3c4-b5a6-4978-8a9b-0c1d2e3f4a5b" }, { inputs: { issue: "Login fails on Safari" }, repos });
```
```python title="Python"
mt.pipelines.start(id="d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a", inputs={"task": "Add a health check endpoint"}, repos=[{"type": "http", "name": "app", "url": "https://github.com/acme/app.git", "branchSource": "main", "branchWork": "maitento/health-check"}])
```

## `pipelines.list`

```http
GET /namespaces/{namespaceName}/code-pipelines
```

Every definition of the tenant, or of one namespace with `{ namespace }`.

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=GET%20%2Fnamespaces%2F%7BnamespaceName%7D%2Fcode-pipelines).

**Path parameters**

| Name | Type | Required | Description |
|---|---|---|---|
| `namespaceName` | `string` | yes |  |

**Response:** [`CodePipeline`](https://docs.maitento.com/reference/types/code-pipeline.md)`[]` (200)

```bash title="curl"
curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/code-pipelines" \
  -H "Authorization: $MAITENTO_AUTH"
```
```ts title="TypeScript"
const pipelines = await mt.pipelines.list({ namespace: "support" });
```
```python title="Python"
mt.pipelines.list(namespace="demo")
```

## `pipelines.create`

```http
POST /namespaces/{namespaceName}/code-pipelines
```

Creates a pipeline in the namespace.

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=POST%20%2Fnamespaces%2F%7BnamespaceName%7D%2Fcode-pipelines).

**Path parameters**

| Name | Type | Required | Description |
|---|---|---|---|
| `namespaceName` | `string` | yes |  |

**Request body:** [`CodePipelineCreateRequest`](https://docs.maitento.com/reference/types/code-pipeline-create-request.md)

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | yes | The pipeline's name, unique within its namespace. At most 128 characters. |
| `agents` | [`CodePipelineAgentInput`](https://docs.maitento.com/reference/types/code-pipeline-agent.md#in-a-request)`[]` | yes | The pipeline's agents. At least one. |
| `phases` | [`CodePipelinePhaseDefinitionInput`](https://docs.maitento.com/reference/types/code-pipeline-phase-definition.md#in-a-request)`[]` | yes | The pipeline's phases, each a group of steps. At least one. |
| `externalOperationsMcp` | [`McpExternalOperationBindingInput`](https://docs.maitento.com/reference/types/mcp-external-operation-binding.md#in-a-request)`[]` |  | MCP tools every agent of the pipeline may use. |
| `externalOperationsOpenApi` | [`OpenApiExternalOperationBindingInput`](https://docs.maitento.com/reference/types/open-api-external-operation-binding.md#in-a-request)`[]` |  | OpenAPI tools every agent of the pipeline may use. |
| `authenticationSecretInputs` | [`ConnectorAuthenticationSecretInputInput`](https://docs.maitento.com/reference/types/connector-authentication-secret-input.md#in-a-request)`[]` |  | Inputs a run supplies as secrets for the tools' authentication. |
| `bindingInputs` | [`ConnectorBindingInputInput`](https://docs.maitento.com/reference/types/connector-binding-input.md#in-a-request)`[]` |  | Inputs a run supplies as values bound into the tools' calls. |
| `promptInputs` | [`PromptInputInput`](https://docs.maitento.com/reference/types/prompt-input.md#in-a-request)`[]` |  | Inputs a run supplies for the step prompts (`%%input:name%%`). |
| `vfsBindings` | [`CodePipelineVfsBindingInput`](https://docs.maitento.com/reference/types/code-pipeline-vfs-binding.md#in-a-request)`[]` |  | File systems the pipeline declares for its agents. A run mounts only the file systems in its own `vfsMounts`. |
| `cogniscriptAppId` | `uuid \| null` |  | The app that holds the pipeline's hooks (its Cogniscript methods). Null: no hooks. |
| `systemPrompts` | `string[] \| null` |  | System prompts every agent of the pipeline gets. |
| `systemPromptMode` | [`CodePipelineSystemPromptMode`](https://docs.maitento.com/reference/types/code-pipeline-system-prompt-mode.md)`\| null` |  | How the pipeline's `systemPrompts` combine with the ones before them. Null: `Additional`. |
| `resumeVfsNamespace` | `string \| null` |  | The namespace of a file system to save the agents' sessions in, so a resumed or restarted run carries on from them. Null: sessions are not saved. |
| `resumeVfsName` | `string \| null` |  | The name of that file system, within `resumeVfsNamespace`. Null: `default`. |
| `durationWarning` | `timespan \| null` |  | Not used by code pipeline runs. |
| `durationAutoTermination` | `timespan \| null` |  | The longest any step may run, for steps whose step and phase set no `durationAutoTermination`. Null: Maitento's default. |
| `durationActivityTimeout` | `timespan \| null` |  | How long any step may go without activity before it is stopped, for steps whose step and phase set no `durationActivityTimeout`. Null: Maitento's default. |
| `hookDurationLimit` | `timespan \| null` |  | The longest one hook may run. Null: 30 seconds. |
| `includeEnvironmentInfo` | `boolean` |  | Not used by code pipeline runs. |
| `allowHumanInteraction` | `boolean` |  | Whether the agents may stop and ask a person a question. The run then waits in `HumanInteractionRequired` until it is answered. |
| `allowWebTools` | `boolean` |  | Whether the pipeline's agents get Maitento's web search and fetch tools. Off by default. |
| `onErrorHook` | `string \| null` |  | The name of a hook to run when the run hits an infrastructure error, such as a failed clone or push. |
| `maxFixIterations` | `integer \| null` |  | The most review-and-fix rounds a hook's fix loop may run. Null: 3. Capped at 5. |
| `confidenceThreshold` | `number \| null` |  | For a fix loop that ends on the agents' own confidence: the confidence, from 0 to 1, at which it stops. Null: 0.8. |
| `maxInjectedPhases` | `integer \| null` |  | The most phases hooks may add to one run in total. Null: 24. |
| `maxParallelSteps` | `integer \| null` |  | How many of a phase's steps may run at once. Null: 6. Between 1 and 16. |
| `credentialStack` | `string \| null` |  | The credential stack the pipeline's runs use, by id or name, when their start doesn't name one: its API keys and coding-agent sign-ins serve the engines, and Maitento's own keys never do. Null: the namespace's default stack, then your tenant's. |

**Response:** [`CodePipeline`](https://docs.maitento.com/reference/types/code-pipeline.md) (200)

```bash title="curl"
curl -X POST "https://api.maitento.com/namespaces/<namespaceName>/code-pipelines" \
  -H "Authorization: $MAITENTO_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"name":"...","agents":[],"phases":[]}'
```
```ts title="TypeScript"
const pipeline = await mt.pipelines.create(definition, { namespace: "support" });
```
```python title="Python"
mt.pipelines.create(name="code-generator", agents=[], phases=[], namespace="demo")
```

## `pipelines.getByName`

```http
GET /namespaces/{namespaceName}/code-pipelines/by-name/{name}
```

The definition with this name in the namespace. Throws `NotFoundError` when there is none.

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=GET%20%2Fnamespaces%2F%7BnamespaceName%7D%2Fcode-pipelines%2Fby-name%2F%7Bname%7D).

**Path parameters**

| Name | Type | Required | Description |
|---|---|---|---|
| `namespaceName` | `string` | yes |  |
| `name` | `string` | yes |  |

**Response:** [`CodePipeline`](https://docs.maitento.com/reference/types/code-pipeline.md) (200)

```bash title="curl"
curl -X GET "https://api.maitento.com/namespaces/<namespaceName>/code-pipelines/by-name/<name>" \
  -H "Authorization: $MAITENTO_AUTH"
```
```ts title="TypeScript"
const pipeline = await mt.pipelines.getByName("fix-bug", { namespace: "support" });
```
```python title="Python"
mt.pipelines.get_by_name("code-generator", namespace="demo")
```

## `pipelines.start`

```http
PUT /namespaces/{namespaceName}/code-pipelines/by-name/{name}/start
```

Starts a run of the pipeline's latest enabled version. Never retried; `launchIntentId` makes a deliberate re-send safe (the server answers with the run that id already started).

**Who can call it:** Admins and members, with an API key or a portal session. [Try it in the API playground](https://docs.maitento.com/playground/?call=PUT%20%2Fnamespaces%2F%7BnamespaceName%7D%2Fcode-pipelines%2Fby-name%2F%7Bname%7D%2Fstart).

**Path parameters**

| Name | Type | Required | Description |
|---|---|---|---|
| `namespaceName` | `string` | yes |  |
| `name` | `string` | yes |  |

**Request body:** [`CodePipelineProcessStartRequestInput`](https://docs.maitento.com/reference/types/code-pipeline-process-start-request.md#in-a-request)

| Field | Type | Required | Description |
|---|---|---|---|
| `launchIntentId` | `uuid \| null` |  | Your own id for this start, to make retries safe: starting again with the same id returns the run it already created instead of starting a second one. Null: every start creates a new run. |
| `inputs` | [`NameValuePair`](https://docs.maitento.com/reference/types/name-value-pair.md)`[]` | yes | The run's input values, by input name. Send an empty array when there are none. |
| `agentOverrides` | [`CodePipelineProcessAgentOverrideInput`](https://docs.maitento.com/reference/types/code-pipeline-process-agent-override.md#in-a-request)`[] \| null` |  | Different engines or models for some of the agents, for this run. |
| `additionalAgents` | [`CodePipelineAgentInput`](https://docs.maitento.com/reference/types/code-pipeline-agent.md#in-a-request)`[] \| null` |  | Agents for this run only, alongside the pipeline's own. Steps, overrides and the review panel can name them. Each needs a `role` and a name of lower-case letters, digits and hyphens (up to 63 characters, not starting with a hyphen) that no other agent has. At most 16. |
| `reviewPanel` | [`CodePipelineReviewPanelInput`](https://docs.maitento.com/reference/types/code-pipeline-review-panel.md#in-a-request)`\| null` |  | The run's review panel. Each reviewer's step must be in the panel's phase (from the pipeline, or added with `additionalSteps`) with the same agent and output variable, and each reviewer's output variable must be unique. |
| `maxParallelSteps` | `integer \| null` |  | For this run, how many of a phase's steps may run at once, in place of the pipeline's `maxParallelSteps`. Null: the pipeline's value. Between 1 and 16. |
| `additionalSteps` | [`CodePipelineProcessAdditionalStepsInput`](https://docs.maitento.com/reference/types/code-pipeline-process-additional-steps.md#in-a-request)`[] \| null` |  | Steps to add to the pipeline's phases for this run only. |
| `credentials` | [`CodePipelineProcessCredentialsInput`](https://docs.maitento.com/reference/types/code-pipeline-process-credentials.md)`[]` |  | Credentials for the engines, tried before your tenant's model keys. Optional: without them, the engines use your tenant's model keys, then (unless your tenant forbids it) Maitento's own. Your own API keys must not be empty. |
| `credentialStack` | `string \| null` |  | The credential stack the run's engines use, by id or name: its API keys and coding-agent sign-ins, in the stack's order, and never Maitento's own keys. An engine the stack can't serve stops the run before it starts. Leave it out to use the pipeline's own stack, then the namespace's default, then your tenant's. Can't be combined with `credentials`. |
| `repos` | [`CodePipelineProcessRepoInput`](https://docs.maitento.com/reference/types/code-pipeline-process-repo.md)`[]` | yes | The git repositories to work on, with credentials that can push. Send an empty array to run without one. |
| `vfsMounts` | [`CodePipelineProcessVfsMountInput`](https://docs.maitento.com/reference/types/code-pipeline-process-vfs-mount.md#in-a-request)`[] \| null` |  | File systems to mount for the run's agents. |
| `systemPromptOverride` | `string \| null` |  | An extra system prompt for this run, applied on top of the pipeline's and agents' prompts. |
| `inputFileIds` | `uuid[] \| null` |  | Uploaded files to copy into the agents' `files/` folder before the run starts. They must belong to your tenant. |
| `outputFilesPartitionId` | `uuid \| null` |  | A knowledge base (partition) to upload the files the agents write to `output_files/` to, as the run goes. It must belong to your tenant. Null: output files aren't uploaded. |
| `autoRebase` | `boolean` |  | Whether to rebase each work branch onto its source branch when they have diverged, with an agent resolving any conflicts. Default `true`. Skipped for a repository whose work branch is its source branch. |
| `rebaseAgent` | `string \| null` |  | The agent that resolves rebase conflicts. Null: the first available of the run's agents by engine, in this order: Claude, Glm, Codex, Gemini, Qwen, DeepSeek, Kimi. |
| `maxCheckLoops` | `integer \| null` |  | For this run, the most rounds of a step's `runChallengeLoop` check, in place of the pipeline's `maxCheckLoops`. Null: the pipeline's value. Capped at 8. |
| `maxFixIterations` | `integer \| null` |  | For this run, the most review-and-fix rounds, in place of the pipeline's `maxFixIterations`. Null: the pipeline's value. Capped at 5. |
| `allowWebTools` | `boolean \| null` |  | For this run, whether every agent gets Maitento's web tools. Null: each agent's and the pipeline's own `allowWebTools`. |
| `webDownloadPartitionId` | `uuid \| null` |  | The temporary knowledge base (partition) the run's web fetches are kept in. Null: the pipeline's namespace default, then your tenant's. A run whose agents may use the web tools is refused when none of the three is set. |
| `stepMax` | `timespan \| null` |  | For this run, the longest every step may run, in place of each step's own `durationAutoTermination`. |
| `stepActivity` | `timespan \| null` |  | For this run, how long every step may go without activity, in place of each step's own `durationActivityTimeout`. |
| `phaseMax` | `timespan \| null` |  | For this run, each phase's `durationAutoTermination`: the limit for steps that set none of their own. |
| `phaseActivity` | `timespan \| null` |  | For this run, each phase's `durationActivityTimeout`: the limit for steps that set none of their own. |
| `processMax` | `timespan \| null` |  | For this run, the pipeline's `durationAutoTermination`: the limit for steps whose step and phase set none. |
| `processActivity` | `timespan \| null` |  | For this run, the pipeline's `durationActivityTimeout`: the limit for steps whose step and phase set none. |
| `hook` | `timespan \| null` |  | For this run, the longest one hook may run, in place of the pipeline's `hookDurationLimit`. |

**Response:** [`CodePipelineProcess`](https://docs.maitento.com/reference/types/code-pipeline-process.md) (200)

```bash title="curl"
curl -X PUT "https://api.maitento.com/namespaces/<namespaceName>/code-pipelines/by-name/<name>/start" \
  -H "Authorization: $MAITENTO_AUTH" \
  -H "Content-Type: application/json" \
  -d '{"inputs":[],"repos":[]}'
```
```ts title="TypeScript"
const run = await mt.pipelines.start({ name: "fix-bug", namespace: "support" }, { inputs: { issue: "Login fails on Safari" }, repos });
```
```python title="Python"
mt.pipelines.start("code-generator", inputs={"task": "Add a health check endpoint"}, repos=[{"type": "http", "name": "app", "url": "https://github.com/acme/app.git", "branchSource": "main", "branchWork": "maitento/health-check"}], namespace="demo")
```
