Anthropic or AsyncAnthropic client with wrap_llm() to auto-trace every messages.create() call and tool_use block in the response.
Using Claude Agent SDK? See the dedicated Anthropic integration —
LangSightClaudeAgentHooks covers the full agent runner lifecycle.Installation
Quick start
client.messages.create() (sync) and client.messages.acreate() (async).
What gets traced
| Span | Fields |
|---|---|
| LLM generation | server_name="anthropic", tool_name="generate/claude-sonnet-4-6", span_type="agent", tokens, model_id |
| Tool use (per block) | tool_name from response, span_type="tool_call", parent_span_id, input_args |