Skip to content
launchdarkly avatar

Custom Metrics

Create, track, retrieve, update, and delete custom business metrics that tie agent outcomes to configs.

CCM score
61 of 100
skills.sh installs
1.9K
GitHub stars
32
last updated
Jul 14, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers the full metric lifecycle: define with create-metric, emit events via SDK, read with get-metrics, then modify or remove
  • Includes REST API scripts for numeric metrics with unit and successCriteria set, plus SDK tracking examples in Python and Node.js
  • Requires writer role API token only for updates and deletes; enforces successCriteria as HigherThanBaseline or LowerThanBaseline for numeric metrics
  • Designed for teams comparing custom outcome metrics across config variations alongside built-in agent metrics

Install

$ npx -y skills add launchdarkly/ai-tooling --skill custom-metrics -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Custom Metrics for Configs

Full lifecycle management of custom business metrics: create metric definitions with the MCP server, track events via SDK, retrieve metric data, and manage metrics programmatically.

Prerequisites

  • LaunchDarkly AI SDK initialized (see sdk-install). The SDK reads LD_SDK_KEY from the environment.
  • The remotely hosted LaunchDarkly MCP server configured in your environment
  • A LaunchDarkly API token with the writer role, only to update or delete metrics, or for scripts that can't use MCP
  • Understanding of built-in agent metrics (see built-in-metrics)

API Access

Use the LaunchDarkly MCP server tools wherever one exists: they authenticate via OAuth and need no token. Create metrics with create-metric, check that events are arriving with get-metric-events, read definitions with get-metrics, and change or remove them with update-metric and delete-metric. For scripts that can't use MCP, ask the user to paste an API access token for this session and substitute it for {api_token} in the examples below. Do not search environment variables, .env files, or agent/MCP config files for credentials.

Metrics Lifecycle Overview

Details

Repository
github.com/launchdarkly/ai-tooling
Categories
AI Agents & LLM Apps, Business, Legal & HR
First seen
Jul 14, 2026

Questions

What does the custom-metrics skill do?

The custom-metrics skill manages the full lifecycle of custom business metrics for LaunchDarkly configs. It creates metric definitions through the LaunchDarkly MCP server, tracks events from code with the AI SDK, and retrieves metric data.

What do I need before using the custom-metrics skill?

You need the LaunchDarkly AI SDK initialized, with LD_SDK_KEY set in the environment, and the remotely hosted LaunchDarkly MCP server configured. Updating or deleting a metric also needs a LaunchDarkly API token with the writer role.

How do I install the custom-metrics skill?

Run npx -y skills add launchdarkly/ai-tooling --skill custom-metrics -y in a project. The skill then lets the agent create metrics, send events with track(), and query metric results for your configs.

Where does custom-metrics sit in the AI Agents & LLM Apps category?

It is listed in the AI Agents & LLM Apps category, alongside microsoft-foundry, azure-ai and google-agents-cli-adk-code. It sets itself apart by attaching custom business metrics to a config's variations so they can be compared next to built-in agent metrics.

More from launchdarkly/ai-tooling

All 40

Similar to Custom Metrics

More AI Agents & LLM Apps