---
title: "Metrics"
method: GET
path: "/api/metrics"
tags: ["Health & Metrics"]
---

# Metrics

`GET /api/metrics`

## Request

- Base URL: `https://api.agentstack.tech` (the document declares no server; this is the origin it was published from)
- URL: `https://api.agentstack.tech/api/metrics`
- Auth: none required

AgentStack Native Metrics Endpoint (single source of truth for admin monitoring).

Response contract (all keys present; values may be null/empty/error on failure):
- timestamp (str), service (str), version (str), metrics_source (str), execution_sample_limit (int)
- system: { cpu_percent?, memory?: { total_gb, used_gb, available_gb, percent }, disk?: {...}, error? }
- execution_logs: { [service_name]: stats | { error } }; stats may include outcome_unknown,
  p50_duration_ms, p95_duration_ms, top_operations, by_log_source, scope_note
- execution_logs_meta: { methodology, diagnostic_sql }
- cache: { [cache_name]: { service, role?, entries, memory_mb?, ... } }
- database: { total_connections?, active_connections?, idle_connections? } | { error }
- uptime_seconds (float), network: { rx, tx }
- services: [{ name, status, uptime, responseTime, lastChecked }]
- alerts: [{ id, level, title, message, timestamp, resolved }]
- performance: { active_session_slots, recent_session_logs_sample_size,
  recent_session_logs_error_rate_percent, avg_response_time_ms }
- managed_organism: { active_cells, draining_count, by_activity, schedule_heap_pending,
  schedule_driver_running, runtime_started, io_db_straggler_count, io_db_max_workers,
  io_db_shutdown } | { error } — aggregates only (no cell names; safe for public metrics)

On collection errors, individual blocks include "error" key; endpoint does not raise.

## Response `200`

Successful Response

- unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/agentstack/apis/agentstack-core-api.md) · [All operations](https://skmtc.dev/agentstack/apis/agentstack-core-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentstack/apis/agentstack-core-api/revisions/8ecf3406e74a?raw)
