KosmoKrator

analytics

New Relic CLI for AI Agents

Use the New Relic CLI from KosmoKrator to call New Relic tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write API key auth

New Relic CLI Setup

New Relic can be configured headlessly with `kosmokrator integrations:configure newrelic`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure newrelic --set api_key="$NEWRELIC_API_KEY" --set account_id="$NEWRELIC_ACCOUNT_ID" --enable --read allow --write ask --json
kosmokrator integrations:doctor newrelic --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key NEWRELIC_API_KEY Secret secret yes API Key
account_id NEWRELIC_ACCOUNT_ID Text string yes Account ID
url NEWRELIC_URL URL url no NerdGraph Endpoint

Call New Relic Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call newrelic.newrelic_list_applications '{}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:newrelic newrelic_list_applications '{}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs newrelic --json
kosmo integrations:docs newrelic.newrelic_list_applications --json
kosmo integrations:schema newrelic.newrelic_list_applications --json
kosmo integrations:search "New Relic" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to New Relic.

newrelic.newrelic_list_applications

Read read

List APM applications in the configured New Relic account. Returns application names, GUIDs, IDs, language, reporting status, and health status.

Parameters
none

Generic CLI call

kosmo integrations:call newrelic.newrelic_list_applications '{}' --json

Provider shortcut

kosmo integrations:newrelic newrelic_list_applications '{}' --json

newrelic.newrelic_get_application

Read read

Get details of a specific New Relic APM application by its application ID, including language, health status, and Apdex thresholds.

Parameters
application_id

Generic CLI call

kosmo integrations:call newrelic.newrelic_get_application '{"application_id":1}' --json

Provider shortcut

kosmo integrations:newrelic newrelic_get_application '{"application_id":1}' --json

newrelic.newrelic_list_deployments

Read read

List deployment markers for a New Relic APM application. Requires the application entity GUID.

Parameters
application_guid

Generic CLI call

kosmo integrations:call newrelic.newrelic_list_deployments '{"application_guid":"example_application_guid"}' --json

Provider shortcut

kosmo integrations:newrelic newrelic_list_deployments '{"application_guid":"example_application_guid"}' --json

newrelic.newrelic_create_deployment

Write write

Record a new deployment marker in New Relic for a given application. This helps correlate deploys with performance changes.

Parameters
application_guid, revision, description, user, changelog

Generic CLI call

kosmo integrations:call newrelic.newrelic_create_deployment '{"application_guid":"example_application_guid","revision":"example_revision","description":"example_description","user":"example_user","changelog":"example_changelog"}' --json

Provider shortcut

kosmo integrations:newrelic newrelic_create_deployment '{"application_guid":"example_application_guid","revision":"example_revision","description":"example_description","user":"example_user","changelog":"example_changelog"}' --json

newrelic.newrelic_list_alert_policies

Read read

List alert policies in the configured New Relic account. Returns policy names, IDs, and incident preferences.

Parameters
none

Generic CLI call

kosmo integrations:call newrelic.newrelic_list_alert_policies '{}' --json

Provider shortcut

kosmo integrations:newrelic newrelic_list_alert_policies '{}' --json

newrelic.newrelic_list_dashboards

Read read

List dashboards in the configured New Relic account. Returns dashboard titles, GUIDs, timestamps, and owner information.

Parameters
none

Generic CLI call

kosmo integrations:call newrelic.newrelic_list_dashboards '{}' --json

Provider shortcut

kosmo integrations:newrelic newrelic_list_dashboards '{}' --json

newrelic.newrelic_get_current_user

Read read

Get the profile of the currently authenticated New Relic user. Useful for verifying API credentials and retrieving account information.

Parameters
none

Generic CLI call

kosmo integrations:call newrelic.newrelic_get_current_user '{}' --json

Provider shortcut

kosmo integrations:newrelic newrelic_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

newrelic.newrelic_list_applications

List APM applications in the configured New Relic account. Returns application names, GUIDs, IDs, language, reporting status, and health status.

Operation
Read read
Schema command
kosmo integrations:schema newrelic.newrelic_list_applications --json
ParameterTypeRequiredDescription
No parameters.

newrelic.newrelic_get_application

Get details of a specific New Relic APM application by its application ID, including language, health status, and Apdex thresholds.

Operation
Read read
Schema command
kosmo integrations:schema newrelic.newrelic_get_application --json
ParameterTypeRequiredDescription
application_id integer yes The New Relic application ID.

newrelic.newrelic_list_deployments

List deployment markers for a New Relic APM application. Requires the application entity GUID.

Operation
Read read
Schema command
kosmo integrations:schema newrelic.newrelic_list_deployments --json
ParameterTypeRequiredDescription
application_guid string yes The entity GUID of the New Relic application.

newrelic.newrelic_create_deployment

Record a new deployment marker in New Relic for a given application. This helps correlate deploys with performance changes.

Operation
Write write
Schema command
kosmo integrations:schema newrelic.newrelic_create_deployment --json
ParameterTypeRequiredDescription
application_guid string yes The entity GUID of the New Relic application.
revision string yes The deployment revision (e.g. commit SHA, version number).
description string no A description of the deployment.
user string no The user who triggered the deployment.
changelog string no Changelog or commit message for the deployment.

newrelic.newrelic_list_alert_policies

List alert policies in the configured New Relic account. Returns policy names, IDs, and incident preferences.

Operation
Read read
Schema command
kosmo integrations:schema newrelic.newrelic_list_alert_policies --json
ParameterTypeRequiredDescription
No parameters.

newrelic.newrelic_list_dashboards

List dashboards in the configured New Relic account. Returns dashboard titles, GUIDs, timestamps, and owner information.

Operation
Read read
Schema command
kosmo integrations:schema newrelic.newrelic_list_dashboards --json
ParameterTypeRequiredDescription
No parameters.

newrelic.newrelic_get_current_user

Get the profile of the currently authenticated New Relic user. Useful for verifying API credentials and retrieving account information.

Operation
Read read
Schema command
kosmo integrations:schema newrelic.newrelic_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.