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

# Metrics

> Runs, error rate, latency, LLM tokens and cost over time for a project, agent or workflow.

Metrics summarize what your agents and workflows did over a time range. They are derived from data Luno OS already records: trace spans, workflow runs and usage. Nothing extra to instrument.

## Where to find metrics

| View | Scope |
| - | - |
| **Projects → your project → Metrics** | Every agent and workflow in the project |
| **Agent → Metrics** tab | That agent's sessions, model calls and cost |
| **Workflow → Metrics** tab | That workflow's runs, plus the model calls and cost of agents it called |

Pick **24 hours** (hourly buckets), **7 days**, **30 days** or **This month** (daily buckets; the UTC calendar month so far, like billing). Buckets are aligned to UTC. The view refreshes every minute. A Space's **Observability** tab in Governance opens on **This month** so its totals match the month's spend shown there; Studio opens on 24 hours.

## What is measured

| Metric | Source |
| - | - |
| **Runs** and **error rate** | Agent prompts (`agent_session` spans) and workflow runs. A failed prompt or a `failed` workflow run counts as an error; canceled runs do not |
| **Latency (p50 / p95)** | Duration of finished prompts or workflow runs in each bucket |
| **LLM tokens** | `llm` spans (one per model step): input, output and cached input tokens, plus the most-called models |
| **Cost** | Billed usage events (credits), plus the provider cost reported for your own API keys |

Each run is counted in the bucket where it started. Very busy ranges are capped at the most recent 20,000 samples per kind; the view says so when that happens, and counts are then lower bounds.

## From the CLI and SDK

```bash theme={null}
luno metrics get                       # linked project, last 24 hours
luno metrics get --range 7d --agent support
luno metrics get --range 30d --workflow daily-digest --project my-project
```

The command prints the same JSON the dashboard reads (`GET /api/projects/:projectId/metrics/timeseries?range=24h|7d|30d|month&agent=|workflow=`), also available as `platform.projectMetrics.timeseries(projectId, { range, agent, workflow })` in `@meetluno/sdk/platform`. Any project member can read it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.