Prerequisites
- A Trident account at app.usetrident.dev
- Node.js 18+ (TypeScript) or Python 3.9+ (Python)
- An OpenAI API key (used in the example below — any supported provider works)
Steps
After signing in to app.usetrident.dev, create a new project from the dashboard home page. Then open Settings for your project and copy two values:
Call
init() once at application startup — before any LLM call is made. The SDK reads your project keys and wires up automatic OpenTelemetry instrumentation for every LLM client in the process. TypeScript
.env file:.env
Python
.env file (loaded with a library such as python-dotenv):.env
project_pk / project_sk keyword arguments directly. You can also omit both arguments entirely and set the environment variables — the SDK reads them automatically.Both
TRIDENT_PROJECT_PUBLIC_KEY / TRIDENT_PROJECT_SECRET_KEY and the legacy
VOUCH_PROJECT_PUBLIC_KEY / VOUCH_PROJECT_SECRET_KEY environment variable names
are supported. The TRIDENT_* names take priority if both are set.After
init() runs, every LLM call in the same process is automatically captured as an OpenTelemetry trace — no code changes to your model calls required.For TypeScript apps, you can enable zero-code auto-instrumentation without
modifying your source at all. Pass You can also set this permanently via
@vouch-ai/sdk/register as a Node.js
require flag and set your keys in the environment:NODE_OPTIONS:.env
Navigate to your project in app.usetrident.dev and open the Traces page from the sidebar. You’ll see:
agentId to init()Next steps
Run a Red-Team Campaign
Launch your first automated attack campaign against your agent using 200+ adversarial attack vectors.
Enable the Firewall
Route your agent through the Trident firewall gateway to scan prompts and outputs in real time.
Explore Core Concepts
Understand projects, traces, findings, red-team runs, and the cloud security graph.
SDK Reference
Explore the full TypeScript and Python SDK API, including
selfReport() and scan().