Skip to main content

Language support

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

Manual setup: OpenTelemetry

Python: automatic instrumentation

Install

Setup

Tool-use blocks are unpacked. You get llm.input_messages.*, llm.output_messages.*, tool.name, tool.parameters, and llm.token_count.{prompt,completion}.

Alternative

The Traceloop alternative (opentelemetry-instrumentation-anthropic) emits gen_ai.* and traceloop.*: also recognized by Agnost AI.

Verify

Run one client.messages.create call, then open Events in Agnost AI. Confirm message and tool-use attributes appear as expected.

Troubleshooting

  • Confirm AnthropicInstrumentor().instrument(...) runs before Anthropic calls.
  • Confirm OTEL_EXPORTER_OTLP_HEADERS contains X-Agnost-Org-ID=<your-org-id>.
  • Confirm using_attributes wraps the call you want grouped.

References

TypeScript: manual instrumentation

Install the OpenTelemetry packages alongside your existing Anthropic SDK:
Start OpenTelemetry before creating the Anthropic client, then wrap the call you want to track:
Run one message call, then open Events in Agnost AI and confirm the input, output, model, user, and conversation fields are present.

Next steps

  • Conversations: review the complete Anthropic interaction.
  • Events: inspect the SDK or OpenTelemetry records.
  • Intents: organize production conversations by what users wanted.