Skip to main content
GET
/
v1
/
agents
/
{agent_id}
/
stats
curl https://api.playgent.com/v1/agents/agent_abc123/stats \
  -H "Authorization: Bearer your-api-key"
{
  "agent_id": "agent_abc123",
  "total_runs": 156,
  "total_turns": 423,
  "pass_rate": 0.847,
  "avg_latency_ms": 2340,
  "avg_token_usage": {
    "input": 450,
    "output": 320
  },
  "scorer_breakdown": {
    "relevance": { "avg": 0.89, "min": 0.45, "max": 1.0 },
    "faithfulness": { "avg": 0.92, "min": 0.71, "max": 1.0 }
  },
  "trend_7d": {
    "pass_rate_delta": 0.05,
    "latency_delta_ms": -120
  },
  "top_failure_reasons": [
    { "reason": "Hallucination detected", "count": 12 },
    { "reason": "Off-topic response", "count": 8 }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://playgent.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Retrieve detailed performance metrics, pass rates, and failure analysis for an agent.
agent_id
string
required
Unique identifier for the agent
agent_id
string
required
Agent identifier
total_runs
integer
required
Total number of test runs
total_turns
integer
required
Total number of turns across all runs
pass_rate
number
required
Overall pass rate (0-1)
avg_latency_ms
integer
required
Average response latency in milliseconds
avg_token_usage
object
required
Average token usage per turn
scorer_breakdown
object
required
Statistics per scorer
trend_7d
object
required
7-day performance trend
top_failure_reasons
array
required
Most common failure reasons
curl https://api.playgent.com/v1/agents/agent_abc123/stats \
  -H "Authorization: Bearer your-api-key"
{
  "agent_id": "agent_abc123",
  "total_runs": 156,
  "total_turns": 423,
  "pass_rate": 0.847,
  "avg_latency_ms": 2340,
  "avg_token_usage": {
    "input": 450,
    "output": 320
  },
  "scorer_breakdown": {
    "relevance": { "avg": 0.89, "min": 0.45, "max": 1.0 },
    "faithfulness": { "avg": 0.92, "min": 0.71, "max": 1.0 }
  },
  "trend_7d": {
    "pass_rate_delta": 0.05,
    "latency_delta_ms": -120
  },
  "top_failure_reasons": [
    { "reason": "Hallucination detected", "count": 12 },
    { "reason": "Off-topic response", "count": 8 }
  ]
}