Skip to content

/

Getting started

Quickstart

Install the SDK, wrap your agent and open your first trace in five minutes.

LAST UPDATED

This guide takes a working agent and makes it visible.

Install

npm i @tracewell/sdk
npm i @tracewell/sdk
npm i @tracewell/sdk

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.

Create a free website with Framer, the website builder loved by startups, designers and agencies.