Agent traces
For agents you run: wrap a task, record LLM/tool steps, finish. Invince charts 7-day spend, tokens, and stuck loops (same step 4 times in a row, or 6 times in a run). It does not execute the model or guess provider prices.
import * as Invince from '@invince/node';
const trace = Invince.startAgentTrace('Summarize the account', { agentName: 'support-bot' });
trace.recordStep({ type: 'llm', name: 'draft', inputTokens: 120, outputTokens: 40, costUsd: 0.002 });
trace.finish();
Use this when you already have an agent loop. Invince is the chart and the stuck-loop bell, not the agent.