Skip to main content
GET
/
api
/
v1
/
agent
/
{agent_id}
/
stats
Get Agent Stats
curl --request GET \
  --url https://api.promptguard.dev/api/v1/agent/{agent_id}/stats \
  --header 'Authorization: Bearer <token>'
{
  "agent_id": "<string>",
  "total_tool_calls": 123,
  "blocked_calls": 123,
  "avg_risk_score": 123,
  "active_sessions": 123,
  "anomalies_detected": 123
}

Authorizations

Authorization
string
header
required

API Key authentication for developer endpoints (/api/v1/*). Use format: 'Bearer pg_api_your_key_here'

Headers

x-api-key
string | null

Path Parameters

agent_id
string
required

Response

Successful Response

Statistics for an agent

agent_id
string
required
total_tool_calls
integer
required
blocked_calls
integer
required
avg_risk_score
number
required
active_sessions
integer
required
anomalies_detected
integer
required