Agent Tracing, Results & Evals
Agent correctness includes the path taken, not only final prose. Traces should capture model calls, tool calls, handoffs, guardrails, approvals, failures and token/cost metadata.
type TrajectoryEvent = {
type: 'model' | 'tool' | 'handoff' | 'guardrail' | 'approval';
name: string;
status: 'ok' | 'error' | 'blocked';
latencyMs: number;
};
Evaluate unnecessary tool calls, invalid arguments, duplicate side effects, permission violations, recovery quality and termination within budget.
Practice
- Why can a correct final answer still be a failed agent run?
- What trajectory events should be normalized across framework upgrades?
- How would you detect duplicate tool calls?
- Which trace fields must be redacted?