Skip to main content
SDK

tenet-client 0.7.7

  • Mock judge for your tests. tenet_client.testing gives you a real client over an in-memory transport, with no network and no credentials. Testing your integration.
  • Deadline and circuit breaker. deadline bounds a whole call in wall-clock seconds, and an opt-in CircuitBreaker makes a sustained outage cost one probe per cooldown. Deadlines and outages.
  • check(). Judges one phase and returns an outcome instead of raising, and validates its arguments against the client class’s own evaluate_async, for code that needs “may I send this?”. Check a piece of text.
  • Per-finding decisions. classify_findings maps individual findings onto your own tier names instead of reading the merged verdict. Decide per finding.
  • Decision records. One normalized DecisionRecord per decision, with logging and Langfuse sinks. Record every decision.
  • user_prompt= and candidate_content=. Pass the user’s ask and the candidate’s text as their own arguments. They change what the judge reads, so try them in a test environment first. Evaluation parameters.
  • decision_id and is_degraded on the verdict. Policy callbacks can log the support id and tell a degraded answer from a finding. A timeout now reaches on_timeout, and falls back to on_unavailable when it is unset. Support correlation and degraded answers.

tenet-langchain 0.7.0

Needs tenet-client>=0.7.7. Every option is opt-in; with none set, the requests the judge receives are unchanged.
  • Request shaping. surface_for_tool, tool_descriptions, send_user_prompt_on_tool_phases and request_shaper tell the judge what a tool does and what the user asked, without subclassing the client. default_judge_context and RESERVED_CONTEXT_KEYS are exported for direct client calls. They change what the judge reads, so try them in a test environment first. Tell the judge what the tool does.
  • on_decision. One DecisionRecord per judged call, with logging and Langfuse sinks. Record every decision.
  • Shadow mode and the reply check. mode="shadow" judges without acting, and check_agent_output records a verdict on the agent’s final reply. Try it before you enforce it.
  • Human review. interrupt_policy() and with_human_review() pause on a review or block, and review state can survive a restart. with_human_review() turns on judge_unanswered_messages, so a flagged message whose pause is abandoned cannot reach the model unapproved; it costs one judge call per unanswered message. Refused exchanges are hidden from the judge and the model by RefusedExchangeFilter, installed by passing mw.middlewares() to create_agent. Human review.
  • strict_tools and the recursion-limit helper. Fail when a tool is classified nowhere, and size recursion_limit for the nodes the middleware adds. Make sure every tool is classified.
  • Per-thread state. One instance is safe to share across conversations, with bounded memory. Per-thread state.
SDK

tenet-client 0.7.6

  • agent_reply=. With phase="agent_output", pass your agent’s reply to check it before the user sees it. It’s sent as the last message with role: "assistant", and the ask and any retrieved content are read as context. Any other phase raises ValueError. Reply checks are enabled per account. Evaluation parameters.
SDKDocs

Self-serve API keys

  • Sign up and get a key. Create an account at platform.tenetlabs.com and select View key on the dashboard for your first key. Send it as Authorization: Bearer <key> on /decide, /decide/stream and /voice/decide/stream. Authentication.
  • M2M credentials still work. Tenet-issued M2M credentials authenticate every endpoint, including /v1/config and /ready, which don’t accept API keys.

tenet-client 0.7.2

  • api_key= and TENET_API_KEY. TenetCloudJudgeClient(api_key=...) and from_env() take a self-serve key. It’s sent as the bearer, with no token mint, and a rejected key raises JudgeUnavailableError without retrying. Passing a key and M2M credentials together raises ValueError. tenet-client.

Docs

  • Four decisions everywhere. Examples branch on allow / caveat / review / block; a review holds the call or pauses for a person. Human-in-the-loop review.
  • Voice is live. POST /voice/decide/stream is a research preview on judge.tenetlabs.com. Voice guardrails.
API

Multi-turn requests

  • Earlier user turns are context, not the request. When messages carries more than one user message — as prior_user_turns sends — only the last is judged as the request; earlier turns are read as conversation context. A turn that was already judged is no longer flagged again inside every later request, while a follow-up that carries it out (“yes, do it”) is still judged against it. A single-message request is unchanged. Message content.
SDK

tenet-client 0.7.1

  • Explicit context=. Pass request-level facts the judge should read — role, stage, consent flags, a job description — as a flat dict instead of as extra keys inside tool_input. Reserved keys (tool_input, surface, workflow, …) raise ValueError. Evaluation parameters.
  • Dict tool_input rides a named wire field. A dict tool_input is now also sent as the top-level tool_input field. It isn’t rendered to the judge, so put what the judge must read in context. Tool context.
  • Splatting a dict tool_input into context is deprecated. Its other keys are still merged into context, now with a DeprecationWarning; this becomes a hard error in 0.8.0. Passing context= (even {}) opts out and silences it. Tool context.