@@ -535,6 +535,7 @@ def build_execution_metadata(
535535 duration_ms = int (delta .total_seconds () * 1000 )
536536
537537 return {
538+ "executionId" : str (execution .id ),
538539 "inputTokens" : execution .input_tokens or 0 ,
539540 "outputTokens" : execution .output_tokens or 0 ,
540541 "durationMs" : duration_ms or 0 ,
@@ -622,6 +623,7 @@ def build_agent_result(
622623 routing_decisions_camel .append (
623624 {
624625 "fileId" : rd .get ("file_id" , "" ),
626+ "fileName" : rd .get ("file_name" , "" ),
625627 "targetAgent" : agent ,
626628 "reason" : rd .get ("reasoning" , "" ),
627629 "domainScore" : score ,
@@ -644,16 +646,21 @@ def build_agent_result(
644646 # Domain agents (financial, legal, evidence)
645647 findings = output .get ("findings" , [])
646648 entities = output .get ("entities" , [])
647- # Extract group label from input_data stage_suffix
649+ # Extract group label and file names from input_data
648650 group_label = "default"
651+ file_names : list [str ] = []
649652 if execution .input_data and isinstance (execution .input_data , dict ):
650653 raw_suffix = execution .input_data .get ("stage_suffix" , "" )
651654 group_label = (
652655 raw_suffix .lstrip ("_" ) if isinstance (raw_suffix , str ) else "default"
653656 ) or "default"
657+ raw_names = execution .input_data .get ("file_names" , [])
658+ if isinstance (raw_names , list ):
659+ file_names = [str (n ) for n in raw_names ]
654660
655661 result ["baseAgentType" ] = agent_name
656662 result ["groupLabel" ] = group_label
663+ result ["fileNames" ] = file_names
657664 result ["outputs" ] = [
658665 {
659666 "type" : f"{ agent_name } -findings" ,
0 commit comments