Skip to main content

Guided setup

From the root of your agent project, run the published setup wizard:
npm
It checks workspace access, installs the SDK when needed and creates an example without overwriting existing files. It detects supported frameworks from declared dependencies and provides the matching instrumentation steps. Match the browser code and approve access to your workspace. Browser setup saves private CLI credentials and a gitignored .env.sentrial; load it as instructed before running your example. Unset SENTRIAL_API_KEY for browser sign-in. To use a hidden API-key prompt instead, omit --browser; prompted keys are not saved. Run the example to send telemetry, then check the printed session ID with Doctor. See the CLI guide for dry-run, unattended setup and delivery diagnostics. For a Python-only workflow, use the Python setup commands below.

CLI Install

Install the Sentrial CLI:
npm
Then initialize Sentrial from the root of your agent repo:
Or use the CLI without installing globally:
npm
The CLI installs the right SDK package for your project and writes a safe example integration file.

One-Line Bootstrap

Use the published npm package from your agent project’s root. This is the same wizard as guided setup above; a separate shell installer is not required.
npm
This requires Node.js 18+ and npm. For coding agents, supply SENTRIAL_API_KEY privately and use the unattended options:
For install-only behavior, use sentrial install instead of sentrial setup. That command installs examples without checking workspace access.

Options

npx may download the package from npm. The wizard’s dry-run itself does not install SDKs into your project, write examples or send telemetry. For a Python-only environment without Node.js, use Python setup below.

Python

Basic Installation

Python terminal setup

Python 0.10.0 includes guided setup, delivery diagnostics and recorded demos. From your agent project, preview the changes, then apply them with SENTRIAL_API_KEY supplied privately:
Setup creates an example and checks workspace access; it does not run the example or save your API key. After running the example, check its session:
These commands require no Node.js installation. Browser approval uses the Node wizard described above.

With LangChain Support

Requirements

  • Python 3.9 or higher
  • requests library (installed automatically)
  • langchain-core (optional, for LangChain integration)

TypeScript / Node.js

For global CLI access:

Requirements

  • Node.js 18 or higher
  • TypeScript 5.0+ (for TypeScript projects)

Configuration

Set your API key as an environment variable for automatic configuration:

Python Configuration

TypeScript Configuration

Getting Your API Key

1

Sign in to Sentrial

Go to sentrial.com and sign in.
2

Go to Settings

Navigate to Settings → API Keys in the sidebar.
3

Create API Key

Click “Create API Key”, give it a name, and copy the key.
Keep your API key secure. Never commit your API key to version control. Use environment variables or a secrets manager.

Verify Installation

Run the generated example or the complete first-trace quickstart. The quickstart waits for telemetry delivery and prints a session ID. Open that session in Telemetry in the same workspace and check its input, tool result and final output. For delivery diagnostics in a Node.js environment:
Doctor requires the same API origin and a key with sessions:read and events:read. It reads existing data without sending traces or running a model. See Doctor results for missing credentials, incomplete delivery and other checks that need attention. A session ID confirms that the session was acknowledged. Inspecting its events establishes what was received; neither step by itself verifies a signal prediction.

Next Steps

Quick Start

Send a first trace and inspect its tool evidence.

Python SDK Reference

Complete API reference.