Pular para o conteúdo principal

New Relic Toolkit

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
  • 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​

ToolDescription
Run NRQL QueryRuns an NRQL query for metrics, events, logs, or traces. Optional account ID override.
List EntitiesSearches monitored entities (APM apps, hosts, browsers, synthetics, workloads, dashboards, and more). Optional type filter and limit (default 25, max 200).
Get Entity DetailsReturns golden metrics, tags, relationships, alert status, and recent violations for an entity GUID.
List Alert PoliciesLists alert policies for the account.
List Alert ConditionsLists NRQL alert conditions for a policy.
List Active IncidentsLists 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​

SymptomWhat to check
No New Relic tools availableUser Key missing or invalid on the connection
Auth / GraphQL errorsConfirm the key is a User Key (NRAK-), not a license key; check region US vs EU
Wrong account dataVerify Account ID matches the New Relic UI
Empty entity listBroaden the search query or raise the limit; confirm the key can see those entities
Timeouts on large queriesNarrow the NRQL window and add LIMIT