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

# Devin

> Connect Devin analytics to Windmill to sync per-user ACU consumption, session activity, and pull request outcomes into stats, performance reviews, and 1:1s.

Connect Devin to bring team AI usage into Windmill without giving Windmill access to session content, prompts, code, or repositories. The integration supports Devin Teams and Enterprise accounts.

## Benefits of connecting Devin to Windmill

* Track Agent Compute Unit (ACU) consumption, sessions, and pull request outcomes by employee
* Understand how your team uses Devin across products, session origins, and task sizes
* Bring AI adoption data into stats, performance reviews, and 1:1s
* Sync analytics automatically without asking employees to connect individually

## How to connect Devin

Devin Teams and Enterprise accounts use different service-user roles. Follow the instructions for your plan.

### Teams setup

<Steps>
  <Step title="Create an Admin service user">
    In Devin, go to **Settings → Service users** and click **Create service user**. Name the service user **Windmill Analytics** and assign the **Admin** role.

    The Admin role is required because Windmill must read the complete member roster to match Devin users to employees. The Teams **Member** role doesn't include this access.
  </Step>

  <Step title="Generate and copy the API key">
    Open the new service user and click **Generate API key**. Copy the `cog_`-prefixed key immediately. Devin only displays it once.

    See Devin's [Teams quick start](https://docs.devin.ai/api-reference/getting-started/teams-quickstart) for more information about service users and API keys.
  </Step>

  <Step title="Open the Devin integration in Windmill">
    Go to [Settings > Integrations](https://app.gowindmill.com/COMPANY/config/integrations), find **Devin**, and click **Connect**.
  </Step>

  <Step title="Enter the API key and connect">
    Paste the API key into **API key**. Leave **API base URL** at the default `https://api.devin.ai`, then click **Connect**.

    Windmill detects your Devin organization automatically. You don't need to enter an organization ID or select a plan.
  </Step>
</Steps>

### Enterprise setup

<Steps>
  <Step title="Create a least-privilege role">
    In Devin, go to **Enterprise settings → Roles** and create a custom role named **Windmill Analytics** with these permissions:

    | Permission               | Purpose                                                                     |
    | ------------------------ | --------------------------------------------------------------------------- |
    | `ReadAccountMeta`        | Validate the service user and detect Enterprise scope                       |
    | `ViewAccountMembership`  | Read direct and identity provider (IDP)-managed users for employee matching |
    | `ViewAccountMetrics`     | Read per-user session and pull request metrics                              |
    | `ViewAccountConsumption` | Read per-user daily ACU consumption                                         |
  </Step>

  <Step title="Create an Enterprise service user">
    Go to **Enterprise settings → Service users** and click **Create service user**. Name it **Windmill Analytics** and assign the custom role.
  </Step>

  <Step title="Generate and copy the API key">
    Open the new service user and click **Generate API key**. Copy the `cog_`-prefixed key immediately. Devin only displays it once.

    See Devin's [Enterprise quick start](https://docs.devin.ai/api-reference/getting-started/enterprise-quickstart) for more information about Enterprise service users and roles.
  </Step>

  <Step title="Confirm the API base URL">
    Most Enterprise accounts use Devin's standard API and should leave **API base URL** at `https://api.devin.ai`.

    If your company has a dedicated Devin deployment, ask your Devin administrator or Cognition support for its API domain. Enter the HTTPS origin, such as `https://api.your-company.devinenterprise.com`, without a path, query, credentials, or trailing content.
  </Step>

  <Step title="Connect Devin in Windmill">
    Go to [Settings > Integrations](https://app.gowindmill.com/COMPANY/config/integrations), find **Devin**, and click **Connect**. Enter the API key and, only for a dedicated deployment, the API base URL. Then click **Connect**.

    Windmill detects Enterprise scope automatically. You don't need to enter an organization ID or select a plan.
  </Step>
</Steps>

<Note>
  Devin is an account-level integration. An admin connects it once for the company, and individual employees don't need to connect it themselves.
</Note>

## Connected data

Windmill syncs Devin's direct and IDP-managed user rosters for employee matching. For matched users, Windmill imports daily ACU consumption, session metrics, and pull request metrics.

### ACU consumption

| Stat            | Description                                           | Unit |
| --------------- | ----------------------------------------------------- | ---- |
| ACUs            | Total Agent Compute Units consumed                    | ACUs |
| ACUs by Product | ACUs consumed in Devin, Cascade, Terminal, and Review | ACUs |

### Sessions

| Stat                             | Description                                                                                         | Unit     |
| -------------------------------- | --------------------------------------------------------------------------------------------------- | -------- |
| Sessions Created                 | Devin sessions created                                                                              | sessions |
| Average ACUs per Session         | Average ACUs consumed for each session created                                                      | ACUs     |
| Sessions with Playbook           | Sessions created with a playbook                                                                    | sessions |
| Sessions with Search             | Sessions created with search                                                                        | sessions |
| Sessions with Merged PRs         | Sessions that produced a merged pull request                                                        | sessions |
| Sessions Created by Origin       | Sessions broken down by API, automation, code scan, desktop, Jira, Linear, Slack, Teams, or web app | sessions |
| Sessions Created by Size         | Sessions broken down by XS, S, M, L, or XL size                                                     | sessions |
| Sessions with Merged PRs by Size | Sessions with merged pull requests broken down by XS, S, M, L, or XL size                           | sessions |

### Pull requests

| Stat                      | Description                                                  | Unit |
| ------------------------- | ------------------------------------------------------------ | ---- |
| PRs Created               | Total pull requests authored by Devin across all states      | PRs  |
| PRs Opened                | Devin-authored pull requests currently open                  | PRs  |
| PRs Merged                | Devin-authored pull requests merged                          | PRs  |
| PRs Closed                | Devin-authored pull requests closed without merging          | PRs  |
| PRs Taken Over            | Pull requests Devin contributed commits to but didn't create | PRs  |
| PRs Taken Over and Opened | Taken-over pull requests currently open                      | PRs  |
| PRs Taken Over and Merged | Taken-over pull requests merged                              | PRs  |
| PRs Taken Over and Closed | Taken-over pull requests closed without merging              | PRs  |

All stats are tracked per employee and per completed Devin billing day. Windmill checks for new data hourly, and the latest completed day appears after Devin makes it available.

### Data Windmill doesn't access

Windmill uses Devin's read-only analytics and membership endpoints. It doesn't read or store:

* Session prompts, messages, or other conversation content
* Source code, files, or repository contents
* Playbook or knowledge content
* Audit logs, secrets, or account settings

Windmill never creates or modifies sessions, users, repositories, or other data in Devin.

## Visibility and access

Devin stats in Windmill follow the **manager hierarchy** visibility model:

* **Employees** can see their own Devin stats
* **Managers** can see Devin stats for their direct reports and anyone in their reporting chain
* **Admins** can see Devin stats for everyone in the organization
* **Peers** can't see each other's Devin stats

## Permissions

Windmill calls only read-only Devin endpoints, even when a Teams service user has the Admin role.

For Teams, the **Admin** role is required to read the complete roster and analytics. For Enterprise, the custom role only needs account metadata, membership, metrics, and consumption permissions.

Windmill validates the key and confirms that it belongs to a service user when you connect. Devin checks roster and analytics permissions during the first sync.

## User matching

Windmill matches Devin users to employees by **email address**. It reads both directly assigned users and users whose membership comes from an identity provider group.

If a user isn't matched, confirm that their Devin email address matches their employee email in Windmill.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Why is my API key invalid?">
    Confirm that you pasted the complete `cog_`-prefixed service-user key. Personal tokens and legacy `apk_` keys aren't supported.

    If the key was revoked, generate a replacement key and reauthenticate the integration. Don't revoke the current key until Windmill accepts its replacement.
  </Accordion>

  <Accordion title="What if I left Devin without copying the key?">
    Devin displays a service-user API key only once. Generate a new key, copy it immediately, and paste it into Windmill. Revoke the unseen key if it remains active.
  </Accordion>

  <Accordion title="Why can't Windmill read the Teams roster?">
    A 403 error that mentions `org.membership.view` or `ViewOrgMembership` means the service user can't read the roster. Change the **Windmill Analytics** service user from **Member** to **Admin**, then run the sync again.
  </Accordion>

  <Accordion title="Why can't Windmill read the Enterprise roster?">
    Add `ViewAccountMembership` to the service user's custom role. Windmill needs this permission to read both directly assigned and IDP-managed users.
  </Accordion>

  <Accordion title="Why are session or pull request stats missing?">
    On Teams, confirm that the service user has the **Admin** role. On Enterprise, add `ViewAccountMetrics` to its custom role. Then run the sync again.
  </Accordion>

  <Accordion title="Why is ACU consumption missing?">
    On Teams, confirm that the service user has the **Admin** role. On Enterprise, add `ViewAccountConsumption` to its custom role. Then run the sync again.
  </Accordion>

  <Accordion title="Why doesn't my dedicated deployment connect?">
    Only Enterprise dedicated deployments should use **API base URL**. Confirm the exact domain with your Devin administrator or Cognition support.

    Enter an HTTPS origin such as `https://api.your-company.devinenterprise.com`. Don't include a path, query, fragment, or credentials. Standard Cognition-hosted accounts should use the default `https://api.devin.ai`.
  </Accordion>

  <Accordion title="What happens when Devin rate-limits a sync?">
    If Devin returns a 429 rate-limit response, Windmill waits and retries automatically. Data will appear after a later retry succeeds. If the issue continues, contact [Windmill support](mailto:support@gowindmill.com).
  </Accordion>
</AccordionGroup>

## FAQs

<AccordionGroup>
  <Accordion title="Do I need to enter a Devin organization ID?">
    No. Windmill identifies your organization or Enterprise account from the service-user key. There is no organization ID or plan selector in the connection flow.
  </Accordion>

  <Accordion title="Does each employee need to connect Devin?">
    No. Devin is an account-level integration. An admin connects it once for the company.
  </Accordion>

  <Accordion title="How often does data sync?">
    Windmill checks Devin hourly and imports newly completed Devin billing days. The current, incomplete day isn't imported until it closes.
  </Accordion>

  <Accordion title="Can coworkers see each other's Devin stats?">
    No. Employees can see their own stats, managers can see stats within their reporting hierarchy, and admins can see stats for the company. Peers can't see each other's usage.
  </Accordion>

  <Accordion title="What happens when an employee leaves?">
    Their historical Devin stats remain for context, but Windmill stops attributing new activity once they are an Archived user.
  </Accordion>
</AccordionGroup>
