
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
@trustmodel/sdk
Advanced tools
Official TypeScript/Node SDK for TrustModel — AI trust evaluation, OTel telemetry, and agent governance (AGP).
Official TypeScript / Node SDK for TrustModel — AI trust
evaluation, OpenTelemetry telemetry, and agent governance (AGP). Parity with the Python
SDK (trustmodel on PyPI) for the three core surfaces.
Status: scaffold under review. Core client (eval / AGP) lands next; telemetry (
autoInit) is scaffolded. Seedocs/DESIGN.md.
npm install @trustmodel/sdk
# Telemetry (OTel) is optional — install the OTel peers only if you use autoInit():
npm install @opentelemetry/api @opentelemetry/sdk-trace-node \
@opentelemetry/exporter-trace-otlp-http @opentelemetry/resources \
@opentelemetry/semantic-conventions
Requires Node >= 22.12.
import { TrustModelClient } from "@trustmodel/sdk";
const tm = new TrustModelClient({ apiKey: process.env.TRUSTMODEL_API_KEY });
// Model eval → TrustScore
const run = await tm.evaluations.create({
modelIdentifier: "gpt-4o",
vendorIdentifier: "openai",
});
// Agent eval — one call, no upload dance (inline trace)
const agentRun = await tm.agentic.evaluate({
trace: { goal: "Book a flight", steps: [{ step_type: "final_answer", content: "Booked" }] },
agentFramework: "langchain",
governedAgent: "my-agent", // binds the score to the AGP agent
});
// Governance — gate a tool call
const decision = await tm.agp.decide({
tool: "send_email",
args: { to: "ceo@acme.com" },
agentId: "my-agent",
});
Dependency-free, edge-safe OTLP export (Node, Deno, Bun, Workers) — no
@opentelemetry/* required. Wrap work in span(); traces stream to TrustModel with
the trustmodel.agent_id binding the backend needs.
import { autoInit } from "@trustmodel/sdk/telemetry";
const tm = autoInit({
apiKey: process.env.TRUSTMODEL_API_KEY!,
agentId: "my-agent", // → trustmodel.agent_id (binds to your agent)
domain: "general_ai",
});
const answer = await tm.span("llm.call", async () => callOpenAI(prompt), { model: "gpt-4o" });
await tm.flush(); // send buffered spans (also auto-flushes on a timer + on exit)
Opt-in, zero-code capture via OpenInference — install the OTel + instrumentor peers, then:
npm i @opentelemetry/sdk-trace-node @opentelemetry/sdk-trace-base \
@opentelemetry/exporter-trace-otlp-http @opentelemetry/resources @opentelemetry/instrumentation \
@arizeai/openinference-instrumentation-openai # + -langchain / -anthropic as needed
import { enableAutoInstrumentation } from "@trustmodel/sdk";
const ai = await enableAutoInstrumentation({
apiKey: process.env.TRUSTMODEL_API_KEY!,
agentId: "my-agent",
domain: "general_ai",
});
// Every openai/anthropic call is now traced to TrustModel automatically.
// ai.installed → the instrumentors that were wired
The dependency-free autoInit() above needs none of these — it's the edge-safe path.
enableAutoInstrumentation() is the full-OTel path for Node when you want zero-code capture.
| Option | Env | Default |
|---|---|---|
apiKey | TRUSTMODEL_API_KEY | — |
baseUrl | TRUSTMODEL_BASE_URL | per environment |
environment | — | production (qa, local) |
organizationId | TRUSTMODEL_ORGANIZATION_ID | — (→ X-Organization-ID) |
edgeUrl | TRUSTMODEL_EDGE_URL | — (guardrails Edge) |
Auth is Authorization: Bearer <apiKey> — identical to the Python SDK.
See LICENSE. (License is a launch decision — see docs/DESIGN.md §2.)
FAQs
Official TypeScript/Node SDK for TrustModel — AI trust evaluation, OTel telemetry, and agent governance (AGP).
The npm package @trustmodel/sdk receives a total of 1,010 weekly downloads. As such, @trustmodel/sdk popularity was classified as popular.
We found that @trustmodel/sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.