ragaai-catalyst 2.1.5b24__tar.gz → 2.1.5b26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. {ragaai_catalyst-2.1.5b24/ragaai_catalyst.egg-info → ragaai_catalyst-2.1.5b26}/PKG-INFO +10 -3
  2. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/README.md +9 -2
  3. ragaai_catalyst-2.1.5b26/docs/img/custom_metrics.png +0 -0
  4. ragaai_catalyst-2.1.5b26/docs/img/dataset.png +0 -0
  5. ragaai_catalyst-2.1.5b26/docs/img/evaluation.png +0 -0
  6. ragaai_catalyst-2.1.5b26/docs/img/guardrails.png +0 -0
  7. ragaai_catalyst-2.1.5b26/docs/img/last_main.png +0 -0
  8. ragaai_catalyst-2.1.5b26/docs/img/main.png +0 -0
  9. ragaai_catalyst-2.1.5b26/docs/img/projects_new.png +0 -0
  10. ragaai_catalyst-2.1.5b26/docs/img/trace_comp.png +0 -0
  11. ragaai_catalyst-2.1.5b26/examples/travel_agent/config.py +27 -0
  12. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/travel_agent/main.py +3 -1
  13. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/travel_agent/tools.py +1 -0
  14. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/pyproject.toml +2 -3
  15. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/evaluation.py +51 -1
  16. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/agent_tracer.py +137 -101
  17. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/base.py +1 -0
  18. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/custom_tracer.py +4 -6
  19. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/llm_tracer.py +189 -154
  20. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/main_tracer.py +7 -60
  21. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/tool_tracer.py +4 -6
  22. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_local_metric.py +3 -1
  23. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/file_name_tracker.py +5 -1
  24. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/zip_list_of_unique_files.py +26 -12
  25. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/distributed.py +10 -27
  26. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/langchain_callback.py +59 -6
  27. ragaai_catalyst-2.1.5b26/ragaai_catalyst/tracers/llamaindex_instrumentation.py +424 -0
  28. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/tracer.py +37 -20
  29. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/upload_traces.py +4 -1
  30. ragaai_catalyst-2.1.5b26/ragaai_catalyst/tracers/utils/convert_llama_instru_callback.py +69 -0
  31. ragaai_catalyst-2.1.5b26/ragaai_catalyst/tracers/utils/extraction_logic_llama_index.py +74 -0
  32. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26/ragaai_catalyst.egg-info}/PKG-INFO +10 -3
  33. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst.egg-info/SOURCES.txt +16 -0
  34. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst.egg-info/requires.txt +1 -1
  35. ragaai_catalyst-2.1.5b26/test/test_catalyst/test_base_tracer_add_metrics.py +130 -0
  36. ragaai_catalyst-2.1.5b26/test/test_catalyst/test_base_tracer_metrics.py +126 -0
  37. ragaai_catalyst-2.1.5b26/test/test_catalyst/test_evaluation_metrics.py +155 -0
  38. ragaai_catalyst-2.1.5b26/test/test_catalyst/test_langchain_tracing.py +175 -0
  39. ragaai_catalyst-2.1.5b26/test/test_catalyst/upload_trace_zip_automation.py +582 -0
  40. ragaai_catalyst-2.1.5b24/examples/travel_agent/config.py +0 -24
  41. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  42. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  43. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  44. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/.gitignore +0 -0
  45. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/LICENSE +0 -0
  46. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/docs/dataset_management.md +0 -0
  47. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/docs/prompt_management.md +0 -0
  48. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/FinancialAnalysisSystem.ipynb +0 -0
  49. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/TravelPlanner.ipynb +0 -0
  50. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/agentic_rag.py +0 -0
  51. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/custom_tracer_example.py +0 -0
  52. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/customer_support.py +0 -0
  53. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/finance.py +0 -0
  54. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/langgraph_examples/agentic_rag.py +0 -0
  55. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/langgraph_examples/customer_support.py +0 -0
  56. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/langgraph_examples/multi_tool.py +0 -0
  57. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/langgraph_examples/planning_agent.py +0 -0
  58. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/langgraph_multi_tools.py +0 -0
  59. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/function_calling_agent.ipynb +0 -0
  60. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/joke_gen_critique.py +0 -0
  61. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/joke_gen_critique_anthropic.py +0 -0
  62. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/joke_gen_critique_async.py +0 -0
  63. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/joke_gen_critique_azureopenai.py +0 -0
  64. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/joke_gen_critique_gemini.py +0 -0
  65. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/joke_gen_critique_litellm.py +0 -0
  66. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/joke_gen_critque_vertex.py +0 -0
  67. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/react_agent.ipynb +0 -0
  68. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/llamaindex_examples/tool_call_agent.py +0 -0
  69. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/planning_agent.py +0 -0
  70. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/prompt_management_litellm.ipynb +0 -0
  71. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/prompt_management_openai.ipynb +0 -0
  72. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/sync_sample_call.py +0 -0
  73. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/examples/travel_agent/agents.py +0 -0
  74. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/__init__.py +0 -0
  75. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/_version.py +0 -0
  76. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/dataset.py +0 -0
  77. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/experiment.py +0 -0
  78. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/guard_executor.py +0 -0
  79. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/guardrails_manager.py +0 -0
  80. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/internal_api_completion.py +0 -0
  81. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/prompt_manager.py +0 -0
  82. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/proxy_call.py +0 -0
  83. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/ragaai_catalyst.py +0 -0
  84. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/redteaming.py +0 -0
  85. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/synthetic_data_generation.py +0 -0
  86. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/__init__.py +0 -0
  87. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/README.md +0 -0
  88. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/__init__.py +0 -0
  89. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/data/__init__.py +0 -0
  90. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/data/data_structure.py +0 -0
  91. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tests/FinancialAnalysisSystem.ipynb +0 -0
  92. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tests/GameActivityEventPlanner.ipynb +0 -0
  93. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tests/TravelPlanner.ipynb +0 -0
  94. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tests/__init__.py +0 -0
  95. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tests/ai_travel_agent.py +0 -0
  96. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tests/unique_decorator_test.py +0 -0
  97. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/__init__.py +0 -0
  98. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/langgraph_tracer.py +0 -0
  99. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/network_tracer.py +0 -0
  100. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/tracers/user_interaction_tracer.py +0 -0
  101. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/upload/__init__.py +0 -0
  102. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_agentic_traces.py +0 -0
  103. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_code.py +0 -0
  104. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/upload/upload_trace_metric.py +0 -0
  105. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/__init__.py +0 -0
  106. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/api_utils.py +0 -0
  107. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/create_dataset_schema.py +0 -0
  108. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/generic.py +0 -0
  109. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/get_user_trace_metrics.py +0 -0
  110. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/llm_utils.py +0 -0
  111. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/model_costs.json +0 -0
  112. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/span_attributes.py +0 -0
  113. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/supported_llm_provider.toml +0 -0
  114. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/system_monitor.py +0 -0
  115. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/trace_utils.py +0 -0
  116. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/agentic_tracing/utils/unique_decorator.py +0 -0
  117. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/exporters/__init__.py +0 -0
  118. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/exporters/file_span_exporter.py +0 -0
  119. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/exporters/raga_exporter.py +0 -0
  120. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/instrumentators/__init__.py +0 -0
  121. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/instrumentators/langchain.py +0 -0
  122. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/instrumentators/llamaindex.py +0 -0
  123. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/instrumentators/openai.py +0 -0
  124. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/llamaindex_callback.py +0 -0
  125. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/utils/__init__.py +0 -0
  126. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/utils/convert_langchain_callbacks_output.py +0 -0
  127. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/utils/langchain_tracer_extraction_logic.py +0 -0
  128. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/tracers/utils/utils.py +0 -0
  129. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst/utils.py +0 -0
  130. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst.egg-info/dependency_links.txt +0 -0
  131. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/ragaai_catalyst.egg-info/top_level.txt +0 -0
  132. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/requirements.txt +0 -0
  133. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/setup.cfg +0 -0
  134. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/autonomous_research_agent/.env.example +0 -0
  135. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/autonomous_research_agent/agents/base_agent.py +0 -0
  136. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/autonomous_research_agent/agents/coordinator.py +0 -0
  137. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/autonomous_research_agent/agents/discovery.py +0 -0
  138. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/autonomous_research_agent/agents/synthesis.py +0 -0
  139. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/autonomous_research_agent/research_script.py +0 -0
  140. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/autonomous_research_agent/utils/llm.py +0 -0
  141. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/test_configuration.py +0 -0
  142. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/test_dataset.py +0 -0
  143. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/test_evaluation.py +0 -0
  144. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/test_llm_providers.py +0 -0
  145. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/test_prompt_manager.py +0 -0
  146. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/test_redteaming.py +0 -0
  147. {ragaai_catalyst-2.1.5b24 → ragaai_catalyst-2.1.5b26}/test/test_catalyst/test_synthetic_data_generation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ragaai_catalyst
