Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pecta.ai/llms.txt

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

GET /v1/reputation/:agentId returns the current reputation score for a single agent within your organization. Pecta serves scores with low latency and keeps them up to date within seconds of each evaluation completing. The score is a 0–1000 integer that reflects recent quality and consistency. It only becomes statistically meaningful after at least 50 evaluations, which is reflected in the status lifecycle field.
Scoring formula: score = floor((pass_rate × 400) + (latency_score × 250) + (streak_score × 200) + (volume_score × 150))Where latency_score = max(0, 1 − avg_latency_ms / 100), streak_score = min(streak, 50) / 50, and volume_score = min(evaluations, 500) / 500.

Endpoint

GET https://api.pecta.ai/v1/reputation/:agentId

Authentication

Required. Pass your API key as a Bearer token:
Authorization: Bearer pk_live_<your-key>

Path parameters

agentId
string
required
The agent identifier to look up. Must match the agent_id used at evaluation time.

Response fields

agent_id
string
The agent identifier.
score
number
Current reputation score, 0–1000. Returns 0 for agents that have never been evaluated.
evaluations
number
Total number of evaluations in the rolling window (max 500).
passed
number
Number of evaluations in the window that passed all gates.
pass_rate
number
Fraction of evaluations that passed, expressed as a decimal between 0 and 1.
avg_latency_ms
number
Average gate evaluation latency across the rolling window in milliseconds.
streak
number
Number of consecutive passing evaluations counting back from the most recent event.
status
string
Lifecycle stage of the agent:
ValueConditionMeaning
"new"0 evaluationsNo data yet
"calibrating"1–49 evaluationsScore building — treat as indicative only
"active"50–499 evaluationsStatistically reliable score
"mature"500+ evaluationsFull rolling window — most accurate

New agent response

When no evaluations exist for the requested agentId, the API returns 200 with a zeroed-out record rather than 404. This makes it safe to poll the endpoint before an agent has run any evaluations.
{
  "agent_id": "my-new-agent",
  "score": 0,
  "evaluations": 0,
  "passed": 0,
  "pass_rate": 0,
  "avg_latency_ms": 0,
  "streak": 0,
  "status": "new"
}

Example request

curl https://api.pecta.ai/v1/reputation/summarizer-v2 \
  --header "Authorization: Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Example response

{
  "agent_id": "summarizer-v2",
  "score": 724,
  "evaluations": 214,
  "passed": 201,
  "pass_rate": 0.9393,
  "avg_latency_ms": 58,
  "streak": 22,
  "status": "active"
}