Read your team's Cognition metrics
One GET request returns daily sessions, tool calls, skill loads, outcomes and estimated savings for your team, for your own dashboards or an analytics platform. Counts only, never memory.
The metrics API reports how your team uses Cognition, one UTC day at a time: how many agent sessions called it, how many tool calls they made and how fast they were, which agents they came from, how often saved skills were loaded, and whether those skills helped. Point a BI tool or an analytics platform at it and it stays current without anyone exporting anything.
A metrics key reads counts only. It cannot read memory, skills, handoffs or prompts, it cannot write, and every other Cognition endpoint refuses it. The response never names a person.
Create a key
An org admin signs in, opens the team portal at lamlab.ai/org, and creates a key under Metrics API keys. Name it after the platform that will use it. The key is shown once; store it as a secret on the server that will call the API. A key lasts a year and can be revoked from the same panel at any time.
The request
curl -sS "https://www.lamlab.ai/api/v1/metrics?from=2026-11-01&to=2026-11-27" \ -H "Authorization: Bearer $COGNITION_METRICS_KEY"
The response
{
"object": "metrics",
"scope": "org",
"window": { "from": "2026-11-21", "to": "2026-11-27", "timezone": "UTC", "days": 7 },
"totals": {
"tool_calls": 4210, "sessions": 388, "active_developers": 41,
"tool_calls_by_host": { "claude": 2900, "codex": 1100, "cursor": 210 },
"skill_loads": 1530,
"skill_outcomes": { "helped": { "user_confirmed": 12, "agent_reported": 96, "inferred": 40 }, "not_helped": 9 },
"estimated_tokens_saved": { "user_confirmed": 61000, "agent_reported": 402000, "inferred": 150000 },
"external_outcomes": { "passed": 220, "failed": 31, "by_type": { "test": { "passed": 180, "failed": 25 } } }
},
"daily": [ { "date": "2026-11-21", "status": "final", "tool_calls": 602, "latency_p95_ms": 840, "...": "..." } ],
"measurement": { "measured": ["tool_calls", "..."], "estimated": ["estimated_tokens_saved"] },
"coverage": { "complete": true, "notes": [] }
}What each number means
| Field | Measured or estimated | Meaning |
|---|---|---|
| tool_calls, tool_errors | Measured | Cognition tool calls made with a person's key, and how many failed. Calls with a shared team key are not counted |
| sessions | Measured | Agent sessions that called Cognition at least once |
| active_developers | Measured | People whose agents called Cognition. In totals, distinct across the whole window |
| latency_p50_ms, latency_p95_ms | Measured | Server time per tool call, per day |
| tool_calls_by_host, sessions_by_host | Measured | Split by agent: claude, codex, cursor, gemini, generic or other |
| skill_loads, distinct_skills_loaded | Measured | Times saved skills were loaded into an agent, and how many different skills |
| skill_outcomes | Measured count of reports | Reports that a loaded skill helped or not, split by who vouched for it |
| external_outcomes | Measured | Test, typecheck, lint, build and deploy results posted to /api/v1/outcomes. CI can post up to 7 days late, so recent days can still grow |
| estimated_tokens_saved | Estimated | Modelled tokens the agent did not spend rediscovering context, on helpful outcomes |
Who vouched for an outcome matters, so the API never merges the three. user_confirmed means a person said the skill helped. agent_reported means the coding agent said so. inferred means a later signal suggested it, such as a merged pull request or a deploy without a rollback. Token savings are always estimates, never a provider's token count, whichever column they sit in.
Privacy: no single person's day
Cognition never shows a team view of one person's work. When fewer than 3 people used Cognition on a day, that day comes back as { date, status, suppressed: true } with no figures, and quiet days are withheld the same way so they cannot mark who was away. Totals add up only the days that are shown, and when any day is withheld, totals.active_developers and totals.sessions are null, because a window-wide distinct count would let two overlapping windows reveal the withheld day. If fewer than 3 people were active in the whole window, totals is null. privacy.suppressed_days says how many days were withheld. A personal key always sees its own figures.
Freshness
- Each day has a status. final: usage has settled, but external outcomes can still arrive for up to 7 days. live: usage is still counting, including just after midnight UTC. pending: not computed yet on this request; try again.
- coverage.complete is false whenever a figure is partial, and coverage.notes says which one and why.
- Responses can be up to a minute old. Polling more often than every few minutes returns the same numbers.
Limits and errors
| Status | code | What to do |
|---|---|---|
| 400 | invalid_window | Fix from or to: YYYY-MM-DD, not in the future, at most 92 days |
| 401 | unauthorized, key_expired | Check the key, or create a new one |
| 403 | unauthorized, metrics_permission_required | Use an authorized metrics key or a Cognition key with read access |
| 429 | rate_limited | 120 requests per key per hour. Wait for Retry-After |
| 503 | storage_unavailable | Retry after the Retry-After seconds |
| 503 | not_provisioned, service_unavailable | Metrics storage has not been provisioned or the service is not configured on this deployment |
A personal key (cog_me_*) also works here and returns the same shape for its own holder only, with scope set to personal.
Next steps