Skip to main content
POST
/
api
/
v1
/
agent
/
analyze-behavior
Analyze Agent Behavior
curl --request POST \
  --url https://api.promptguard.dev/api/v1/agent/analyze-behavior \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "<string>",
  "recent_actions": [
    {}
  ],
  "session_id": "<string>"
}
'
{
  "is_normal": true,
  "anomaly_score": 123,
  "detected_patterns": [
    "<string>"
  ],
  "recommendations": [
    "<string>"
  ]
}

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

Body

application/json

Request to analyze agent behavior

agent_id
string
required
recent_actions
Recent Actions · object[]
required
session_id
string | null

Response

Successful Response

Response from behavior analysis

is_normal
boolean
required
anomaly_score
number
required
detected_patterns
string[]
required
recommendations
string[]
required