AgentForge

Coordination Tracing

Trace multi-agent workflows — visualize handoffs, timing, and agent interactions.

CoordinationTracer

The Coordinator automatically traces all handoffs and agent runs:

import { CoordinationTracer, formatCoordinationTrace } from '@ahzan-agentforge/core';

const result = await coordinator.run('triage', { task: 'Handle support ticket' });

if (result.trace) {
  console.log(formatCoordinationTrace(result.trace));
}

Trace Output

═══ Coordination coord_abc123 ═══
1. triage (run_001) → 1.2s, 3,400 tokens
   Handoff → support (confidence: 0.92)
2. support (run_002) → 2.5s, 8,200 tokens
   Completed
═══ Total: 3.7s, 11,600 tokens, $0.04 ═══

Handoff Records

Every handoff is recorded in the result:

for (const handoff of result.handoffs) {
  console.log(`${handoff.from} → ${handoff.to}: ${handoff.status} (${handoff.duration}ms)`);
}

Next Steps