import { initLumina } from '@uselumina/sdk';
import Anthropic from '@anthropic-ai/sdk';
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
const lumina = initLumina({
endpoint: 'http://localhost:9411/v1/traces',
service_name: 'quickstart',
});
async function main() {
console.log('Sending first trace...');
await lumina.traceLLM(
() =>
anthropic.messages.create({
model: 'claude-sonnet-4-5',
max_tokens: 100,
messages: [{ role: 'user', content: 'Hello!' }],
}),
{
name: 'hello-world',
system: 'anthropic',
prompt: 'Hello!',
}
);
console.log('✓ Trace sent! View at http://localhost:3000/traces');
}
main();