> 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/settings/integrations/ai-coding-tool-integrations/custom-ai-tool-integrations/connect-amp-code-to-swarmia.md).

# Connect Amp Code to Swarmia

Track Amp Code's Git activity and usage data in Swarmia.

Create a custom AI tool to track the Git activity Amp creates, and optionally send Amp usage data to track adoption and costs.

## Track Amp Code's Git activity

You need the [organization admin](/settings/organization/managing-users-and-roles.md) role to set this up.

1. Go to [Settings → AI tools](https://app.swarmia.com/settings/ai-assistants) and find **Other AI tools**.
2. Click **Add new** and enter **Amp** as the name and `amp` as the API identifier.
3. Under **Linked authors**, search for and select Amp's GitHub accounts: `ampagent` and `ampcode-com`.
4. Click **Save**.

Amp may author commits with `amp@ampcode.com` or `noreply@ampcode.com`. Linking its authors lets Swarmia attribute the Git activity associated with those identities to Amp with high confidence.

Swarmia shows the activity in [AI impact: Code](/features/ai-tools/ai-impact-code.md), [Cloud agents](https://app.swarmia.com/ai/agents), and [Review agents](https://app.swarmia.com/ai/reviews). Read more about [linking authors to a custom AI tool](/settings/integrations/ai-coding-tool-integrations/custom-ai-tool-integrations.md#link-authors).

## Send Amp usage data (optional)

To show Amp usage in [AI adoption](/features/ai-tools/ai-adoption.md) and add time-based pull request attribution, retrieve daily per-user data from [Amp's workspace analytics API](https://ampcode.com/api/external#workspace-analytics-daily-usage) and send it to Swarmia's [additional AI integrations API](/settings/integrations/swarmia-apis/additional-ai-integrations.md).

Create an External API Application in Amp and give it the `amp.api:workspace.analytics:view` scope. Add `amp.api:workspace.members:view` to receive users' email addresses, which Swarmia uses to match usage data to authors.

When you send the data:

* Match each daily usage record to a Swarmia author by email.
* Report whether the person had access to Amp and whether they used it that day.
* Amp's API includes daily USD usage per person, which you can include as cost data in [AI cost](/features/ai-tools/ai-cost.md).

Swarmia uses these daily records for [time-based, low-confidence AI-assisted attribution](/features/ai-tools/ai-tool-detection-and-filters.md#ai-assisted).

For authentication, request fields, and data-import details, see [send usage data to the API](/settings/integrations/ai-coding-tool-integrations/custom-ai-tool-integrations.md#send-usage-data-to-api).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.swarmia.com/settings/integrations/ai-coding-tool-integrations/custom-ai-tool-integrations/connect-amp-code-to-swarmia.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
