This guide takes a working agent and makes it visible.
Install
Wrap your agent
import { tracewell } from '@tracewell/sdk'
tracewell.init({ apiKey: process.env.TRACEWELL_KEY })
export const triage = tracewell.agent('support-triage', async (ticket) => {
const plan = await model.plan(ticket)
return await model.draft(plan)
})import { tracewell } from '@tracewell/sdk'
tracewell.init({ apiKey: process.env.TRACEWELL_KEY })
export const triage = tracewell.agent('support-triage', async (ticket) => {
const plan = await model.plan(ticket)
return await model.draft(plan)
})import { tracewell } from '@tracewell/sdk'
tracewell.init({ apiKey: process.env.TRACEWELL_KEY })
export const triage = tracewell.agent('support-triage', async (ticket) => {
const plan = await model.plan(ticket)
return await model.draft(plan)
})Open the trace
Call your agent once, then open the console. The run appears within a second, with a span for each model and tool call.
Troubleshooting
If nothing appears, check that TRACEWELL_KEY is set and that your process exits only after the SDK flushes.