> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genesiscomputing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure DevOps Automation (Assignment Intake)

> Configure Genesis to poll Azure Boards for work items assigned to the connection identity, acknowledge pickup, and open a stable orchestrator thread on Requests.

## Overview

This page is the **second step** in the Azure DevOps setup flow:

1. [Azure DevOps](/docs/Setup/Azure-DevOps) — save a PAT connection.
2. **Azure DevOps Automation (Assignment Intake)** — *this page* — have Genesis automatically pick up assigned work items and dispatch them to a Genesis agent.
3. [Azure DevOps Boards Tools](/docs/Genbot-Toolkit/Azure-DevOps-Boards-Tools) — for ad-hoc, manual Boards operations from inside an agent thread.

Genesis polls Azure Boards for **non-terminal** work items assigned to the **connection identity** (the PAT owner). When a match is found, Genesis posts a pickup acknowledgement on the work item, opens or resumes a stable orchestrator thread, and dispatches a kickoff prompt to the configured Genesis agent. Every detection, claim, dispatch, and failure is recorded on [Requests](/docs/User-Guide/Work-Center).

<Note>
  All Azure DevOps automation controls are admin-scoped. You need Genesis admin access or `manage_all_connections` to see the **Automation** tab in the Azure DevOps connection modal on **Config -> Connections**. Open **+ New Connection**, choose **Azure DevOps** under **Git and code**, or edit an existing Azure DevOps connection to switch tabs.
</Note>

<Note>
  **Personal connections keep running as the admin who enabled automation.** When you turn on assignment intake with a personal PAT connection, Genesis records your user id as the automation owner and resolves that connection on every poll. The PAT is **not** converted into a shared credential. Shared connections are also supported.
</Note>

## Prerequisites

Before configuring automation, make sure all of the following are true:

1. An Azure DevOps PAT connection has been saved in Genesis. See [Azure DevOps](/docs/Setup/Azure-DevOps).
2. Work items you want Genesis to pick up are **assigned to the PAT identity** used by the selected connection.
3. You know the Azure DevOps **project** whose assigned items should be polled.
4. You have decided which Genesis agent should orchestrate pickup. The default is `Eve`.

## How pickup works

On each poll Genesis:

1. Queries the configured project for open work items assigned to `@me` (the connection identity), up to 50 results per pass.
2. Skips items in terminal states (`closed`, `completed`, `done`, `removed`, `resolved`).
3. Opens or resumes a stable thread (`azure-devops-<connection>-<work-item-id>`) for the configured **Genesis agent**.
4. Posts a pickup acknowledgement comment on the work item (tagged `[genesis-azure-devops-automation]`).
5. Dispatches a kickoff prompt into the orchestrator thread and ensures `azure_devops_boards_tools` is active on that thread.
6. Records every claim, dispatch, duplicate suppression, and failure in the Genesis observation ledger (visible on [Requests](/docs/User-Guide/Work-Center) when enabled).

Genesis does not bulk-import a backlog. Only work items **assigned to the connection identity** after automation is enabled are candidates for intake.

## Setup workflow

<Steps>
  <Step title="Save an Azure DevOps connection">
    In **Config -> Connections**, create or edit an Azure DevOps PAT connection. Test and save. See [Azure DevOps](/docs/Setup/Azure-DevOps).
  </Step>

  <Step title="Assign work in Azure Boards">
    In Azure DevOps, assign the work items you want Genesis to handle to the **same identity** as the PAT on your saved connection.
  </Step>

  <Step title="Configure assignment automation">
    Open the Azure DevOps connection modal, select the **Automation** tab, and set:

    * **Enable Azure DevOps assignment automation**: on.
    * **Azure DevOps connection**: the saved connection (for example `azure_devops.shared` or your personal connection).
    * **Project**: the Azure DevOps project to poll (for example `GenesisConnectorTests`).
    * **Genesis agent**: usually `Eve`.
    * **Poll interval (seconds)**: between `30` and `3600` (default `60`).

    Save automation settings.
  </Step>

  <Step title="Verify end-to-end">
    Assign a non-terminal test work item to the PAT identity. Use **Poll now** (after saving) or wait for the next interval. Genesis should acknowledge the assignment on the work item and start orchestrator work in the linked thread on Requests.
  </Step>
</Steps>

## Automation parameter reference

These fields are saved on the **Automation** tab and persisted under `ticket_automation.azure_devops` in APP\_CONFIG.

| **Field** | **Type** | **Default** | **Notes** |
| - | - | - | - |
| **`enabled`** | Boolean | `false` | Master switch. When off, Genesis ignores assigned work items. |
| **`connection_name`** | String | empty | Saved connection id such as `azure_devops.shared`. Required when `enabled` is `true`. |
| **`project`** | String | empty | Azure DevOps project whose assigned work items are polled. Required when `enabled` is `true`. |
| **`orchestrator_bot_id`** | String | `Eve` | Genesis agent that receives the kickoff prompt. |
| **`poll_interval_seconds`** | Integer | `60` | Polling cadence. Minimum `30`, maximum `3600`. |

Read-only telemetry returned by `GET /api/config/azure-devops/automation`:

| **Field** | **Meaning** |
| - | - |
| **`run_as_configured`** | Whether an automation owner identity is recorded for background polling. |
| **`last_poll_started_at`** | Start time of the most recent poll attempt (ISO 8601), or empty. |
| **`last_successful_poll_at`** | Start time of the most recent successful poll (ISO 8601), or empty. |
| **`last_poll_error`** | Last poll error message, or empty when the most recent run succeeded. |

`run_as_user_id` is stored when automation is enabled but is not returned by the GET endpoint.

## Troubleshooting

### Automation saves but never claims work items

1. **Enable Azure DevOps assignment automation** is on and both **connection** and **project** are set.
2. The work item is assigned to the **PAT identity** on the selected connection, not another user.
3. The work item is in a **non-terminal** state.
4. The PAT can read work items and post comments in the configured project.

### Poll now is disabled or reports an error

Save automation settings before using **Poll now** — unsaved form changes block manual polling. When automation is disabled, **Poll now** stays disabled.

### Personal connection behavior

Personal connections continue to run as the admin who enabled automation. Secret resolution enforces that ownership on every poll rather than broadening the PAT into a shared secret. Re-enable automation after changing the connection owner if you transfer setup responsibility.

## Observing automation activity

See [Requests](/docs/User-Guide/Work-Center) for Azure DevOps intake activity.

The **Automation** tab in the Azure DevOps connection modal includes a **View requests →** link to the Requests page.

## Related pages

* [Azure DevOps](/docs/Setup/Azure-DevOps)
* [Azure DevOps Boards Tools](/docs/Genbot-Toolkit/Azure-DevOps-Boards-Tools)
* [Connections](/docs/Setup/Connections)
* [Requests](/docs/User-Guide/Work-Center)
* [API Reference — Azure DevOps automation endpoints](/docs/Genesis-API/API-Reference#azure-devops-automation-endpoints)
