One developer layer for the full AI lifecycle.
Status: Stable · GA Companion docs: Get started · Concepts · Verdicts and modes · Evals onboarding Source of truth: the shipped Python and TypeScript SDKs plus their backing API contracts.
Your first integration is the same idea in both SDKs
Set a baseline. Wrap a familiar provider call. Read a GovernanceResult.
Python and TypeScript are live, first-class SDKs, and the language tabs stay in
sync across the docs.
The core SDK path
A familiar model call with a typed decision beside it.
- Python
- TypeScript
from trinitite import Trinitite
tr = Trinitite()
tr.govern(frameworks=["soc2"], mode="enforce")
response = tr.client(
"openai",
credential="cred_openai_prod",
).chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Refund order 4821."}],
)
result = tr.result(response)
print(result.verdict)
print(result.violations)
print(result.compliance)
import { Trinitite } from "@trinitite/sdk";
const tr = new Trinitite();
await tr.govern({
frameworks: ["soc2"],
mode: "enforce",
});
const response = await tr.client("openai", {
credential: "cred_openai_prod",
}).chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Refund order 4821." }],
});
const result = tr.result(response);
console.log(result.verdict);
console.log(result.violations);
console.log(result.compliance);
What the foundation gives you
One integration, a wider runway
Build, prove, and improve in the same loop
Connect
Models, agents, MCP, CLI, and Skills share one foundation.
Test
Run evals and red-team the behavior that matters to you.
Explain
See the verdict, findings, controls, risk, and decision trace.
Improve
Turn recurring failures into prompt candidates and better Guardians.
Operate
Trace live behavior, replay decisions, and route evidence to your tools.
Train and serve
Version focused models, compare them, promote them, or roll back.
The SDK is more than a model wrapper:
- Model and agent runtime: govern calls and normalize each result.
- MCP and CLI: apply rules around tool calls and command execution.
- Skills: bring skill content into the governed asset model.
- Evals and red-teaming: test traces, captured traffic, or simulated users.
- Prompt improvement: generate and compare candidates against frozen cases.
- Training and serving: version focused models, test challengers, promote, route, and roll back.
- Observability: search, replay, compare, stream, and export decisions.
- Governance and compliance: connect findings to policies, controls, risks, evidence, and reports.
- Deployment choice: use SaaS, hybrid, or self-hosted enterprise shapes.
Each surface has its own typed handle. The common posture and result model keep them from becoming separate islands.
Three layers keep a large system simple
The three-layer model, three nouns, one rule
Scope
A goal
Declare the goal once. Every asset bound to this scope shares the goal and its stacked policies.
tr.scope("refund-flow", goal="Resolve refunds within policy")The baseline is the shared posture. A scope groups work around one goal. An asset is a model, MCP server, CLI, Skill, connector, sandbox, or RAG system. Assets inherit the baseline and, when scoped, the goal-specific rules.
The value grows with each real call
Technical workshop
Inspect the closed loop
Nothing advances until you do.
Step 1 of 5
Pin the baseline, goal, and scope.
The loop gives developers a direct path from production behavior to the next change. Evals show where to focus. Explanations show why. Prompt and training work can target repeat failures. Release gates compare the new version against fixed evidence before it ships.
Choose your next move
- Get started: production-ready setup in Python or TypeScript.
- Concepts: baseline, scope, asset, and result paths.
- Evals onboarding: test an agent on repeatable cases.
- Training: improve a Guardian or focused model.
- Models and routing: compare and route models with visible limits.
- Observability: replay and export governed decisions.