Skip to main content

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. 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.
Install the skill once in your coding-agent environment:
Run the framework-specific prompt below from the application root. Review the resulting diff before deploying it.

Manual setup: Agnost AI SDK

Wrap the handler that turns an incoming provider message into the reply sent by your Spectrum application:
Call await agnost.shutdown() during application shutdown so buffered events flush.

Manual setup: OpenTelemetry

Spectrum-TS has built-in OpenTelemetry instrumentation. Enable it with telemetry: 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 have spectrum-ts installed? Skip.
Official provider imports:

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

Set the sample’s environment variables using the mechanism appropriate for your local runtime:
Use the provider you need, for example 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.