> For the complete documentation index, see [llms.txt](https://help.swarmia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.swarmia.com/features/ai-tools/ai-tool-detection-and-filters.md).

# AI tool detection & filters

Swarmia automatically detects pull requests assisted by AI tools you've connected

## Automatic AI tool detection

To help you understand how AI use affects developer productivity metrics, Swarmia automatically detects pull requests assisted by the [AI tools](/settings/integrations/ai-coding-tool-integrations.md) you've connected. You can see the AI tools involved in an individual pull request by opening it anywhere in the app.

### AI-assisted

In the app, this mode was previously called “Local edits (editor/CLI).” A pull request is considered AI-assisted if at least one of these conditions is met:

* Any of its commits were authored or co-authored by an AI tool *(high confidence)*
* Any of its commits has the `Made-with: Cursor` Git trailer *(high confidence)*
* It has the `claude-code-assisted` label *(high confidence)*
* Any of its commits were made by an author who used an AI tool within the previous 24 hours *(low confidence)*

You can see the reason for tagging an individual pull request in a tooltip by hovering over the AI tool badge:

<figure><img src="https://2772466312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMa8uBmGhQgR7MTPq9yh7%2Fuploads%2FLq6D5BbecxNOEzBe6xPU%2F004299%402x.png?alt=media&amp;token=df4ee53e-f9cf-454c-b0b8-0841d9c37e4d" alt=""><figcaption></figcaption></figure>

### Cloud agent

Swarmia attributes a PR to a [cloud agent](/features/ai-tools/cloud-agents.md) if the PR or its first commit has been authored by a cloud agent linked to one of the [AI tools](/settings/integrations/ai-coding-tool-integrations.md).

The AI coding agent used to create a pull request is shown on top of the pull request author’s avatar. You can hover over the avatar to see more details:

<figure><img src="https://2772466312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMa8uBmGhQgR7MTPq9yh7%2Fuploads%2FqJo5rKNMUDqSyQ0awW1l%2F004298%402x.png?alt=media&amp;token=c7a36db7-4790-48d5-81d4-e24e0772ef9d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In Swarmia, pull requests authored by AI tools are attributed to the people who initiated them. For example, if GitHub Copilot creates a PR on your behalf, Swarmia shows you as its author.
{% endhint %}

### Review agent

Swarmia attributes a PR to a review agent if it has reviews from a built-in review agent, or a contributor linked to a [custom AI tool](/settings/integrations/ai-coding-tool-integrations/custom-ai-tool-integrations.md#link-contributors).

## AI tool filter

You can use the **AI tool** filter to view pull requests in [Code metrics](/features/metrics/pull-request-cycle-time.md), [PR exclusion rules](/settings/team/team-pr-exclusions.md), and [investment category rules](/settings/organization/investment-balance.md) based on the AI tools involved.

The filter includes two selections:

* **Tools:** [built-in AI tools](/settings/integrations/ai-coding-tool-integrations.md) and any [custom AI tools](/settings/integrations/ai-coding-tool-integrations/custom-ai-tool-integrations.md) you've added
* **Modes:** [AI-assisted](#ai-assisted), [cloud agent](#cloud-agent), and review agent
  * For AI-assisted work, you can choose to [include high-confidence matches only](#ai-assisted-high-confidence-only) (read more below)

<figure><img src="https://2772466312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMa8uBmGhQgR7MTPq9yh7%2Fuploads%2Fb0Q6asqMSK3fUomYHmez%2F004313%402x.png?alt=media&amp;token=16606925-205c-48f8-bc8f-e4745385a339" alt=""><figcaption></figcaption></figure>

### AI-assisted: High confidence only

This is an optional setting that applies to [AI-assisted](#ai-assisted) work only.

* **Enabled**: Match *only* work directly tagged by AI tools (labeled with *"high confidence"* in [the list above](#ai-assisted)). This can result in underreporting AI involvement.
* **Disabled**: Also match work based on the authors' activity times in AI tools (labeled with *"low confidence"* in [the list above](#ai-assisted)). This can result in overreporting AI involvement.

<figure><img src="https://2772466312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMa8uBmGhQgR7MTPq9yh7%2Fuploads%2FempHXI3tFIlJWbhPuqg6%2F004317%402x.png?alt=media&amp;token=62912cc3-8f12-4f47-85c6-c9ccc84ab2af" alt=""><figcaption></figcaption></figure>

## Frequently asked questions

### Why is my PR marked AI-assisted even though I didn't use AI for it?

Some AI coding tool providers don't share PR-level activity data in their analytics APIs. To address this, we use certain heuristics, such as checking if the commit authors have used an AI tool within the previous 24 hours. (See [the full list of rules](#ai-assisted) above.)

This can result in false positives (overreporting AI involvement). For example, if you simultaneously work on tasks A and B, but only use AI for task A, Swarmia inaccurately associates the tool usage also with task B. You can use the [high-confidence filter](#ai-assisted-high-confidence-only) to avoid reporting false positives.

You can hover over the AI tool label to see the exact attribution reason for any pull request:

<figure><img src="https://2772466312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMa8uBmGhQgR7MTPq9yh7%2Fuploads%2FF1a8dArcCbeTMMY3lTtK%2F004301%402x.png?alt=media&amp;token=58ef5223-00fc-4a7f-bb04-8c22a5a50e18" alt=""><figcaption></figcaption></figure>

### Why is the attribution window 24 hours?

It accounts for cases where you create code with AI today but commit it tomorrow. Also, some AI coding tool providers report user activity only on the daily level, so we can't get more granular than that.

You can use the [high-confidence filter](#ai-assisted-high-confidence-only) to disable the time-based attribution.

### Why is my PR not attributed to a cloud agent?

Swarmia attributes a PR to a [cloud agent](/features/ai-tools/cloud-agents.md) if the PR or its first commit has been authored by a built-in cloud agent, or a contributor linked to a [custom AI tool](/settings/integrations/ai-coding-tool-integrations/custom-ai-tool-integrations.md#link-contributors).

[See the examples here](/features/ai-tools/cloud-agents.md#why-is-my-pr-not-attributed-to-a-cloud-agent).

### Why is my PR not attributed to a review agent?

Swarmia identifies a [review agent](/features/ai-tools/review-agents.md) by matching the author of review comments against known email addresses, GitHub login patterns or display names for built-in review agents, or against the contributor linked to a [custom AI tool](/settings/integrations/ai-coding-tool-integrations/custom-ai-tool-integrations.md#link-contributors).

[Read more here](/features/ai-tools/review-agents.md#how-does-swarmia-detect-review-agents).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.swarmia.com/features/ai-tools/ai-tool-detection-and-filters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
