Agents
Get an agent
Returns the agent for the authenticated project, with its status rolled up live. 404 if not found (or belongs to another project) — there is no existence oracle.
get/api/v1/agents/{id}
Request
- Base URL: https://app.lastping.dev
- URL: https://app.lastping.dev/api/v1/agents/{id}
- Auth: API key in header X-Api-Key
Response
The agent.
Example response
{
"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"slug": "nightly-etl-bot",
"name": "Nightly ETL bot",
"description": "Runs the nightly ETL pipeline and owns its monitors.",
"status": "up",
"monitor_count": 3,
"last_seen": "2026-07-10T03:00:05Z",
"spend_24h": {
"cost_usd": "0.006600",
"cost_source": "estimated",
"tokens_in": 150,
"tokens_out": 50,
"runs": 1
},
"runs_7d": [
{
"day": "2026-09-14",
"runs": 12
}
],
"usage_24h": {
"day": "2026-09-20",
"model": "claude-sonnet-4-5",
"provider": "anthropic",
"tokens_in": 182340,
"tokens_out": 20411,
"tokens_cache_read": 95012,
"tokens_cache_write": 4100,
"cost_usd": "0.853221",
"cost_source": "estimated",
"origin": "traces"
},
"top_dependencies": [
{
"kind": "database",
"name": "postgresql",
"direction": "out",
"calls": 1480,
"errors": 12,
"error_rate": 0.0081,
"p50_ms": 10,
"p95_ms": 25,
"series": [
{
"day": "2026-09-20",
"calls": 210,
"errors": 2
}
]
}
],
"created_at": "2026-07-01T12:00:00Z"
}Changes
No recorded changes to this operation across all 2 revisions of this API.