3
- Version: 2.1.5b24
3
+ Version: 2.1.5b26
4
4
  Summary: RAGA AI CATALYST
5
5
  Author-email: Kiran Scaria <kiran.scaria@raga.ai>, Kedar Gaikwad <kedar.gaikwad@raga.ai>, Dushyant Mahajan <dushyant.mahajan@raga.ai>, Siddhartha Kosti <siddhartha.kosti@raga.ai>, Ritika Goel <ritika.goel@raga.ai>, Vijay Chaurasia <vijay.chaurasia@raga.ai>
6
6
  Requires-Python: <3.13,>=3.9
@@ -28,7 +28,7 @@ Requires-Dist: Markdown>=3.7
28
28
  Requires-Dist: litellm==1.51.1
29
29
  Requires-Dist: tenacity==8.3.0
30
30
  Requires-Dist: tqdm>=4.66.5
31
- Requires-Dist: llama-index<0.11.0,>=0.10.0
31
+ Requires-Dist: llama-index>=0.10.0
32
32
  Requires-Dist: pyopenssl>=24.2.1
33
33
  Requires-Dist: psutil~=6.0.0
34
34
  Requires-Dist: py-cpuinfo~=9.0.0
@@ -49,6 +49,8 @@ Requires-Dist: flake8; extra == "dev"
49
49
 
