tenet-client 0.7.7
- Mock judge for your tests.
tenet_client.testinggives you a real client over an in-memory transport, with no network and no credentials. Testing your integration. - Deadline and circuit breaker.
deadlinebounds a whole call in wall-clock seconds, and an opt-inCircuitBreakermakes 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 ownevaluate_async, for code that needs “may I send this?”. Check a piece of text.- Per-finding decisions.
classify_findingsmaps individual findings onto your own tier names instead of reading the merged verdict. Decide per finding. - Decision records. One normalized
DecisionRecordper decision, with logging and Langfuse sinks. Record every decision. user_prompt=andcandidate_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_idandis_degradedon the verdict. Policy callbacks can log the support id and tell a degraded answer from a finding. A timeout now reacheson_timeout, and falls back toon_unavailablewhen it is unset. Support correlation and degraded answers.
tenet-langchain 0.7.0
Needstenet-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_phasesandrequest_shapertell the judge what a tool does and what the user asked, without subclassing the client.default_judge_contextandRESERVED_CONTEXT_KEYSare 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. OneDecisionRecordper judged call, with logging and Langfuse sinks. Record every decision.- Shadow mode and the reply check.
mode="shadow"judges without acting, andcheck_agent_outputrecords a verdict on the agent’s final reply. Try it before you enforce it. - Human review.
interrupt_policy()andwith_human_review()pause on arevieworblock, and review state can survive a restart.with_human_review()turns onjudge_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 byRefusedExchangeFilter, installed by passingmw.middlewares()tocreate_agent. Human review. strict_toolsand the recursion-limit helper. Fail when a tool is classified nowhere, and sizerecursion_limitfor 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.
tenet-client 0.7.6
agent_reply=. Withphase="agent_output", pass your agent’s reply to check it before the user sees it. It’s sent as the last message withrole: "assistant", and the ask and any retrieved content are read as context. Any other phase raisesValueError. Reply checks are enabled per account. Evaluation parameters.
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/streamand/voice/decide/stream. Authentication. - M2M credentials still work. Tenet-issued M2M credentials authenticate every endpoint, including
/v1/configand/ready, which don’t accept API keys.
tenet-client 0.7.2
api_key=andTENET_API_KEY.TenetCloudJudgeClient(api_key=...)andfrom_env()take a self-serve key. It’s sent as the bearer, with no token mint, and a rejected key raisesJudgeUnavailableErrorwithout retrying. Passing a key and M2M credentials together raisesValueError. tenet-client.
Docs
- Four decisions everywhere. Examples branch on
allow/caveat/review/block; areviewholds the call or pauses for a person. Human-in-the-loop review. - Voice is live.
POST /voice/decide/streamis a research preview onjudge.tenetlabs.com. Voice guardrails.
Multi-turn requests
- Earlier user turns are context, not the request. When
messagescarries more than oneusermessage — asprior_user_turnssends — 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.
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 insidetool_input. Reserved keys (tool_input,surface,workflow, …) raiseValueError. Evaluation parameters. - Dict
tool_inputrides a named wire field. A dicttool_inputis now also sent as the top-leveltool_inputfield. It isn’t rendered to the judge, so put what the judge must read incontext. Tool context. - Splatting a dict
tool_inputintocontextis deprecated. Its other keys are still merged intocontext, now with aDeprecationWarning; this becomes a hard error in 0.8.0. Passingcontext=(even{}) opts out and silences it. Tool context.