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.
POST /v1/evaluate runs Pecta’s gate suite against a single agent output on Pecta’s servers. This is the simplest way to add quality gates when you cannot install the @pecta/core SDK in-process — for example from a Python, Go, or Java backend. Expect 50–100 ms round-trip latency because gates execute server-side.
The cloud engine runs three default gate categories — filesystem safety, PII detection, and content safety — in parallel with a 50 ms timeout budget. Each gate returns its own pass/fail result, and the overall passed field is true only when every gate passes.
After evaluation, Pecta updates the agent’s rolling reputation window (last 500 evals) and returns the latest score in the same response.
Endpoint
Authentication
Required. Pass your API key as a Bearer token:Request body
Unique identifier for the agent being evaluated. Must be between 1 and 200 characters. Pecta auto-creates an agent record on the first evaluation — no prior registration needed.
Name of the tool or function the agent called. Maximum 200 characters. Included in event records for filtering and analytics.
The input that was passed to the agent or tool. Pecta does not store this value — it is used only within the gate evaluation and then discarded. Send
null or omit the field if you do not want to include it.The agent’s output to evaluate. This is the primary value inspected by the gate suite. Pecta never persists this payload.
How long the agent took to produce its output, in milliseconds. Maximum 60000. Used by the latency gate and to compute the reputation latency score component.
Response fields
Unique ID for this evaluation, generated by the gate engine.
true when every gate passed. false when one or more gates failed.Per-gate results. Each element describes one gate’s verdict.
Total time spent running all gates, in milliseconds.
The agent’s updated reputation after this evaluation.