Choose a setup method
Start with one method for a call path. Combining SDK tracking with framework
OpenTelemetry on the same call can create duplicate interactions.
Recommended: Agnost AI skill
Recommended. Choose this path when you want your coding agent to inspect the
project, select a supported transport, make the smallest instrumentation change,
send a test event, and verify that it reached Agnost AI.
Manual setup: Agnost AI SDK
await agnost.shutdown() during application shutdown so buffered events flush.
Manual setup: OpenTelemetry
Spectrum-TS has built-in OpenTelemetry instrumentation. Enable it withtelemetry: true, then route its OTLP exporter to Agnost AI with standard OTEL_EXPORTER_OTLP_* environment variables.
Note: Spectrum telemetry is exported by the spectrum-ts package itself, so the app must have spectrum-ts installed. The umbrella package includes the official provider packages; install a scoped @spectrum-ts/* package only if the app imports that provider directly.
1. Install
Already havespectrum-ts installed? Skip.
2. Point Spectrum telemetry at Agnost AI
Set these environment variables before starting the Spectrum app. Use your runtime’s environment configuration, a.env file, container configuration, or
your deployment platform:
3. Enable Spectrum telemetry
telemetry: true sends Spectrum’s native spans for provider, space, message, content type, and lifecycle metadata. Current Spectrum native spans do not include raw transcript text. If Agnost AI Chat View must render the actual user/bot messages, emit one additional app-level turn span with agnost.session_id, agnost.user_id, input, and output from your message loop.
Local Sample
telegram, slack, whatsapp-business, imessage, or terminal. Then set telemetry: true in the generated Spectrum(...) config. Native Spectrum telemetry is enough for Trace View and Metadata. Add a separate turn span only if you need transcript text in Chat View.
References
Next steps
- Conversations: review the complete Spectrum interaction.
- Events: inspect provider and message lifecycle activity.
- Intents: organize production conversations by what users wanted.
