Skip to main content

Trajectory SDK

Trajectory SDK turns raw agent traces and product telemetry into our standardized Trajectory format — the primitive for training, evaluation, and continual learning. Ingest from observability platforms like LangSmith, build trajectories from your own data, or push live telemetry events from your app.

Install

pip install trajectory-sdk

Key Features

  • Ingest traces from anywhere — LangSmith today, extensible to any trace source
  • Bring your own data — build trajectories from CSV/JSONL/OpenAI/Anthropic/Vercel messages with shipped recipes
  • Push product telemetry events — first-class TelemetryEvent primitive with idempotent push
  • Correlate trajectories and events — caller-owned trace_id links uploaded trajectories to the telemetry produced in the same trace
  • Standardized Trajectory schema — typed dataclasses for messages, tool calls, rewards, and metrics
  • E2E bulk export — discover all conversations, trigger a LangSmith bulk export, download, parse, and upload in three lines
  • PII redaction — pluggable transform-based redaction before data leaves your environment
  • Three-line setup — go from raw traces (or your own data) to the Trajectory platform in minutes
All processing runs locally. Your API key and data never leave your environment.

Quickstart

Export your first trajectories in under 5 minutes.

Bring Your Own Data

Build trajectories from CSV / JSONL / OpenAI / Anthropic.

Telemetry Events

Push product telemetry from your app into Trajectory.

Linking Events to Trajectories

Correlate uploaded trajectories with telemetry via trace_id.

Import Traces

Standard LangSmith API import walkthrough.

API Reference

Full function signatures and parameters.