Skip to main content

SDK

Set your house rules once. Group the AI that shares a goal together. Trinitite watches every call, lines it up with your compliance rules, learns from it, and keeps a signed receipt for every decision. You connect the AI you already use. We handle the rest.

Status: Stable · GA Companion docs: Get started · Concepts · Verdicts and modes · The closed loop · Evals onboarding Source of truth: the backend SDK Foundation DX contract. This section is the public, typed projection. When the two disagree, the contract wins.

Two lines, and every call after is checked

Wrap the model you already chose. Read the result. That is the whole integration. The baseline, the Guardian, and the signed receipt all appear on their own.

from trinitite import Trinitite

tr = Trinitite # reads TRINITITE_API_KEY

resp = tr.client("openai", credential="cred_openai_prod").chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "I want a refund for order #4821."}],
)
r = tr.result(resp) # verdict + diff + violations + compliance + risk + receipt

The same shape works in TypeScript with @trinitite/sdk. The two SDKs share one contract, so they cannot drift. One layer, not ten tools: a Guardian, a proxy, an eval harness, an audit ledger, a red-teamer, and a policy engine all collapse into a single integration.

p95
< 0ms
verdict latency
every call
0
verdicts, one returned
integrate
0
lines to a governed call
the judge
0%
same bytes every run

What you get back

Every governed call returns one verdict, plus the diff, the violated controls, the compliance crosswalk, a risk read, and a signed receipt. The verdict is the legible source of truth. Emu is alongside it, never the only cue.

The same six, as a quick-reference table:

PassedThe output is fine.200 passthrough
CorrectedSomething was off. Trinitite fixed it.200 + JSON Patch
BlockedSomething was dangerous. Trinitite stopped it.403 GOVERNANCE_BLOCKED
MaskedSensitive data was swapped for a token on the way out.masking hook in proxy
HiTLA human needs to look.pending review, SLA-clocked
FailedThe check itself broke.guardian error, surfaced

See Verdicts and modes for the full taxonomy and the four ways to run: enforce, monitor, sampled, continuous.

The shape of it

Three nouns, one rule. The baseline is your house rules. A scope is a goal. An asset is a thing you connect. Get these and the rest of the SDK reads itself.

See Concepts for the level 0 to 2 ladder and the three ways a result reaches you.

Why it compounds

The platform gets better on its own, per scope. Every governed call is captured, judged by a brain that returns the same answer every time, and fed back into a better Guardian. That sameness is not a feature you tick. It is the thing that lets the loop close.

See The closed loop for the version vault, the rollback ripcord, and the deploy gate.

Read the SDK

For your agent