Skip to main content
POST
Decide (streaming)

Authorizations

Authorization
string
header
required

A self-serve API key (sk_tenet_…, from platform.tenetlabs.com; accepted on /decide and /decide/stream) or an M2M token (audience https://sdk.tenetlabs.com; accepted everywhere). See /authentication.

Body

application/json
surface
string

What kind of recruiting action is being checked — the judge reads it with the request, and it frames how the ask is interpreted, so pick it per request from the user's current intent, never once per application. Canonical values: resume_triage (screening/filtering candidates — the default), job_ad_drafting, candidate_ranking, interview_question_gen, candidate_outreach. Not an enum on the wire: unknown values are accepted and passed to the judge as written — stick to the five canonical values. Optional: when omitted, the judge infers the surface from the request text; with no clear signal it uses resume_triage. A provided value takes precedence, with one exception: at phase: "agent_input", a provided resume_triage is refined to another canonical surface when the request text clearly matches one. Full guidance: Surfaces.

Example:

"resume_triage"

messages
object[]

Chat-style messages — the content being judged. Each item is a {role, content} object. content is a string or a list of text parts ({"type": "text", "text": ...}; input_text and output_text are also accepted), concatenated with no separator before any scanning or judging. Any other part type (image, audio, file, tool block) returns 422 naming the offending index. With more than one user message, the last is the request under judgment and earlier ones are read as conversation context. Send retrieved or tool-returned text as a role: "tool" message — the judge reads it as untrusted content. Message content.

context
object

Evaluation context — tool name, tool input/output, and any harness metadata. Two keys matter most: recruiter_prompt (the user's actual ask, verbatim — required for full safety-pattern coverage) and candidate_content (the resume/candidate text, whenever the action involves one — omitting it disables candidate-side protections). See Surfaces — what else the judge needs.

phase
enum<string> | null

Where in the agent loop this content sits.

Available options:
agent_input,
tool_pre,
tool_post,
agent_output,
null
resolution_status
enum<string> | null

Whether the tool output resolved the request (tool_post only).

Available options:
resolved,
unresolved,
error,
null
session_id
string | null

Conversation ID — groups a multi-turn conversation's evaluations into one audit trace. Keep it stable within a conversation, new across conversations.

Maximum string length: 199
Example:

"conv-8841"

domains
string[] | null

Per-call narrowing of the entitled domain set. Omit (or null) to run against every domain your account is entitled to (the default — maximum coverage). When provided, the effective set is entitled ∩ requested; unknown or unentitled values are silently filtered. An empty list returns 422.

Example:
intent
enum<string> | null

Caller-asserted classification of the call — the service's highest-precedence intent signal. Omit (or send unknown/null) for no assertion. A read is authoritative only at phase: "tool_post" and advisory at agent_input. Read-intent contract.

Available options:
read,
action,
unknown,
null
Example:

"read"

tool_name
string | null

Name of the tool being judged, as a named top-level field (the SDK sends it at the tool phases). A hint the service re-validates for intent classification — never an exemption. Tool context.

Example:

"send_candidate_message"

tool_input
object | null

The tool's arguments as a named top-level field (tenet-client 0.7.1 sends a dict tool_input here). PII spans detected elsewhere in the request are swept out of it. It is not rendered into the judge's prompt — put what the judge must read in context. Tool context.

Example:
workflow
string | null

Optional label naming which of your integrations made the call (e.g. resume-screener, recruiter-agent), so your account's decisions can be filtered per workflow on the trace. Lowercase letters, digits, ., _, -, starting with a letter or digit; at most 64 chars — a malformed value returns 422. Recorded on the decision trace only: never read by the judge and never affects the verdict. Distinct from surface, which the judge reads and must not be overloaded to separate callers.

Required string length: 1 - 64
Pattern: ^[a-z0-9][a-z0-9._-]*$
Example:

"resume-screener"

mode
enum<string>
default:judge

judge (default) runs the EEO judge. guardrails skips it and runs only PII detection and the safety rails; the response adds redacted — your messages and context with detected PII replaced by placeholders. /decide only: /decide/stream returns 400 for guardrails. Guardrails mode.

Available options:
judge,
guardrails
Example:

"guardrails"

Response

SSE stream (text/event-stream). Each frame: event: <type>, id: <event_id>, data: <json>.

SSE frames. Event types: request_accepted, pii_findings, verdict, verdict_revised, explanation_chunk, rewrite_chunk, safety_findings, error, done.