You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
End-to-end tracing for every agent execution. Track which agent handled what, how many tokens were used, what it cost, how long it took, and whether it succeeded. Essential for debugging multi-agent interactions and cost optimization.
Phase 3 — Agent Observability (Langfuse Tracing)
End-to-end tracing for every agent execution. Track which agent handled what, how many tokens were used, what it cost, how long it took, and whether it succeeded. Essential for debugging multi-agent interactions and cost optimization.
Dependencies
Tasks
Langfuse Setup
Servers/advisor/observability/langfuseConfig.ts— Langfuse client initialization with:Trace Integration
Servers/advisor/observability/traceManager.ts:startTrace(userId, sessionId, metadata)— begin a new trace when user sends messagestartSpan(traceName, agentName, operation)— create span for each agent/tool executionendSpan(span, result, tokensUsed, cost)— close span with resultsendTrace(trace, finalResult)— close trace with overall resultlogError(span, error)— log errors within a spanMetrics to Track
Observability Dashboard
Servers/routes/observability.route.ts— proxy endpoints to Langfuse data:GET /api/observability/traces— recent traces with filtersGET /api/observability/traces/:id— trace detail with full span treeGET /api/observability/costs— cost breakdown by agent, model, time periodGET /api/observability/performance— latency percentiles, error ratesServers/index.ts/ai-observability— embedded Langfuse dashboard or custom UI showing:File Structure
Docker Addition
Branch
feat/ai-foundationPart of Phase 3 — Multi-Agent Orchestration