50
50
  RagaAI Catalyst is a comprehensive platform designed to enhance the management and optimization of LLM projects. It offers a wide range of features, including project management, dataset management, evaluation management, trace management, prompt management, synthetic data generation, and guardrail management. These functionalities enable you to efficiently evaluate, and safeguard your LLM applications.
51
51
 
52
+ ![RagaAI Catalyst](docs/img/main.png)
53
+
52
54
  ## Table of Contents
53
55
 
54
56
  - [RagaAI Catalyst](#ragaai-catalyst)
@@ -110,6 +112,7 @@ catalyst.project_use_cases()
110
112
  projects = catalyst.list_projects()
111
113
  print(projects)
112
114
  ```
115
+ ![Projects](docs/img/projects_new.png)
113
116
 
114
117
  ### Dataset Management
115
118
  Manage datasets efficiently for your projects:
@@ -135,6 +138,7 @@ dataset_manager.create_from_csv(
135
138
  dataset_manager.get_schema_mapping()
136
139
 
137
140
  ```
141
+ ![Dataset](docs/img/dataset.png)
138
142
 
139
143
  For more detailed information on Dataset Management, including CSV schema handling and advanced usage, please refer to the [Dataset Management documentation](docs/dataset_management.md).
140
144
 
@@ -189,7 +193,7 @@ print("Experiment Status:", status)
189
193
  results = evaluation.get_results()
190
194
  print("Experiment Results:", results)
191
195
  ```
192
-
196
+ ![Evaluation](docs/img/evaluation.png)
193
197
 
194
198
 
195
199
  ### Trace Management
@@ -221,6 +225,7 @@ tracer.stop()
221
225
  # Get upload status
222
226
  tracer.get_upload_status()
223
227
  ```
228
+ ![Trace](docs/img/trace_comp.png)
224
229
 
225
230
 
226
231
  ### Prompt Management
@@ -394,6 +399,7 @@ llm_caller = 'litellm'
394
399
  executor([message],prompt_params,model_params,llm_caller)
395
400
 
396
401
  ```
402
+ ![Guardrails](docs/img/guardrails.png)
397
403
 
398
404
  ### Agentic Tracing
399
405
 
@@ -432,6 +438,7 @@ with tracer:
432
438
  # Agent execution code
433
439
  pass
434
440
  ```
441
+ ![Tracing](docs/img/last_main.png)
435
442
 
436
443
  ### Red-teaming
437
444
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  RagaAI Catalyst is a comprehensive platform designed to enhance the management and optimization of LLM projects. It offers a wide range of features, including project management, dataset management, evaluation management, trace management, prompt management, synthetic data generation, and guardrail management. These functionalities enable you to efficiently evaluate, and safeguard your LLM applications.
4
4
 
5
+ ![RagaAI Catalyst](docs/img/main.png)
6
+
5
7
  ## Table of Contents
6
8
 
7
9
  - [RagaAI Catalyst](#ragaai-catalyst)
@@ -63,6 +65,7 @@ catalyst.project_use_cases()
63
65
  projects = catalyst.list_projects()
64
66
  print(projects)
65
67
  ```
68
+ ![Projects](docs/img/projects_new.png)
66
69
 
67
70
  ### Dataset Management
68
71
  Manage datasets efficiently for your projects:
@@ -88,6 +91,7 @@ dataset_manager.create_from_csv(
88
91
  dataset_manager.get_schema_mapping()
89
92
 
90
93
  ```
94
+ ![Dataset](docs/img/dataset.png)
91
95
 
92
96
  For more detailed information on Dataset Management, including CSV schema handling and advanced usage, please refer to the [Dataset Management documentation](docs/dataset_management.md).
93
97
 
@@ -142,7 +146,7 @@ print("Experiment Status:", status)
142
146
  results = evaluation.get_results()
143
147
  print("Experiment Results:", results)
144
148
  ```
145
-
149
+ ![Evaluation](docs/img/evaluation.png)
146
150
 
147
151
 
148
152
  ### Trace Management
@@ -174,6 +178,7 @@ tracer.stop()
174
178
  # Get upload status
175
179
  tracer.get_upload_status()
176
180
  ```
181
+ ![Trace](docs/img/trace_comp.png)
177
182
 
178
183
 
179
184
  ### Prompt Management
@@ -347,6 +352,7 @@ llm_caller = 'litellm'
347
352
  executor([message],prompt_params,model_params,llm_caller)
348
353
 
349
354
  ```
355
+ ![Guardrails](docs/img/guardrails.png)
350
356
 
351
357
  ### Agentic Tracing
352
358
 
@@ -385,6 +391,7 @@ with tracer:
385
391
  # Agent execution code
386
392
  pass
387
393
  ```
394
+ ![Tracing](docs/img/last_main.png)
388
395
 
389
396
  ### Red-teaming
390
397
 
@@ -417,4 +424,4 @@ def model(df: pd.DataFrame):
417
424
 
418
425
 
419
426
  scan_df = rt.run_scan(model=model, evaluators=["llm"], save_report=True)
420
- ```
427
+ ```
@@ -0,0 +1,27 @@
1
+
2
+
3
+ import os
4
+ from dotenv import load_dotenv
5
+
6
+ from ragaai_catalyst import RagaAICatalyst, Tracer, init_tracing
7
+ import uuid
8
+ def initialize_tracing():
9
+ load_dotenv()
10
+ print(f"Access key: {os.getenv('RAGAAI_CATALYST_STAGING_ACCESS_KEY')}")
11
+ print(f"Secret key: {os.getenv('RAGAAI_CATALYST_STAGING_SECRET_KEY')}")
12
+ print(f"Base url: {os.getenv('RAGAAI_CATALYST_STAGING_BASE_URL')}")
13
+
14
+ catalyst = RagaAICatalyst(
15
+ access_key=os.getenv("RAGAAI_CATALYST_STAGING_ACCESS_KEY"),
16
+ secret_key=os.getenv("RAGAAI_CATALYST_STAGING_SECRET_KEY"),
17
+ base_url=os.getenv("RAGAAI_CATALYST_STAGING_BASE_URL"),
18
+ )
19
+
20
+ tracer = Tracer(
21
+ project_name="Execute_Metric_Test1",
22
+ dataset_name="travel_agent_dataset",
23
+ tracer_type="Agentic", # langchain, llamaindex, Agentic
24
+ )
25
+
26
+ init_tracing(catalyst=catalyst, tracer=tracer)
27
+ return tracer
@@ -1,3 +1,6 @@
1
+ import sys
2
+ sys.path.append('.')
3
+
1
4
  from dotenv import load_dotenv
2
5
  from tools import (
3
6
  llm_call,
@@ -112,4 +115,3 @@ def travel_agent():
112
115
  if __name__ == "__main__":
113
116
  with tracer:
114
117
  travel_agent()
115
-
@@ -26,6 +26,7 @@ def llm_call(prompt, max_tokens=512, model="gpt-4o-mini", name="default"):
26
26
  name="Hallucination",
27
27
  model="gpt-4o-mini",
28
28
  provider="openai",
29
+ lazy=True,
29
30
  display_name="Hallucination_display",
30
31
  mapping={
31
32
  'prompt': "goa to kashmir price",
@@ -8,8 +8,7 @@ description = "RAGA AI CATALYST"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.9,<3.13"
10
10
  # license = {file = "LICENSE"}
11
-
12
- version = "2.1.5.b24"
11
+ version = "2.1.5.b26"
13
12
  authors = [
14
13
  {name = "Kiran Scaria", email = "kiran.scaria@raga.ai"},
15
14
  {name = "Kedar Gaikwad", email = "kedar.gaikwad@raga.ai"},
@@ -42,7 +41,7 @@ dependencies = [
42
41
  "litellm==1.51.1",
43
42
  "tenacity==8.3.0",
44
43
  "tqdm>=4.66.5",
45
- "llama-index>=0.10.0,<0.11.0",
44
+ "llama-index>=0.10.0",
46
45
  "pyopenssl>=24.2.1",
47
46
  "psutil~=6.0.0",
48
47
  "py-cpuinfo~=9.0.0",
@@ -4,6 +4,7 @@ import pandas as pd
4
4
  import io
5
5
  from .ragaai_catalyst import RagaAICatalyst
6
6
  import logging
7
+ import json
7
8
 
8
9
  logger = logging.getLogger(__name__)
9
10
 
@@ -18,7 +19,7 @@ class Evaluation:
18
19
  self.project_name = project_name
19
20
  self.dataset_name = dataset_name
20
21
  self.base_url = f"{RagaAICatalyst.BASE_URL}"
21
- self.timeout = 10
22
+ self.timeout = 20
22
23
  self.jobId = None
23
24
  self.num_projects=99999
24
25
 
@@ -357,6 +358,52 @@ class Evaluation:
357
358
  except Exception as e:
358
359
  logger.error(f"An unexpected error occurred: {e}")
359
360
 
361
+ def append_metrics(self, display_name):
362
+ if not isinstance(display_name, str):
363
+ raise ValueError("display_name should be a string")
364
+
365
+ headers = {
366
+ "Authorization": f"Bearer {os.getenv('RAGAAI_CATALYST_TOKEN')}",
367
+ 'X-Project-Id': str(self.project_id),
368
+ 'Content-Type': 'application/json',
369
+ }
370
+
371
+ payload = json.dumps({
372
+ "datasetId": self.dataset_id,
373
+ "metricParams": [
374
+ {
375
+ "metricSpec": {
376
+ "displayName": display_name
377
+ }
378
+ }
379
+ ]
380
+ })
381
+
382
+ try:
383
+ response = requests.request(
384
+ "POST",
385
+ f'{self.base_url}/v2/llm/metric-evaluation-rerun',
386
+ headers=headers,
387
+ data=payload,
388
+ timeout=self.timeout)
389
+ if response.status_code == 400:
390
+ raise ValueError(response.json()["message"])
391
+ response.raise_for_status()
392
+ if response.json()["success"]:
393
+ print(response.json()["message"])
394
+ self.jobId = response.json()["data"]["jobId"]
395
+
396
+ except requests.exceptions.HTTPError as http_err:
397
+ logger.error(f"HTTP error occurred: {http_err}")
398
+ except requests.exceptions.ConnectionError as conn_err:
399
+ logger.error(f"Connection error occurred: {conn_err}")
400
+ except requests.exceptions.Timeout as timeout_err:
401
+ logger.error(f"Timeout error occurred: {timeout_err}")
402
+ except requests.exceptions.RequestException as req_err:
403
+ logger.error(f"An error occurred: {req_err}")
404
+ except Exception as e:
405
+ logger.error(f"An unexpected error occurred: {e}")
406
+
360
407
  def get_status(self):
361
408
  headers = {
362
409
  'Content-Type': 'application/json',
@@ -463,8 +510,11 @@ class Evaluation:
463
510
  df = pd.read_csv(io.StringIO(response_text))
464
511
 
465
512
  column_list = df.columns.to_list()
513
+ # Remove unwanted columns
466
514
  column_list = [col for col in column_list if not col.startswith('_')]
467
515
  column_list = [col for col in column_list if '.' not in col]
516
+ # Remove _claims_ columns
517
+ column_list = [col for col in column_list if '_claims_' not in col]
468
518
  return df[column_list]
469
519
  else:
470
520
  return pd.DataFrame()
@@ -106,48 +106,42 @@ class AgentTracerMixin:
106
106
  if gt is not None:
107
107
  span = self.span(name)
108
108
  span.add_gt(gt)
109
- # Set agent context before initializing
110
- component_id = str(uuid.uuid4())
111
- hash_id = top_level_hash_id
112
-
113
- # Store the component ID in the instance
114
- self._agent_component_id = component_id
115
-
116
- # Get parent agent ID if exists
117
- parent_agent_id = tracer.current_agent_id.get()
118
-
119
- # Create agent component
120
- agent_component = tracer.create_agent_component(
121
- component_id=component_id,
122
- hash_id=hash_id,
123
- name=name,
124
- agent_type=agent_type,
125
- version=version,
126
- capabilities=capabilities or [],
127
- start_time=datetime.now().astimezone().isoformat(),
128
- memory_used=0,
129
- input_data=tracer._sanitize_input(args, kwargs),
130
- output_data=None,
131
- children=[],
132
- parent_id=parent_agent_id,
133
- )
134
-
135
- # Store component for later updates
136
- if not hasattr(tracer, "_agent_components"):
137
- tracer._agent_components = {}
138
- tracer._agent_components[component_id] = agent_component
139
109
 
140
- # If this is a nested agent, add it to parent's children
141
- if parent_agent_id:
142
- parent_children = tracer.agent_children.get()
143
- parent_children.append(agent_component)
144
- tracer.agent_children.set(parent_children)
145
- else:
146
- # Only add to root components if no parent
147
- tracer.add_component(agent_component)
148
-
149
- # Call original __init__ with this agent as current
150
- token = tracer.current_agent_id.set(component_id)
110
+ if not hasattr(self, '_agent_component_id'):
111
+ component_id = str(uuid.uuid4())
112
+ self._agent_component_id = component_id
113
+
114
+ # Get parent agent ID if exists
115
+ parent_agent_id = tracer.current_agent_id.get()
116
+
117
+ agent_component = tracer.create_agent_component(
118
+ component_id=component_id,
119
+ hash_id=top_level_hash_id,
120
+ name=name,
121
+ agent_type=agent_type,
122
+ version=version,
123
+ capabilities=capabilities or [],
124
+ start_time=datetime.now().astimezone().isoformat(),
125
+ memory_used=0,
126
+ input_data=tracer._sanitize_input(args, kwargs),
127
+ output_data=None,
128
+ children=[],
129
+ parent_id=parent_agent_id,
130
+ )
131
+
132
+ if not hasattr(tracer, "_agent_components"):
133
+ tracer._agent_components = {}
134
+ tracer._agent_components[component_id] = agent_component
135
+
136
+ # For class agents, only add to parent's children if parent exists
137
+ if parent_agent_id and parent_agent_id in tracer._agent_components:
138
+ parent_component = tracer._agent_components[parent_agent_id]
139
+ if not hasattr(parent_component, "children"):
140
+ parent_component["children"] = []
141
+ if component_id not in parent_component["children"]:
142
+ parent_component["children"].append(component_id)
143
+
144
+ token = tracer.current_agent_id.set(self._agent_component_id)
151
145
  try:
152
146
  original_init(self, *args, **kwargs)
153
147
  finally:
@@ -160,7 +154,6 @@ class AgentTracerMixin:
160
154
  if callable(attr_value):
161
155
 
162
156
  def wrap_method(method):
163
- @self.file_tracker.trace_decorator
164
157
  @functools.wraps(method)
165
158
  def wrapped_method(self, *args, **kwargs):
166
159
  gt = kwargs.get("gt") if kwargs else None
@@ -225,15 +218,60 @@ class AgentTracerMixin:
225
218
  setattr(target, attr_name, wrap_method(attr_value))
226
219
 
227
220
  # Replace __init__ with wrapped version
221
+
228
222
  target.__init__ = wrapped_init
223
+
224
+ # Wrap all methods to maintain parent-child relationship
225
+ for attr_name, attr_value in target.__dict__.items():
226
+ if callable(attr_value) and not attr_name.startswith('__'):
227
+ original_method = attr_value
228
+
229
+ def create_wrapper(method):
230
+ @self.file_tracker.trace_decorator
231
+ @functools.wraps(method)
232
+ def method_wrapper(self, *args, **kwargs):
233
+ gt = kwargs.get("gt") if kwargs else None
234
+ if gt is not None:
235
+ span = tracer.span(name)
236
+ span.add_gt(gt)
237
+ # Use the class instance's agent ID as parent
238
+ parent_id = getattr(self, '_agent_component_id', None)
239
+ if parent_id:
240
+ if asyncio.iscoroutinefunction(method):
241
+ return tracer._trace_agent_execution(
242
+ method.__get__(self, type(self)),
243
+ name,
244
+ agent_type,
245
+ version,
246
+ capabilities,
247
+ top_level_hash_id,
248
+ *args,
249
+ **kwargs,
250
+ )
251
+ else:
252
+ return tracer._trace_sync_agent_execution(
253
+ method.__get__(self, type(self)),
254
+ name,
255
+ agent_type,
256
+ version,
257
+ capabilities,
258
+ top_level_hash_id,
259
+ *args,
260
+ **kwargs,
261
+ )
262
+ else:
263
+ return method(self, *args, **kwargs)
264
+ return method_wrapper
265
+
266
+ setattr(target, attr_name, create_wrapper(original_method))
267
+
229
268
  return target
230
269
  else:
231
- # For function decorators, use existing sync/async tracing
232
- is_async = asyncio.iscoroutinefunction(target)
233
- if is_async:
234
-
235
- async def wrapper(*args, **kwargs):
236
- return await self._trace_agent_execution(
270
+ # For non-class targets (e.g., functions), use existing function wrapping logic
271
+ @functools.wraps(target)
272
+ def wrapper(*args, **kwargs):
273
+ if asyncio.iscoroutinefunction(target):
274
+ return tracer._trace_agent_execution(
237
275
  target,
238
276
  name,
239
277
  agent_type,
@@ -243,12 +281,8 @@ class AgentTracerMixin:
243
281
  *args,
244
282
  **kwargs,
245
283
  )
246
-
247
- return wrapper
248
- else:
249
-
250
- def wrapper(*args, **kwargs):
251
- return self._trace_sync_agent_execution(
284
+ else:
285
+ return tracer._trace_sync_agent_execution(
252
286
  target,
253
287
  name,
254
288
  agent_type,
@@ -258,16 +292,13 @@ class AgentTracerMixin:
258
292
  *args,
259
293
  **kwargs,
260
294
  )
261
-
262
- return wrapper
295
+ return wrapper
263
296
 
264
297
  return decorator
265
298
 
266
299
  def _trace_sync_agent_execution(
267
- self, func, name, agent_type, version, capabilities, top_level_hash_id, *args, **kwargs
300
+ self, func, name, agent_type, version, capabilities, top_level_hash_id, *args, **kwargs
268
301
  ):
269
- hash_id = top_level_hash_id
270
-
271
302
  """Synchronous version of agent tracing"""
272
303
  if not self.is_active:
273
304
  return func(*args, **kwargs)
@@ -303,7 +334,7 @@ class AgentTracerMixin:
303
334
 
304
335
  try:
305
336
  # Execute the agent
306
- result = self.file_tracker.trace_wrapper(func)(*args, **kwargs)
337
+ result = func(*args, **kwargs)
307
338
 
308
339
  # Calculate resource usage
309
340
  end_memory = psutil.Process().memory_info().rss
@@ -318,7 +349,7 @@ class AgentTracerMixin:
318
349
  # Create agent component with children and parent if exists
319
350
  agent_component = self.create_agent_component(
320
351
  component_id=component_id,
321
- hash_id=hash_id,
352
+ hash_id=top_level_hash_id,
322
353
  name=name,
323
354
  agent_type=agent_type,
324
355
  version=version,
@@ -331,12 +362,17 @@ class AgentTracerMixin:
331
362
  parent_id=parent_agent_id,
332
363
  )
333
364
 
334
- # Add this component as a child to parent's children list
335
- parent_children.append(agent_component)
336
- self.agent_children.set(parent_children)
365
+ # Store component for updates
366
+ if not hasattr(self, "_agent_components"):
367
+ self._agent_components = {}
368
+ self._agent_components[component_id] = agent_component
337
369
 
338
- # Only add to root components if no parent
339
- if not parent_agent_id:
370
+ # Only add to hierarchy if this is a root component (no parent)
371
+ # or if the parent explicitly added it as a child
372
+ if parent_agent_id:
373
+ parent_children.append(agent_component)
374
+ self.agent_children.set(parent_children)
375
+ else:
340
376
  self.add_component(agent_component)
341
377
 
342
378
  return result
@@ -351,16 +387,10 @@ class AgentTracerMixin:
351
387
  # Get children even in case of error
352
388
  children = self.agent_children.get()
353
389
 
354
- # Set parent_id for all children
355
- for child in children:
356
- child["parent_id"] = component_id
357
-
358
- # End tracking network calls for this component
359
- self.end_component(component_id)
360
-
390
+ # Create error component
361
391
  agent_component = self.create_agent_component(
362
392
  component_id=component_id,
363
- hash_id=hash_id,
393
+ hash_id=top_level_hash_id,
364
394
  name=name,
365
395
  agent_type=agent_type,
366
396
  version=version,
@@ -373,16 +403,20 @@ class AgentTracerMixin:
373
403
  children=children,
374
404
  parent_id=parent_agent_id, # Add parent ID if exists
375
405
  )
376
- # If this is a nested agent, add it to parent's children
406
+
407
+ # Store component for updates
408
+ if not hasattr(self, "_agent_components"):
409
+ self._agent_components = {}
410
+ self._agent_components[component_id] = agent_component
411
+
412
+ # Only add to hierarchy if this is a root component (no parent)
413
+ # or if the parent explicitly added it as a child
377
414
  if parent_agent_id:
378
- parent_component = self._agent_components.get(parent_agent_id)
379
- if parent_component:
380
- if "children" not in parent_component["data"]:
381
- parent_component["data"]["children"] = []
382
- parent_component["data"]["children"].append(agent_component)
415
+ parent_children.append(agent_component)
416
+ self.agent_children.set(parent_children)
383
417
  else:
384
418
  # Only add to root components if no parent
385
- self.add_component(agent_component)
419
+ self.add_component(agent_component, is_error=True)
386
420
 
387
421
  raise
388
422
  finally:
@@ -424,7 +458,7 @@ class AgentTracerMixin:
424
458
 
425
459
  try:
426
460
  # Execute the agent
427
- result = await self.file_tracker.trace_wrapper(func)(*args, **kwargs)
461
+ result = await func(*args, **kwargs)
428
462
 
429
463
  # Calculate resource usage
430
464
  end_memory = psutil.Process().memory_info().rss
@@ -451,12 +485,17 @@ class AgentTracerMixin:
451
485
  parent_id=parent_agent_id,
452
486
  )
453
487
 
454
- # Add this component as a child to parent's children list
455
- parent_children.append(agent_component)
456
- self.agent_children.set(parent_children)
488
+ # Store component for updates
489
+ if not hasattr(self, "_agent_components"):
490
+ self._agent_components = {}
491
+ self._agent_components[component_id] = agent_component
457
492
 
458
- # Only add to root components if no parent
459
- if not parent_agent_id:
493
+ # Only add to hierarchy if this is a root component (no parent)
494
+ # or if the parent explicitly added it as a child
495
+ if parent_agent_id:
496
+ parent_children.append(agent_component)
497
+ self.agent_children.set(parent_children)
498
+ else:
460
499
  self.add_component(agent_component)
461
500
 
462
501
  return result
@@ -471,13 +510,7 @@ class AgentTracerMixin:
471
510
  # Get children even in case of error
472
511
  children = self.agent_children.get()
473
512
 
474
- # Set parent_id for all children
475
- for child in children:
476
- child["parent_id"] = component_id
477
-
478
- # End tracking network calls for this component
479
- self.end_component(component_id)
480
-
513
+ # Create error component
481
514
  agent_component = self.create_agent_component(
482
515
  component_id=component_id,
483
516
  hash_id=hash_id,
@@ -494,16 +527,19 @@ class AgentTracerMixin:
494
527
  parent_id=parent_agent_id, # Add parent ID if exists
495
528
  )
496
529
 
497
- # If this is a nested agent, add it to parent's children
530
+ # Store component for updates
531
+ if not hasattr(self, "_agent_components"):
532
+ self._agent_components = {}
533
+ self._agent_components[component_id] = agent_component
534
+
535
+ # Only add to hierarchy if this is a root component (no parent)
536
+ # or if the parent explicitly added it as a child
498
537
  if parent_agent_id:
499
- parent_component = self._agent_components.get(parent_agent_id)
500
- if parent_component:
501
- if "children" not in parent_component["data"]:
502
- parent_component["data"]["children"] = []
503
- parent_component["data"]["children"].append(agent_component)
538
+ parent_children.append(agent_component)
539
+ self.agent_children.set(parent_children)
504
540
  else:
505
541
  # Only add to root components if no parent
506
- self.add_component(agent_component)
542
+ self.add_component(agent_component, is_error=True)
507
543
 
508
544
  raise
509
545
  finally:
@@ -137,6 +137,7 @@ class BaseTracer:
137
137
  """Initialize a new trace"""
138
138
  self.tracking = True
139
139
  self.trace_id = str(uuid.uuid4())
140
+ self.file_tracker.trace_main_file()
140
141
  self.system_monitor = SystemMonitor(self.trace_id)
141
142
  threading.Thread(target=self._track_memory_usage).start()
142
143
  threading.Thread(target=self._track_cpu_usage).start()