@@ -137,26 +137,17 @@ const traceAnalyzerAgent: AgentDefinition = {
137137 type : 'array' ,
138138 items : { type : 'string' } ,
139139 } ,
140- relativePerformance : {
141- type : 'string' ,
142- description : 'How this agent performed relative to others' ,
140+ recommendations : {
141+ type : 'array' ,
142+ items : { type : 'string' } ,
143+ description : 'Recommendations for improving this agent' ,
143144 } ,
144145 } ,
145- required : [
146- 'agentId' ,
147- 'strengths' ,
148- 'weaknesses' ,
149- 'relativePerformance' ,
150- ] ,
146+ required : [ 'agentId' , 'strengths' , 'weaknesses' , 'recommendations' ] ,
151147 } ,
152148 } ,
153- recommendations : {
154- type : 'array' ,
155- items : { type : 'string' } ,
156- description : 'Recommendations for improving agents' ,
157- } ,
158149 } ,
159- required : [ 'overallAnalysis' , 'agentFeedback' , 'recommendations' ] ,
150+ required : [ 'overallAnalysis' , 'agentFeedback' ] ,
160151 } ,
161152 systemPrompt : `You are an expert AI agent evaluator analyzing how different coding agents approach problems and make decisions.
162153
@@ -208,9 +199,8 @@ export async function analyzeAgentTraces({
208199 agentId : string
209200 strengths : string [ ]
210201 weaknesses : string [ ]
211- relativePerformance : string
202+ recommendations : string [ ]
212203 } >
213- recommendations : string [ ]
214204} > {
215205 const truncatedTraces = traces . map ( ( t ) => ( {
216206 agentId : t . agentId ,
@@ -258,7 +248,7 @@ Focus on the HOW, not the WHAT: We want to understand and improve how agents wor
258248 } else if ( event . type === 'tool_call' ) {
259249 agentOutput . push ( JSON . stringify ( event , null , 2 ) )
260250 } else if ( event . type === 'error' ) {
261- console . error ( '[Trace Analyzer] Error event:' , event . message )
251+ console . warn ( '[Trace Analyzer] Error event:' , event . message )
262252 }
263253 } ,
264254 } )
@@ -274,7 +264,6 @@ Focus on the HOW, not the WHAT: We want to understand and improve how agents wor
274264 return {
275265 overallAnalysis : 'Error running trace analyzer - not structured output' ,
276266 agentFeedback : [ ] ,
277- recommendations : [ 'Trace analyzer failed to provide structured output' ] ,
278267 }
279268 }
280269
0 commit comments