@_vrsen/openswarm 0.1.0

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 (316) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +152 -0
  3. package/bin/openswarm.js +38 -0
  4. package/config.py +34 -0
  5. package/data_analyst_agent/.cursor/rules/data_analyst.mdc +43 -0
  6. package/data_analyst_agent/__init__.py +3 -0
  7. package/data_analyst_agent/__pycache__/__init__.cpython-312.pyc +0 -0
  8. package/data_analyst_agent/__pycache__/data_analyst_agent.cpython-312.pyc +0 -0
  9. package/data_analyst_agent/data_analyst_agent.py +45 -0
  10. package/data_analyst_agent/instructions.md +173 -0
  11. package/data_analyst_agent/test_files/test_file.csv +21 -0
  12. package/data_analyst_agent/tools/__init__.py +6 -0
  13. package/deep_research/__init__.py +1 -0
  14. package/deep_research/__pycache__/__init__.cpython-312.pyc +0 -0
  15. package/deep_research/__pycache__/deep_research.cpython-312.pyc +0 -0
  16. package/deep_research/deep_research.py +27 -0
  17. package/deep_research/instructions.md +104 -0
  18. package/deep_research/tools/__init__.py +1 -0
  19. package/docs_agent/__init__.py +3 -0
  20. package/docs_agent/__pycache__/__init__.cpython-312.pyc +0 -0
  21. package/docs_agent/__pycache__/docs_agent.cpython-312.pyc +0 -0
  22. package/docs_agent/docs_agent.py +61 -0
  23. package/docs_agent/instructions.md +418 -0
  24. package/docs_agent/tools/ConvertDocument.py +323 -0
  25. package/docs_agent/tools/CreateDocument.py +287 -0
  26. package/docs_agent/tools/ListDocuments.py +134 -0
  27. package/docs_agent/tools/ModifyDocument.py +247 -0
  28. package/docs_agent/tools/RestoreDocument.py +79 -0
  29. package/docs_agent/tools/ViewDocument.py +153 -0
  30. package/docs_agent/tools/__init__.py +1 -0
  31. package/docs_agent/tools/__pycache__/ConvertDocument.cpython-312.pyc +0 -0
  32. package/docs_agent/tools/__pycache__/CreateDocument.cpython-312.pyc +0 -0
  33. package/docs_agent/tools/__pycache__/ListDocuments.cpython-312.pyc +0 -0
  34. package/docs_agent/tools/__pycache__/ModifyDocument.cpython-312.pyc +0 -0
  35. package/docs_agent/tools/__pycache__/RestoreDocument.cpython-312.pyc +0 -0
  36. package/docs_agent/tools/__pycache__/ViewDocument.cpython-312.pyc +0 -0
  37. package/docs_agent/tools/__pycache__/__init__.cpython-312.pyc +0 -0
  38. package/docs_agent/tools/utils/__init__.py +1 -0
  39. package/docs_agent/tools/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  40. package/docs_agent/tools/utils/__pycache__/doc_file_utils.cpython-312.pyc +0 -0
  41. package/docs_agent/tools/utils/__pycache__/html_docx_blocks.cpython-312.pyc +0 -0
  42. package/docs_agent/tools/utils/__pycache__/html_docx_constants.cpython-312.pyc +0 -0
  43. package/docs_agent/tools/utils/__pycache__/html_docx_core.cpython-312.pyc +0 -0
  44. package/docs_agent/tools/utils/__pycache__/html_docx_css.cpython-312.pyc +0 -0
  45. package/docs_agent/tools/utils/__pycache__/html_docx_images.cpython-312.pyc +0 -0
  46. package/docs_agent/tools/utils/__pycache__/html_docx_page.cpython-312.pyc +0 -0
  47. package/docs_agent/tools/utils/__pycache__/html_docx_paragraphs.cpython-312.pyc +0 -0
  48. package/docs_agent/tools/utils/__pycache__/html_docx_playwright.cpython-312.pyc +0 -0
  49. package/docs_agent/tools/utils/__pycache__/html_docx_selectors.cpython-312.pyc +0 -0
  50. package/docs_agent/tools/utils/__pycache__/html_docx_shared.cpython-312.pyc +0 -0
  51. package/docs_agent/tools/utils/__pycache__/html_validation.cpython-312.pyc +0 -0
  52. package/docs_agent/tools/utils/doc_file_utils.py +29 -0
  53. package/docs_agent/tools/utils/html_docx_blocks.py +262 -0
  54. package/docs_agent/tools/utils/html_docx_constants.py +78 -0
  55. package/docs_agent/tools/utils/html_docx_core.py +138 -0
  56. package/docs_agent/tools/utils/html_docx_css.py +262 -0
  57. package/docs_agent/tools/utils/html_docx_images.py +293 -0
  58. package/docs_agent/tools/utils/html_docx_page.py +185 -0
  59. package/docs_agent/tools/utils/html_docx_paragraphs.py +342 -0
  60. package/docs_agent/tools/utils/html_docx_playwright.py +184 -0
  61. package/docs_agent/tools/utils/html_docx_selectors.py +196 -0
  62. package/docs_agent/tools/utils/html_docx_shared.py +23 -0
  63. package/docs_agent/tools/utils/html_docx_tables.py +942 -0
  64. package/docs_agent/tools/utils/html_validation.py +102 -0
  65. package/helpers.py +59 -0
  66. package/image_generation_agent/__init__.py +1 -0
  67. package/image_generation_agent/__pycache__/__init__.cpython-312.pyc +0 -0
  68. package/image_generation_agent/__pycache__/image_generation_agent.cpython-312.pyc +0 -0
  69. package/image_generation_agent/image_generation_agent.py +31 -0
  70. package/image_generation_agent/instructions.md +80 -0
  71. package/image_generation_agent/tools/CombineImages.py +211 -0
  72. package/image_generation_agent/tools/EditImages.py +200 -0
  73. package/image_generation_agent/tools/GenerateImages.py +184 -0
  74. package/image_generation_agent/tools/RemoveBackground.py +108 -0
  75. package/image_generation_agent/tools/__init__.py +2 -0
  76. package/image_generation_agent/tools/__pycache__/CombineImages.cpython-312.pyc +0 -0
  77. package/image_generation_agent/tools/__pycache__/EditImages.cpython-312.pyc +0 -0
  78. package/image_generation_agent/tools/__pycache__/GenerateImages.cpython-312.pyc +0 -0
  79. package/image_generation_agent/tools/__pycache__/RemoveBackground.cpython-312.pyc +0 -0
  80. package/image_generation_agent/tools/utils/__init__.py +2 -0
  81. package/image_generation_agent/tools/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  82. package/image_generation_agent/tools/utils/__pycache__/image_io.cpython-312.pyc +0 -0
  83. package/image_generation_agent/tools/utils/image_io.py +308 -0
  84. package/onboard.py +325 -0
  85. package/orchestrator/__init__.py +3 -0
  86. package/orchestrator/__pycache__/__init__.cpython-312.pyc +0 -0
  87. package/orchestrator/__pycache__/orchestrator.cpython-312.pyc +0 -0
  88. package/orchestrator/instructions.md +90 -0
  89. package/orchestrator/orchestrator.py +33 -0
  90. package/package.json +49 -0
  91. package/patches/__init__.py +1 -0
  92. package/patches/__pycache__/__init__.cpython-312.pyc +0 -0
  93. package/patches/__pycache__/patch_agency_swarm_dual_comms.cpython-312.pyc +0 -0
  94. package/patches/__pycache__/patch_file_attachment_refs.cpython-312.pyc +0 -0
  95. package/patches/__pycache__/patch_ipython_interpreter_composio.cpython-312.pyc +0 -0
  96. package/patches/dom-to-pptx+1.1.5.patch +133440 -0
  97. package/patches/patch_agency_swarm_dual_comms.py +199 -0
  98. package/patches/patch_file_attachment_refs.py +74 -0
  99. package/patches/patch_ipython_interpreter_composio.py +54 -0
  100. package/pyproject.toml +67 -0
  101. package/run.py +343 -0
  102. package/server.py +26 -0
  103. package/shared_instructions.md +119 -0
  104. package/shared_tools/CopyFile.py +68 -0
  105. package/shared_tools/ExecuteTool.py +184 -0
  106. package/shared_tools/FindTools.py +101 -0
  107. package/shared_tools/ManageConnections.py +43 -0
  108. package/shared_tools/SearchTools.py +44 -0
  109. package/shared_tools/__init__.py +7 -0
  110. package/shared_tools/__pycache__/CopyFile.cpython-312.pyc +0 -0
  111. package/shared_tools/__pycache__/ExecuteTool.cpython-312.pyc +0 -0
  112. package/shared_tools/__pycache__/FindTools.cpython-312.pyc +0 -0
  113. package/shared_tools/__pycache__/ManageConnections.cpython-312.pyc +0 -0
  114. package/shared_tools/__pycache__/SearchTools.cpython-312.pyc +0 -0
  115. package/shared_tools/__pycache__/__init__.cpython-312.pyc +0 -0
  116. package/slides_agent/.cursor/rules/slides-agent-workflow.mdc +9 -0
  117. package/slides_agent/__init__.py +1 -0
  118. package/slides_agent/__pycache__/__init__.cpython-312.pyc +0 -0
  119. package/slides_agent/__pycache__/slides_agent.cpython-312.pyc +0 -0
  120. package/slides_agent/instructions.md +298 -0
  121. package/slides_agent/pptx/SKILL.md +528 -0
  122. package/slides_agent/pptx/html2pptx.md +625 -0
  123. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  124. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  125. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  126. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  127. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  128. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  129. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  130. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  131. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  132. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  133. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  134. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  135. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  136. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  137. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  138. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  139. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  140. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  141. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  142. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  143. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  144. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  145. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  146. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  147. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  148. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  149. package/slides_agent/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  150. package/slides_agent/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  151. package/slides_agent/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  152. package/slides_agent/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  153. package/slides_agent/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  154. package/slides_agent/pptx/ooxml/schemas/mce/mc.xsd +75 -0
  155. package/slides_agent/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  156. package/slides_agent/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  157. package/slides_agent/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  158. package/slides_agent/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  159. package/slides_agent/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  160. package/slides_agent/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  161. package/slides_agent/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  162. package/slides_agent/pptx/ooxml/scripts/pack.py +169 -0
  163. package/slides_agent/pptx/ooxml/scripts/unpack.py +29 -0
  164. package/slides_agent/pptx/ooxml/scripts/validate.py +69 -0
  165. package/slides_agent/pptx/ooxml/scripts/validation/__init__.py +15 -0
  166. package/slides_agent/pptx/ooxml/scripts/validation/base.py +951 -0
  167. package/slides_agent/pptx/ooxml/scripts/validation/docx.py +274 -0
  168. package/slides_agent/pptx/ooxml/scripts/validation/pptx.py +315 -0
  169. package/slides_agent/pptx/ooxml/scripts/validation/redlining.py +279 -0
  170. package/slides_agent/pptx/ooxml.md +427 -0
  171. package/slides_agent/pptx/scripts/html2pptx.js +1092 -0
  172. package/slides_agent/pptx/scripts/inventory.py +1020 -0
  173. package/slides_agent/pptx/scripts/rearrange.py +231 -0
  174. package/slides_agent/pptx/scripts/replace.py +385 -0
  175. package/slides_agent/pptx/scripts/thumbnail.py +451 -0
  176. package/slides_agent/slides_agent.py +109 -0
  177. package/slides_agent/test_deck/_theme.css +92 -0
  178. package/slides_agent/test_deck/assets/placeholder.svg +11 -0
  179. package/slides_agent/test_deck/slide_01_title.html +10 -0
  180. package/slides_agent/test_deck/slide_02_image_split.html +23 -0
  181. package/slides_agent/test_deck/slide_03_kpi.html +21 -0
  182. package/slides_agent/tools/ApplyPptxTextReplacements.py +91 -0
  183. package/slides_agent/tools/BuildPptxFromHtmlSlides.py +221 -0
  184. package/slides_agent/tools/CheckSlide.py +218 -0
  185. package/slides_agent/tools/CheckSlideCanvasOverflow.py +221 -0
  186. package/slides_agent/tools/CreateImageMontage.py +261 -0
  187. package/slides_agent/tools/CreatePptxThumbnailGrid.py +168 -0
  188. package/slides_agent/tools/DeleteSlide.py +78 -0
  189. package/slides_agent/tools/DownloadImage.py +79 -0
  190. package/slides_agent/tools/EnsureRasterImage.py +157 -0
  191. package/slides_agent/tools/ExtractPptxTextInventory.py +104 -0
  192. package/slides_agent/tools/GenerateImage.py +189 -0
  193. package/slides_agent/tools/ImageSearch.py +127 -0
  194. package/slides_agent/tools/InsertNewSlides.py +393 -0
  195. package/slides_agent/tools/ManageTheme.py +112 -0
  196. package/slides_agent/tools/ModifySlide.py +563 -0
  197. package/slides_agent/tools/ReadSlide.py +26 -0
  198. package/slides_agent/tools/RearrangePptxSlidesFromTemplate.py +114 -0
  199. package/slides_agent/tools/RestoreSnapshot.py +89 -0
  200. package/slides_agent/tools/SlideScreenshot.py +66 -0
  201. package/slides_agent/tools/__init__.py +54 -0
  202. package/slides_agent/tools/__pycache__/ApplyPptxTextReplacements.cpython-312.pyc +0 -0
  203. package/slides_agent/tools/__pycache__/BuildPptxFromHtmlSlides.cpython-312.pyc +0 -0
  204. package/slides_agent/tools/__pycache__/CheckSlide.cpython-312.pyc +0 -0
  205. package/slides_agent/tools/__pycache__/CheckSlideCanvasOverflow.cpython-312.pyc +0 -0
  206. package/slides_agent/tools/__pycache__/CreateImageMontage.cpython-312.pyc +0 -0
  207. package/slides_agent/tools/__pycache__/CreatePptxThumbnailGrid.cpython-312.pyc +0 -0
  208. package/slides_agent/tools/__pycache__/DeleteSlide.cpython-312.pyc +0 -0
  209. package/slides_agent/tools/__pycache__/DownloadImage.cpython-312.pyc +0 -0
  210. package/slides_agent/tools/__pycache__/EnsureRasterImage.cpython-312.pyc +0 -0
  211. package/slides_agent/tools/__pycache__/ExtractPptxTextInventory.cpython-312.pyc +0 -0
  212. package/slides_agent/tools/__pycache__/GenerateImage.cpython-312.pyc +0 -0
  213. package/slides_agent/tools/__pycache__/ImageSearch.cpython-312.pyc +0 -0
  214. package/slides_agent/tools/__pycache__/InsertNewSlides.cpython-312.pyc +0 -0
  215. package/slides_agent/tools/__pycache__/ManageTheme.cpython-312.pyc +0 -0
  216. package/slides_agent/tools/__pycache__/ModifySlide.cpython-312.pyc +0 -0
  217. package/slides_agent/tools/__pycache__/ReadSlide.cpython-312.pyc +0 -0
  218. package/slides_agent/tools/__pycache__/RearrangePptxSlidesFromTemplate.cpython-312.pyc +0 -0
  219. package/slides_agent/tools/__pycache__/RestoreSnapshot.cpython-312.pyc +0 -0
  220. package/slides_agent/tools/__pycache__/SlideScreenshot.cpython-312.pyc +0 -0
  221. package/slides_agent/tools/__pycache__/__init__.cpython-312.pyc +0 -0
  222. package/slides_agent/tools/__pycache__/slide_file_utils.cpython-312.pyc +0 -0
  223. package/slides_agent/tools/__pycache__/slide_html_utils.cpython-312.pyc +0 -0
  224. package/slides_agent/tools/__pycache__/template_registry.cpython-312.pyc +0 -0
  225. package/slides_agent/tools/deck_utils.py +31 -0
  226. package/slides_agent/tools/html2pptx_runner.js +1183 -0
  227. package/slides_agent/tools/html_writer_instructions.md +149 -0
  228. package/slides_agent/tools/slide_file_utils.py +108 -0
  229. package/slides_agent/tools/slide_html_utils.py +354 -0
  230. package/slides_agent/tools/template_registry.py +55 -0
  231. package/swarm.py +82 -0
  232. package/video_generation_agent/__init__.py +1 -0
  233. package/video_generation_agent/__pycache__/__init__.cpython-312.pyc +0 -0
  234. package/video_generation_agent/__pycache__/video_generation_agent.cpython-312.pyc +0 -0
  235. package/video_generation_agent/instructions.md +178 -0
  236. package/video_generation_agent/tools/AddSubtitles.py +425 -0
  237. package/video_generation_agent/tools/CombineImages.py +166 -0
  238. package/video_generation_agent/tools/CombineVideos.py +113 -0
  239. package/video_generation_agent/tools/EditAudio.py +297 -0
  240. package/video_generation_agent/tools/EditImage.py +144 -0
  241. package/video_generation_agent/tools/EditVideoContent.py +369 -0
  242. package/video_generation_agent/tools/GenerateImage.py +133 -0
  243. package/video_generation_agent/tools/GenerateVideo.py +556 -0
  244. package/video_generation_agent/tools/TrimVideo.py +233 -0
  245. package/video_generation_agent/tools/__init__.py +1 -0
  246. package/video_generation_agent/tools/__pycache__/AddSubtitles.cpython-312.pyc +0 -0
  247. package/video_generation_agent/tools/__pycache__/CombineImages.cpython-312.pyc +0 -0
  248. package/video_generation_agent/tools/__pycache__/CombineVideos.cpython-312.pyc +0 -0
  249. package/video_generation_agent/tools/__pycache__/EditAudio.cpython-312.pyc +0 -0
  250. package/video_generation_agent/tools/__pycache__/EditImage.cpython-312.pyc +0 -0
  251. package/video_generation_agent/tools/__pycache__/EditVideoContent.cpython-312.pyc +0 -0
  252. package/video_generation_agent/tools/__pycache__/GenerateImage.cpython-312.pyc +0 -0
  253. package/video_generation_agent/tools/__pycache__/GenerateVideo.cpython-312.pyc +0 -0
  254. package/video_generation_agent/tools/__pycache__/TrimVideo.cpython-312.pyc +0 -0
  255. package/video_generation_agent/tools/utils/__init__.py +1 -0
  256. package/video_generation_agent/tools/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  257. package/video_generation_agent/tools/utils/__pycache__/image_utils.cpython-312.pyc +0 -0
  258. package/video_generation_agent/tools/utils/__pycache__/video_utils.cpython-312.pyc +0 -0
  259. package/video_generation_agent/tools/utils/image_utils.py +174 -0
  260. package/video_generation_agent/tools/utils/video_utils.py +522 -0
  261. package/video_generation_agent/video_generation_agent.py +26 -0
  262. package/virtual_assistant/__init__.py +1 -0
  263. package/virtual_assistant/__pycache__/__init__.cpython-312.pyc +0 -0
  264. package/virtual_assistant/__pycache__/virtual_assistant.cpython-312.pyc +0 -0
  265. package/virtual_assistant/instructions.md +206 -0
  266. package/virtual_assistant/tools/AddLabelToEmail.py +154 -0
  267. package/virtual_assistant/tools/CheckEventsForDate.py +218 -0
  268. package/virtual_assistant/tools/CheckUnreadSlackMessages.py +216 -0
  269. package/virtual_assistant/tools/CreateCalendarEvent.py +261 -0
  270. package/virtual_assistant/tools/DeleteCalendarEvent.py +137 -0
  271. package/virtual_assistant/tools/DeleteDraft.py +95 -0
  272. package/virtual_assistant/tools/DraftEmail.py +239 -0
  273. package/virtual_assistant/tools/EditFile.py +113 -0
  274. package/virtual_assistant/tools/FindEmails.py +330 -0
  275. package/virtual_assistant/tools/GetCurrentTime.py +69 -0
  276. package/virtual_assistant/tools/GetSlackUserInfo.py +117 -0
  277. package/virtual_assistant/tools/ListDirectory.py +113 -0
  278. package/virtual_assistant/tools/ListSkills.py +94 -0
  279. package/virtual_assistant/tools/ManageLabels.py +295 -0
  280. package/virtual_assistant/tools/ProductSearch.py +254 -0
  281. package/virtual_assistant/tools/ReadEmail.py +251 -0
  282. package/virtual_assistant/tools/ReadFile.py +108 -0
  283. package/virtual_assistant/tools/ReadSlackMessages.py +191 -0
  284. package/virtual_assistant/tools/RemoveLabelFromEmail.py +137 -0
  285. package/virtual_assistant/tools/RescheduleCalendarEvent.py +227 -0
  286. package/virtual_assistant/tools/ScholarSearch.py +216 -0
  287. package/virtual_assistant/tools/SendDraft.py +101 -0
  288. package/virtual_assistant/tools/SendSlackMessage.py +148 -0
  289. package/virtual_assistant/tools/WriteFile.py +95 -0
  290. package/virtual_assistant/tools/__init__.py +1 -0
  291. package/virtual_assistant/tools/__pycache__/AddLabelToEmail.cpython-312.pyc +0 -0
  292. package/virtual_assistant/tools/__pycache__/CheckEventsForDate.cpython-312.pyc +0 -0
  293. package/virtual_assistant/tools/__pycache__/CheckUnreadSlackMessages.cpython-312.pyc +0 -0
  294. package/virtual_assistant/tools/__pycache__/CreateCalendarEvent.cpython-312.pyc +0 -0
  295. package/virtual_assistant/tools/__pycache__/DeleteCalendarEvent.cpython-312.pyc +0 -0
  296. package/virtual_assistant/tools/__pycache__/DeleteDraft.cpython-312.pyc +0 -0
  297. package/virtual_assistant/tools/__pycache__/DraftEmail.cpython-312.pyc +0 -0
  298. package/virtual_assistant/tools/__pycache__/EditFile.cpython-312.pyc +0 -0
  299. package/virtual_assistant/tools/__pycache__/FindEmails.cpython-312.pyc +0 -0
  300. package/virtual_assistant/tools/__pycache__/GetCurrentTime.cpython-312.pyc +0 -0
  301. package/virtual_assistant/tools/__pycache__/GetSlackUserInfo.cpython-312.pyc +0 -0
  302. package/virtual_assistant/tools/__pycache__/ListDirectory.cpython-312.pyc +0 -0
  303. package/virtual_assistant/tools/__pycache__/ListSkills.cpython-312.pyc +0 -0
  304. package/virtual_assistant/tools/__pycache__/ManageLabels.cpython-312.pyc +0 -0
  305. package/virtual_assistant/tools/__pycache__/ProductSearch.cpython-312.pyc +0 -0
  306. package/virtual_assistant/tools/__pycache__/ReadEmail.cpython-312.pyc +0 -0
  307. package/virtual_assistant/tools/__pycache__/ReadFile.cpython-312.pyc +0 -0
  308. package/virtual_assistant/tools/__pycache__/ReadSlackMessages.cpython-312.pyc +0 -0
  309. package/virtual_assistant/tools/__pycache__/RemoveLabelFromEmail.cpython-312.pyc +0 -0
  310. package/virtual_assistant/tools/__pycache__/RescheduleCalendarEvent.cpython-312.pyc +0 -0
  311. package/virtual_assistant/tools/__pycache__/ScholarSearch.cpython-312.pyc +0 -0
  312. package/virtual_assistant/tools/__pycache__/SendDraft.cpython-312.pyc +0 -0
  313. package/virtual_assistant/tools/__pycache__/SendSlackMessage.cpython-312.pyc +0 -0
  314. package/virtual_assistant/tools/__pycache__/WriteFile.cpython-312.pyc +0 -0
  315. package/virtual_assistant/tools/__pycache__/__init__.cpython-312.pyc +0 -0
  316. package/virtual_assistant/virtual_assistant.py +52 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 VRSEN
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,152 @@
1
+ # OpenSwarm
2
+
3
+ OpenSwarm is an **open-source multi-agent AI team** you can run locally (terminal UI) or deploy as an API.
4
+
5
+ Instead of a single "do-everything" bot, OpenSwarm routes each request to the **right specialist agent** (research, data analysis, docs, slides, images, video, and a virtual assistant) and coordinates the result for you.
6
+
7
+ Built on [Agency Swarm](https://github.com/VRSEN/agency-swarm) and the [OpenAI Agents SDK](https://github.com/openai/openai-agents-python).
8
+
9
+ ---
10
+
11
+ ## What can I do with it?
12
+
13
+ Examples you can paste into the terminal UI:
14
+
15
+ - "Research the current competitive landscape for X, cite sources, and summarize in bullets."
16
+ - "Analyze `mnt/data.csv`, find anomalies, and produce a chart plus a short narrative."
17
+ - "Create a 6-slide pitch deck about X with a modern theme, then export to PPTX."
18
+ - "Draft a professional one-page memo about X and export to PDF."
19
+ - "Generate a hero image for my landing page, then create 3 variants."
20
+ - "Combine these clips, trim pauses, add captions, and export a final video."
21
+
22
+ OpenSwarm can also connect to external services (Gmail, Slack, GitHub, etc.) via Composio if you set the optional keys.
23
+
24
+ ---
25
+
26
+ ## Agent Roster
27
+
28
+ | Agent | What it does |
29
+ |---|---|
30
+ | **Orchestrator** | Routes every user request to the right specialist(s). Never answers directly — pure coordination. |
31
+ | **Virtual Assistant** | Handles everyday tasks: writing, scheduling, messaging, task management. Gains 10,000+ external integrations via [Composio](https://composio.dev) (Gmail, Slack, GitHub, HubSpot, and more). |
32
+ | **Deep Research** | Conducts comprehensive, evidence-based web research with citations and balanced analysis. |
33
+ | **Data Analyst** | Analyses structured data, builds charts, runs statistical models — all inside an isolated IPython kernel. |
34
+ | **Slides Agent** | Generates complete, visually polished HTML slide decks, then exports them to PPTX. |
35
+ | **Docs Agent** | Creates formatted Word documents and PDFs from outlines or raw content. |
36
+ | **Image Generation Agent** | Generates and edits images using Gemini 2.5 Flash Image / Gemini 3 Pro Image and fal.ai. |
37
+ | **Video Generation Agent** | Produces videos via Sora (OpenAI), Veo (Google), and Seedance (fal.ai); also edits and combines clips. |
38
+
39
+ ---
40
+
41
+ ## Prerequisites
42
+
43
+ | Requirement | Notes |
44
+ |---|---|
45
+ | Python | 3.10 or newer |
46
+ | Node.js | 20 or newer |
47
+
48
+ Everything else (Python packages, Node.js dependencies, Playwright / Chromium, LibreOffice, Poppler) is installed automatically on first run.
49
+
50
+ ---
51
+
52
+ ## Quick Start
53
+
54
+ ### Option A — Local install (interactive terminal)
55
+
56
+ ```bash
57
+ git clone https://github.com/VRSEN/openswarm.git
58
+ cd openswarm
59
+ python run.py
60
+ ```
61
+
62
+ On first run, a setup wizard walks you through choosing a provider and entering your API keys. Everything else (Python packages, Node.js dependencies, Playwright browser) installs automatically.
63
+
64
+ Once configured, `python run.py` drops you straight into the terminal UI. Outputs and generated files are written to `./mnt/`.
65
+
66
+ ---
67
+
68
+ ### Option B — Docker (API server; no system dependencies required)
69
+
70
+ Requires [Docker](https://docs.docker.com/get-docker/).
71
+
72
+ ```bash
73
+ git clone https://github.com/VRSEN/openswarm.git
74
+ cd openswarm
75
+ cp .env.example .env # fill in at least one provider key
76
+ docker-compose up --build
77
+ ```
78
+
79
+ The FastAPI server starts on `http://localhost:8080`.
80
+
81
+ ---
82
+
83
+ ## Running as an API
84
+
85
+ ```bash
86
+ python server.py # local install
87
+ # or
88
+ docker-compose up # Docker
89
+ ```
90
+
91
+ Starts a FastAPI server on port **8080**. The agency is exposed at `/open-swarm`.
92
+
93
+ ---
94
+
95
+ ## Configuration
96
+
97
+ ### Provider & model
98
+
99
+ Set your provider key and optionally override the default model in `.env`:
100
+
101
+ ```env
102
+ OPENAI_API_KEY=sk-...
103
+
104
+ # Optional: override the model used by all agents
105
+ DEFAULT_MODEL=gpt-4o
106
+ ```
107
+
108
+ The onboarding wizard sets these automatically. You can also edit `.env` directly at any time — see `.env.example` for all options.
109
+
110
+ ### Optional integrations
111
+
112
+ | Key(s) | Feature unlocked |
113
+ |---|---|
114
+ | `ANTHROPIC_API_KEY` | Claude models via LiteLLM |
115
+ | `COMPOSIO_API_KEY` + `COMPOSIO_USER_ID` | 10,000+ external integrations via Virtual Assistant |
116
+ | `SEARCH_API_KEY` | Web search, Scholar search, Product search ([searchapi.io](https://www.searchapi.io)) |
117
+ | `GOOGLE_API_KEY` | Gemini image generation/editing, Veo video generation |
118
+ | `FAL_KEY` | Seedance video generation, video editing, background removal |
119
+ | `PEXELS_API_KEY` | Pexels stock photo search (Slides Agent) |
120
+ | `PIXABAY_API_KEY` | Pixabay stock photo search (Slides Agent) |
121
+ | `UNSPLASH_ACCESS_KEY` | Unsplash stock photo search (Slides Agent) |
122
+
123
+ Tools that require a missing key raise a clear error at call time — the agent will tell you what to add.
124
+
125
+ ---
126
+
127
+ ## Adding a New Agent
128
+
129
+ 1. Create a new folder: `my_agent/`
130
+ 2. Add `my_agent.py` (Agent definition), `instructions.md`, and `tools/`
131
+ 3. Register the agent in `swarm.py` → `create_agency()`
132
+
133
+ See the [Agency Swarm docs](https://vrsen.github.io/agency-swarm/) for the full agent creation guide.
134
+
135
+ ---
136
+
137
+ ## Learn More
138
+
139
+ | Component | Library |
140
+ |---|---|
141
+ | Multi-agent framework | [Agency Swarm](https://github.com/VRSEN/agency-swarm) |
142
+ | LLM runtime | [OpenAI Agents SDK](https://github.com/openai/openai-agents-python) |
143
+ | External integrations | [Composio](https://composio.dev) |
144
+ | Multi-provider LLM routing | [LiteLLM](https://docs.litellm.ai) |
145
+ | API deployment | [FastAPI](https://fastapi.tiangolo.com) + Uvicorn |
146
+ | SaaS platform | [Agent Swarm](https://agentswarm.ai) |
147
+
148
+ ---
149
+
150
+ ## License
151
+
152
+ MIT — see [LICENSE](LICENSE).
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+ 'use strict'
3
+
4
+ const { spawnSync } = require('child_process')
5
+ const path = require('path')
6
+
7
+ // Locate run.py relative to this file (bin/openswarm.js -> ../run.py)
8
+ const runScript = path.join(__dirname, '..', 'run.py')
9
+
10
+ // Prefer python3, fall back to python (covers Windows where it's usually 'python')
11
+ const candidates = process.platform === 'win32'
12
+ ? ['python', 'python3', 'py']
13
+ : ['python3', 'python']
14
+
15
+ let python = null
16
+ for (const cmd of candidates) {
17
+ const probe = spawnSync(cmd, ['--version'], { stdio: 'pipe' })
18
+ if (probe.status === 0) {
19
+ python = cmd
20
+ break
21
+ }
22
+ }
23
+
24
+ if (!python) {
25
+ process.stderr.write(
26
+ 'openswarm: Python 3.10+ is required but was not found.\n' +
27
+ 'Install it from https://www.python.org/downloads/ and try again.\n'
28
+ )
29
+ process.exit(1)
30
+ }
31
+
32
+ const result = spawnSync(python, [runScript, ...process.argv.slice(2)], {
33
+ stdio: 'inherit',
34
+ cwd: process.cwd(),
35
+ env: process.env,
36
+ })
37
+
38
+ process.exit(result.status ?? 1)
package/config.py ADDED
@@ -0,0 +1,34 @@
1
+ """Shared model configuration helpers — read by all agents at startup."""
2
+ import os
3
+
4
+
5
+ def get_default_model(fallback: str = "gpt-5.2"):
6
+ """Return the configured default model for standard agents."""
7
+ model = os.getenv("DEFAULT_MODEL", fallback)
8
+ return _resolve(model)
9
+
10
+
11
+ def is_openai_provider() -> bool:
12
+ """Return True when the configured provider is OpenAI (not LiteLLM).
13
+
14
+ OpenAI model IDs never contain a slash (e.g. 'gpt-5.2', 'o3').
15
+ Any 'provider/model' string (e.g. 'anthropic/claude-sonnet-4-6',
16
+ 'litellm/gemini/gemini-3-flash') is treated as a LiteLLM-routed model.
17
+ """
18
+ return "/" not in os.getenv("DEFAULT_MODEL", "")
19
+
20
+
21
+ def _resolve(model: str):
22
+ """Route 'provider/model' strings through LitellmModel.
23
+
24
+ Handles both explicit 'litellm/<model>' and bare 'provider/model' forms.
25
+ OpenAI model IDs contain no slash, so they pass through unchanged.
26
+ """
27
+ if "/" not in model:
28
+ return model
29
+ bare = model[len("litellm/"):] if model.startswith("litellm/") else model
30
+ try:
31
+ from agency_swarm import LitellmModel # noqa: PLC0415
32
+ return LitellmModel(model=bare)
33
+ except ImportError:
34
+ return model
@@ -0,0 +1,43 @@
1
+ ---
2
+ description: Guidance for developing and modifying the Data Analyst agent
3
+ alwaysApply: false
4
+ ---
5
+ # Scope
6
+ - These rules describe how to build and refine `data_analyst_agent`.
7
+ - Keep edits limited to `data_analyst_agent/` unless cross-agent collaboration is required.
8
+ - Use this file to align tooling updates, visualization workflows, and testing practices with Agency Swarm conventions.
9
+
10
+ # Data Analyst Agent Purpose
11
+ - Analyze raw or collected data and clearly explain the findings.
12
+ - Generate charts, dashboards, and screenshots that highlight trends and support decision-making.
13
+ - Visualize the results and analyze them to reveal hidden trends.
14
+
15
+ # Design Workflow
16
+ 1. Review existing analytics and browser utilities under `tools/` and `tools/utils/`.
17
+ 2. Determine the format of the input data. If it's an online dashboard service - research api or methods of gathering data from it.
18
+ 3. Construct tools one by one inside the `tools/` folder that allow the agent to fetch data and visualize it. Use either `@function_tool` or `BaseTool`.
19
+ 4. Source credentials via `dotenv`; never demand API keys or secrets as runtime inputs.
20
+ 6. Ensure each tool returns image outputs as described in the OpenAI Agents documentation: <https://openai.github.io/openai-agents-python/tools/#returning-images-or-files-from-function-tools>.
21
+ 7. Test each tool individually before proceeding with agent development.
22
+ 8. After tools are ready, create the Data Analyst agent. Begin with `instructions.md`, outlining the role, goals, available tools, and usage guidelines.
23
+
24
+ # Customization Guidelines
25
+ Depending on needs, you may adjust:
26
+ 1. Data connectors - swap or extend integrations (databases, APIs, files) while preserving consistent return schemas.
27
+ 2. Visualization styles - introduce helper utilities for specialized chart types or interactive dashboards.
28
+ 3. Instruction emphasis - refine prompts to prioritize exploratory analysis, anomaly detection, or KPI reporting.
29
+
30
+ # Customization Examples
31
+ 1. Introducing a warehouse connector (e.g., Snowflake) -> a tool that authenticates via env vars and returns tidy tables for plotting.
32
+ 2. Supporting CSV uploads -> requires a parser tool that validates headers, infers types and plots the data.
33
+
34
+ # External Integrations
35
+ - Prefer established analytics libraries (`pandas`, `sqlalchemy`, `matplotlib`) and record version pins in `requirements.txt`.
36
+ - Update deployment artifacts (Dockerfile, README) when system dependencies (libjpeg, Chrome) change.
37
+ - Document storage locations for cached data, screenshots, or temp files to keep artifacts organized.
38
+
39
+ # Testing & Quality Gates
40
+ - Follow TDD: extend pytest suites (e.g., `tests/test_data_analyst_agent.py`) before modifying tool behaviour.
41
+ - Mock external services (databases, HTTP endpoints) to keep tests deterministic.
42
+ - Run `pytest -q` and `ruff check data_analyst_agent --fix` after changes; manually inspect sample visual outputs when chart logic shifts.
43
+
@@ -0,0 +1,3 @@
1
+ from .data_analyst_agent import create_data_analyst
2
+
3
+ __all__ = ["create_data_analyst"]
@@ -0,0 +1,45 @@
1
+ import os
2
+ from agency_swarm import Agent, ModelSettings
3
+ from openai.types.shared.reasoning import Reasoning
4
+ from agency_swarm.tools import (
5
+ WebSearchTool,
6
+ PersistentShellTool,
7
+ IPythonInterpreter,
8
+ LoadFileAttachment,
9
+ )
10
+ from shared_tools import ExecuteTool, FindTools, ManageConnections, SearchTools
11
+
12
+ from config import get_default_model, is_openai_provider
13
+
14
+ current_dir = os.path.dirname(os.path.abspath(__file__))
15
+ instructions_path = os.path.join(current_dir, "instructions.md")
16
+
17
+ def create_data_analyst() -> Agent:
18
+ return Agent(
19
+ name="Data Analyst",
20
+ description="Advanced data analytics agent that generates charts and provides actionable insights.",
21
+ instructions=instructions_path,
22
+ tools_folder=os.path.join(current_dir, "tools"),
23
+ model=get_default_model(),
24
+ tools=[
25
+ WebSearchTool(),
26
+ PersistentShellTool,
27
+ IPythonInterpreter,
28
+ LoadFileAttachment,
29
+ ExecuteTool,
30
+ FindTools,
31
+ ManageConnections,
32
+ SearchTools,
33
+ ],
34
+ model_settings=ModelSettings(
35
+ reasoning=Reasoning(effort="medium", summary="auto") if is_openai_provider() else None,
36
+ truncation="auto",
37
+ response_include=["web_search_call.action.sources"] if is_openai_provider() else None,
38
+ ),
39
+ conversation_starters=[
40
+ "Analyze this CSV file and show me the key trends.",
41
+ "Create a dashboard with charts from my sales data.",
42
+ "Connect to my Google Analytics and summarize last month's traffic.",
43
+ "Find hidden patterns in this dataset and visualize them.",
44
+ ],
45
+ )
@@ -0,0 +1,173 @@
1
+ # Your Role
2
+
3
+ You are **Data Analyst Agent**, an AI data analyst specialized in analyzing data and delivering concise, data driven actionable insights.
4
+
5
+ # Goals
6
+
7
+ - Your primary goal is to help the user achieve their business goals by analyzing their data from the available sources.
8
+
9
+ # Communication Flows
10
+
11
+ Handoff to Virtual Assistant for non-analytical tasks: calendar/email management, messaging, document handling, task coordination, or general research. Focus solely on data analysis.
12
+
13
+ # Tools Available
14
+
15
+ ## Core Analysis Tools
16
+
17
+ - `IPythonInterpreter`: Execute arbitrary Python to process, transform, and visualize data. The code you write can save output images (like charts, graphs, tables, etc.) locally as PNG files. State persists across multiple invocations in the same session (variables, imports, and context are retained). You can use this tool multiple times to perform complex data analysis and visualization tasks. The current environment has all libraries listed in `requirements.txt` installed, including:
18
+ - **Data Analysis:** `pandas`, `numpy`, `scipy`, `scikit`, `statsmodels`
19
+ - **Visualization:** `matplotlib`, `seaborn`, `plotly`
20
+ - **File Handling:** `openpyxl`, `xlrd`, `requests`, `python-dotenv`
21
+ - `PersistentShellTool`: Helper tool to execute commands on the local shell. Use this tool to perform any local file system operations, like reading credentials, or env variables, moving and renaming generated charts, etc.
22
+ - `WebSearchTool`: Search the web for API documentation or other information.
23
+ - `LoadFileAttachment`: Load local image files and return them to the model for visual analysis. Allows you to "see" the charts, graphs, tables, etc. that you have created with the `IPythonInterpreter` tool.
24
+
25
+ ## External System Connection Tools
26
+
27
+ - `ManageConnections`: Check which external platforms are currently connected and manage authentication.
28
+ - `FindTools`: Discovers available Composio tools by toolkit names or specific tool names.
29
+
30
+ # Primary Workflow
31
+
32
+ Below is your primary workflow. Follow it on every request:
33
+
34
+ ## 1. Clarify the Analysis Request
35
+
36
+ 1. **Identify the question** and confirm what metrics/KPIs need analysis
37
+ 2. **Determine the data source:**
38
+ - Is it a file upload (CSV, Excel)?
39
+ - Is it an external analytics platform (Google Analytics, Stripe, HubSpot, Salesforce, Google Sheets, etc.)?
40
+ - Is it a database connection?
41
+ 3. **Confirm the time period** and any filters/segments needed
42
+
43
+ ## 2. Connect to Data Sources and Fetch Data
44
+
45
+ ### Step 1: Check Connections and Authenticate
46
+
47
+ 1. Check existing connections: `ManageConnections(action="list")`
48
+ 2. If platform not connected:
49
+ - Find tools: `FindTools(toolkits=["PLATFORM_NAME"], include_args=False)`
50
+ - Generate auth link: `ManageConnections(action="connect", toolkit="PLATFORM_NAME")`
51
+ - Provide link to user and wait for authentication
52
+
53
+ ### Step 2: Fetch and Process with IPythonInterpreter
54
+
55
+ Use `IPythonInterpreter` to fetch data via Composio, then process and visualize:
56
+
57
+ ```python
58
+ import pandas as pd
59
+ import matplotlib.pyplot as plt
60
+ import os
61
+
62
+ # Fetch data from external system
63
+ # Composio and user_id are imported at runtime and do not require separate imports
64
+ result = composio.tools.execute(
65
+ "TOOL_NAME_HERE",
66
+ user_id=user_id,
67
+ arguments={"param1": "value1"},
68
+ dangerously_skip_version_check=True
69
+ )
70
+
71
+ # Transform to DataFrame
72
+ df = pd.DataFrame(result['data'])
73
+
74
+ # Process and analyze
75
+ df['date'] = pd.to_datetime(df['date'])
76
+ daily_revenue = df.groupby('date')['revenue'].sum()
77
+
78
+ # Create visualizations
79
+ os.makedirs('./mnt/outputs', exist_ok=True)
80
+ plt.figure(figsize=(12, 6))
81
+ daily_revenue.plot()
82
+ plt.title('Daily Revenue Trend')
83
+ plt.savefig('./mnt/outputs/revenue_trend.png')
84
+ print("Visualization: ./mnt/outputs/revenue_trend.png")
85
+ ```
86
+
87
+ ### Common Toolkits
88
+
89
+ - **GOOGLEANALYTICS**, **GOOGLESHEETS**: Web analytics and spreadsheet data
90
+ - **STRIPE**, **SHOPIFY**: Payment and e-commerce data
91
+ - **HUBSPOT**, **SALESFORCE**: CRM and sales data
92
+ - **AIRTABLE**, **GOOGLEBIGQUERY**: Database and data warehouse
93
+ - **MIXPANEL**, **AMPLITUDE**, **SEGMENT**: Product analytics
94
+ - **QUICKBOOKS**, **XERO**: Accounting data
95
+
96
+ ## 3. Analyze and Visualize
97
+
98
+ 1. **Process the data:**
99
+
100
+ - Clean and transform data using pandas
101
+ - Calculate key metrics and aggregations
102
+ - Identify trends, patterns, and anomalies
103
+
104
+ 2. **Create visualizations (if applicable):**
105
+ - Generate clear charts for timeseries or trend analysis
106
+ - Save to `./mnt/outputs/`
107
+ - Include the file path in your response after saving
108
+ - Analyze visualizations to identify trends and insights
109
+
110
+ ## 4. Deliver Insights
111
+
112
+ 1. Provide concise findings tied to the user's goals
113
+ 2. Quantify results and include visualizations (include file paths in your response)
114
+ 3. Call out assumptions, data limitations, and actionable recommendations
115
+
116
+ ## Best Practices
117
+
118
+ - Start with `ManageConnections` to check connections
119
+ - Save images to `./mnt/outputs/`
120
+ - Include file paths in your response for every final file you generate
121
+ - Cite data sources, time periods, and validate assumptions
122
+ - For local files, load directly with pandas
123
+
124
+ # Output Format
125
+
126
+ Use one of the two response formats below based on execution outcome.
127
+
128
+ ## If analysis completed successfully
129
+
130
+ Use the full analytical format:
131
+
132
+ **Scope and Sources**
133
+
134
+ - Data sources and APIs used
135
+ - Time period analyzed
136
+ - Metrics examined
137
+
138
+ **Key Findings**
139
+
140
+ - 3-5 most important insights (use simple language)
141
+ - Include relevant visualizations
142
+ - Quantify results where possible
143
+
144
+ **What to Do Next**
145
+
146
+ - Immediate actionable recommendations
147
+ - Prioritized by impact and ease
148
+
149
+ **Assumptions and Limits**
150
+
151
+ - Data quality notes
152
+ - Missing information or gaps
153
+ - Confidence level in findings
154
+
155
+ **Follow-Up Actions**
156
+
157
+ - Additional analysis needed
158
+ - Data to track going forward
159
+ - Questions to explore next
160
+
161
+ ## If analysis did not complete
162
+
163
+ Do not use the analytical sections above. Use a short operational response:
164
+
165
+ - **What failed:** specific file/tool step that failed
166
+ - **Why it failed:** exact error in plain language
167
+ - **What is needed:** concrete fix the user can provide (e.g., upload a readable file, correct format, reconnect a source)
168
+ - **Next attempt plan:** what you will run immediately after the fix
169
+
170
+ # Final Notes
171
+
172
+ - Never answer questions without analyzing data first.
173
+ - Any information that does not lead to action is a waste of time.
@@ -0,0 +1,21 @@
1
+ order_id,order_date,customer_id,customer_name,customer_email,country,channel,payment_method,order_status,coupon_code,item_id,item_name,category,quantity,unit_price,line_discount,line_subtotal,tax_rate,tax_amount,shipping_cost,order_total
2
+ 1001,2025-09-15,C001,John Doe,john.doe@example.com,US,web,credit_card,Completed,SAVE20,I100,Widget Pro,Electronics,1,199.99,20.00,179.99,0.07,12.60,5.99,219.96
3
+ 1001,2025-09-15,C001,John Doe,john.doe@example.com,US,web,credit_card,Completed,SAVE20,I200,USB Cable,Accessories,2,9.99,0.00,19.98,0.07,1.40,5.99,219.96
4
+ 1002,2025-09-16,C002,Jane Smith,jane.smith@example.co.uk,UK,mobile,paypal,Completed,,I210,Backpack,Accessories,2,25.00,5.00,45.00,0.20,9.00,3.50,71.90
5
+ 1002,2025-09-16,C002,Jane Smith,jane.smith@example.co.uk,UK,mobile,paypal,Completed,,I220,Coffee Mug,Home,1,12.00,0.00,12.00,0.20,2.40,3.50,71.90
6
+ 1003,2025-09-17,C003,Hans Müller,hans.mueller@example.de,DE,web,credit_card,Completed,,I230,Wireless Mouse,Electronics,1,29.99,0.00,29.99,0.19,5.70,4.99,94.22
7
+ 1003,2025-09-17,C003,Hans Müller,hans.mueller@example.de,DE,web,credit_card,Completed,,I240,Mechanical Keyboard,Electronics,1,49.99,5.00,44.99,0.19,8.55,4.99,94.22
8
+ 1004,2025-09-18,C004,Chloe Nguyen,chloe.nguyen@example.com,AU,web,apple_pay,Completed,FREESHIP,I250,Yoga Mat,Sports,1,35.00,0.00,35.00,0.10,3.50,0.00,71.50
9
+ 1004,2025-09-18,C004,Chloe Nguyen,chloe.nguyen@example.com,AU,web,apple_pay,Completed,FREESHIP,I260,Water Bottle,Accessories,2,15.00,0.00,30.00,0.10,3.00,0.00,71.50
10
+ 1005,2025-09-18,C005,Sora Tanaka,sora.tanaka@example.jp,JP,mobile,bank_transfer,Processing,,I270,Noise Cancelling Headphones,Electronics,1,120.00,10.00,110.00,0.10,11.00,7.00,155.50
11
+ 1005,2025-09-18,C005,Sora Tanaka,sora.tanaka@example.jp,JP,mobile,bank_transfer,Processing,,I280,Carry Case,Accessories,1,25.00,0.00,25.00,0.10,2.50,7.00,155.50
12
+ 1006,2025-09-19,C006,Arjun Mehta,arjun.mehta@example.in,IN,mobile,credit_card,Completed,NEWUSER5,I290,Graphic T-shirt,Apparel,2,14.00,3.00,25.00,0.18,4.50,2.00,78.70
13
+ 1006,2025-09-19,C006,Arjun Mehta,arjun.mehta@example.in,IN,mobile,credit_card,Completed,NEWUSER5,I300,Jeans,Apparel,1,40.00,0.00,40.00,0.18,7.20,2.00,78.70
14
+ 1007,2025-09-20,C007,Ana Souza,ana.souza@example.com,BR,web,credit_card,Completed,,I310,Blender,Home,1,80.00,0.00,80.00,0.17,13.60,8.00,136.70
15
+ 1007,2025-09-20,C007,Ana Souza,ana.souza@example.com,BR,web,credit_card,Completed,,I320,Knife Set,Home,1,35.00,5.00,30.00,0.17,5.10,8.00,136.70
16
+ 1008,2025-09-21,C008,Ava Thompson,ava.thompson@example.ca,CA,marketplace,paypal,Completed,,I330,Paperback Book,Stationery,3,10.00,0.00,30.00,0.13,3.90,0.00,33.90
17
+ 1009,2025-09-21,C009,Luc Martin,luc.martin@example.fr,FR,web,credit_card,Refunded,AUTUMN15,I340,Perfume,Beauty,1,60.00,0.00,60.00,0.20,12.00,6.50,114.50
18
+ 1009,2025-09-21,C009,Luc Martin,luc.martin@example.fr,FR,web,credit_card,Refunded,AUTUMN15,I350,Body Lotion,Beauty,2,18.00,6.00,30.00,0.20,6.00,6.50,114.50
19
+ 1010,2025-09-22,C010,Thabo Nkosi,thabo.nkosi@example.za,ZA,mobile,apple_pay,Shipped,,I360,Sneakers,Footwear,1,85.00,10.00,75.00,0.15,11.25,5.00,108.50
20
+ 1010,2025-09-22,C010,Thabo Nkosi,thabo.nkosi@example.za,ZA,mobile,apple_pay,Shipped,,I370,Crew Socks,Footwear,5,3.00,0.00,15.00,0.15,2.25,5.00,108.50
21
+ 1011,2025-09-23,C011,Mia Johnson,mia.johnson@example.com,US,web,credit_card,Completed,,I380,Online Course,Digital,1,99.00,0.00,99.00,0.00,0.00,0.00,99.00
@@ -0,0 +1,6 @@
1
+ from .IPythonInterpreter import IPythonInterpreter
2
+ from .load_images import load_images
3
+ from .LocalShellTool import LocalShellTool
4
+
5
+ __all__ = ["IPythonInterpreter", "load_images", "LocalShellTool"]
6
+
@@ -0,0 +1 @@
1
+ from .deep_research import create_deep_research
@@ -0,0 +1,27 @@
1
+ from agency_swarm import Agent, ModelSettings
2
+ from agency_swarm.tools import WebSearchTool, IPythonInterpreter
3
+ from openai.types.shared import Reasoning
4
+ from virtual_assistant.tools.ScholarSearch import ScholarSearch
5
+
6
+ from config import get_default_model, is_openai_provider
7
+
8
+
9
+ def create_deep_research() -> Agent:
10
+ return Agent(
11
+ name="Deep Research Agent",
12
+ description="Comprehensive deep research agent that conducts thorough research on any topic.",
13
+ instructions="./instructions.md",
14
+ files_folder="./files",
15
+ tools=[WebSearchTool(), ScholarSearch, IPythonInterpreter],
16
+ model=get_default_model(),
17
+ model_settings=ModelSettings(
18
+ reasoning=Reasoning(effort="high", summary="auto") if is_openai_provider() else None,
19
+ response_include=["web_search_call.action.sources"] if is_openai_provider() else None,
20
+ ),
21
+ conversation_starters=[
22
+ "Research the latest trends in renewable energy for 2026.",
23
+ "Give me a comprehensive analysis of the AI agent market landscape.",
24
+ "Find recent academic papers on large language model reasoning.",
25
+ "Compare the top 5 project management tools with pros and cons.",
26
+ ],
27
+ )