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

# New Relic Toolkit

> Query NRQL metrics, explore entities, and review alerts through New Relic NerdGraph

The **New Relic** toolkit lets agents query telemetry with NRQL, list and inspect monitored entities, and review alert policies, conditions, and open incidents. It uses New Relic’s NerdGraph GraphQL API.

Add it on the agent **Toolkits** tab, configure a User Key and account ID, then reference tools with `@` in the personality prompt.

## Prerequisites

* A New Relic account with a **User Key** (personal API key that starts with `NRAK-`) from [API keys](https://one.newrelic.com/api-keys)
* Your New Relic **Account ID** (from the URL or Administration → Access Management)
* Region: **US** (default) or **EU**
* An agent you can edit

License or ingest keys are not supported — use a User Key.

## Setup

1. Open the agent → **Toolkits** → add **New Relic**.
2. Create or select a connection and enter:
   * **API key** — User Key (`NRAK-…`)
   * **Account ID**
   * **Region** — US or EU
3. Save, then `@`-mention New Relic tools in the personality prompt when the agent should investigate metrics or alerts.
4. Test in **Chat** with a bounded NRQL query (include `SINCE` and `LIMIT`).

## Available tools

| Tool                      | Description                                                                                                                                                 |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Run NRQL Query**        | Runs an NRQL query for metrics, events, logs, or traces. Optional account ID override.                                                                      |
| **List Entities**         | Searches monitored entities (APM apps, hosts, browsers, synthetics, workloads, dashboards, and more). Optional type filter and limit (default 25, max 200). |
| **Get Entity Details**    | Returns golden metrics, tags, relationships, alert status, and recent violations for an entity GUID.                                                        |
| **List Alert Policies**   | Lists alert policies for the account.                                                                                                                       |
| **List Alert Conditions** | Lists NRQL alert conditions for a policy.                                                                                                                   |
| **List Active Incidents** | Lists currently open incidents (recent window; results are capped).                                                                                         |

## Use cases

* Investigate elevated error rates or latency with a focused NRQL query
* Find the entity GUID for an application, then pull alert status and relationships
* Summarize open incidents for an ops standup
* Explain which alert policy or condition applies to a service

## Tips

* Prefer bounded NRQL (`SINCE`, `WHERE`, `LIMIT`) so responses stay readable and fast.
* Set the account ID on the connection so every tool call does not need it repeated.
* Use EU region when the New Relic organization is hosted in the EU.
* Treat User Keys like secrets — do not paste them into prompts, tickets, or screenshots.

## Troubleshooting

| Symptom                      | What to check                                                                       |
| ---------------------------- | ----------------------------------------------------------------------------------- |
| No New Relic tools available | User Key missing or invalid on the connection                                       |
| Auth / GraphQL errors        | Confirm the key is a User Key (`NRAK-`), not a license key; check region US vs EU   |
| Wrong account data           | Verify Account ID matches the New Relic UI                                          |
| Empty entity list            | Broaden the search query or raise the limit; confirm the key can see those entities |
| Timeouts on large queries    | Narrow the NRQL window and add `LIMIT`                                              |

## Related

* [Toolkits overview](/agents/toolkits/overview)
* [Datadog](/agents/toolkits/datadog)
* [PagerDuty](/agents/toolkits/pagerduty)
