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

# Devin

> Connect Devin (Cognition) to track autonomous AI engineering activity and ACU spend

Connect [Devin](https://devin.ai) (by Cognition) to track your team's autonomous AI engineering activity and the ACU spend behind it. Devin is a background AI agent, so its contributions are also [auto-detected from commit metadata](/ai-tools/overview#auto-detected-tools) — connecting the API adds per-user activity and cost.

## What's tracked

* **Sessions** — Devin sessions started, per user
* **ACU consumption** — Agentic Compute Units consumed (Devin's usage measure)
* **Code generation** — code Devin produced, attributed via commit metadata
* **Cost tracking** — Devin spend per engineer, derived from ACU usage

## Prerequisites

A Cognition API key (starts with `cog_`), belonging to a service user with one of two permission sets — Weave auto-detects which one you've provided:

* **Enterprise plan** — a service user with **ManageBilling** and **ManageOrganizations** permissions. Unlocks full data, including billing-cycle reconciliation, across every organization in the enterprise.
* **Any plan (including Teams)** — a service user with **ReadAccountMeta**, **ViewOrgConsumption**, **ViewOrgSessions**, **ViewOrgMetrics**, and **ViewOrgMembership** permissions, scoped to a single Devin organization.

You'll also need admin access to your Weave organization.

## Setup

<Steps>
  <Step title="Create a Cognition API key">
    In your Cognition/Devin admin settings, create an API key (`cog_…`) for a service user with either the enterprise or organization-scoped permission set described above. Weave detects which one you've provided automatically — no need to tell it up front. For enterprise keys, Weave also discovers your enterprise's organizations at sync time, so you don't need to supply org IDs.
  </Step>

  <Step title="Add the key to Weave">
    From **Data**, open the **Devin API Key** tile. It opens the shared **Connect Windsurf & Devin** page with **Devin** selected. In the **Cognition Enterprise API key** card, paste your Cognition API key (`cog_…`) into **API key** and click **Save**. Weave stores it securely (only a hash is ever shown), detects and displays the key's level (enterprise or organization-scoped), and enqueues a 6-month ACU consumption backfill. Adding the key requires the **Admin** role in Weave.

    <Note>
      Devin shares the **same** Cognition API key as Windsurf — if you've already connected one for Windsurf, Devin is covered and you don't need a separate key.
    </Note>
  </Step>

  <Step title="Link Devin users to Weave accounts">
    On the **Members** page, link each Devin user to their Weave account so sessions and ACU activity are attributed correctly. Weave suggests a likely match based on name and email, and an admin confirms the link.
  </Step>

  <Step title="Verify connection">
    Check that Devin sessions and ACU usage appear in Weave after the backfill completes.
  </Step>
</Steps>

## Enterprise vs organization-scoped keys

Weave auto-detects the level of the key you add and shows which one was detected. Most data is available at either level; only billing-cycle reconciliation requires an enterprise key.

| Capability | Organization-scoped key | Enterprise key |
| - | - | - |
| Per-user activity | ✅ | ✅ |
| ACU spend | ✅ | ✅ |
| Sessions | ✅ | ✅ |
| Account matching | ✅ | ✅ |
| Billing-cycle reconciliation | ❌ | ✅ |
| Organization coverage | Single Devin organization | Every organization in the enterprise |

If you start with an organization-scoped key and later add an enterprise key, the enterprise key automatically takes over — its data supersedes the organization-scoped key's, and any existing user links are preserved.

## Metrics enabled

Once connected, you can track:

* **[AI code LOC](/metrics/ai-code-loc)** — Lines attributed to Devin
* **[AI output percentage](/metrics/ai-output-percentage)** — Portion of output from Devin
* **[AI efficiency index](/metrics/ai-efficiency-index)** — Impact on productivity
* **[AI tool costs](/metrics/ai-tool-costs)** — Devin spend per engineer

## Cost tracking

Devin is billed by **ACU** (Agentic Compute Unit) consumption, and Weave attributes that spend per engineer:

* **Usage** — real per-user ACU consumption pulled from the Cognition Enterprise API (covering both Devin sessions and Devin code review)
* **Dollars** — ACUs multiplied by the ACU rate on the **Windsurf** entry's **Windsurf Usage-Based (ACU)** plan in **Settings** → **Financial** → **Tool subscription costs**. Devin and Windsurf ACUs are priced from one shared Cognition ACU pool, so set it to match your Cognition contract
* **Reconciliation** — any organization-level ACU usage that isn't attributable to a specific engineer is kept as an unattributed remainder so the total reconciles to your full Cognition invoice

ACU usage is real; the dollar conversion uses the rate you configure, so Devin cost is a **hybrid** rather than a figure pulled directly from an invoice.

## Data privacy

Weave syncs usage metadata from Devin:

* Session counts and ACU consumption per user
* Commit metadata with AI attribution

**We never access:**

* Source code content or diffs
* Devin's responses or session transcripts
* File paths or project structure

## Related integrations

* [Windsurf](/ai-tools/windsurf) — also a Cognition product, billed by ACU
* [Claude Code](/ai-tools/claude-code) — CLI-based AI assistant
* [Cursor](/ai-tools/cursor) — AI IDE


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.