Anthropic
Trace Anthropic Claude API calls — conversations, tool use, and agent responses — by wrapping your client calls with AxonPushAnthropicTracer.
Installation
Section titled “Installation”npm install @axonpush/sdk @anthropic-ai/sdkimport Anthropic from "@anthropic-ai/sdk";import { AxonPush } from "@axonpush/sdk";import { AxonPushAnthropicTracer } from "@axonpush/sdk/integrations/anthropic";
const client = new AxonPush({ apiKey: process.env.AXONPUSH_API_KEY!, tenantId: process.env.AXONPUSH_TENANT_ID!,});
const tracer = new AxonPushAnthropicTracer({ client, channelId: 1, agentId: "my-agent",});const anthropic = new Anthropic();
const response = await tracer.createMessage(anthropic, { model: "claude-sonnet-4-20250514", max_tokens: 1024, messages: [{ role: "user", content: "Explain quantum computing." }],});Events Traced
Section titled “Events Traced”| Event | When |
|---|---|
conversation.turn | A new message is sent to the API |
tool.*.start | A tool use block is requested by the model |
tool.result | A tool result is returned |
agent.response | The model returns a complete response |
agent.message | An individual content block is received |