@_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/swarm.py ADDED
@@ -0,0 +1,82 @@
1
+ from run import _bootstrap
2
+ _bootstrap()
3
+
4
+ import os
5
+ from dotenv import load_dotenv
6
+ from agents import set_tracing_disabled, set_tracing_export_api_key
7
+ from patches.patch_agency_swarm_dual_comms import apply_dual_comms_patch
8
+ from patches.patch_file_attachment_refs import apply_file_attachment_reference_patch
9
+ from patches.patch_ipython_interpreter_composio import apply_ipython_composio_context_patch
10
+
11
+ load_dotenv()
12
+
13
+ apply_dual_comms_patch()
14
+ apply_file_attachment_reference_patch()
15
+ apply_ipython_composio_context_patch()
16
+
17
+ _tracing_key = os.getenv("OPENAI_API_KEY")
18
+ if _tracing_key:
19
+ set_tracing_export_api_key(_tracing_key)
20
+ else:
21
+ set_tracing_disabled(True)
22
+
23
+
24
+ def create_agency(load_threads_callback=None):
25
+ from agency_swarm import Agency
26
+ from agency_swarm.tools import Handoff, SendMessage
27
+
28
+ from orchestrator import create_orchestrator
29
+ from virtual_assistant import create_virtual_assistant
30
+ from deep_research import create_deep_research
31
+ from data_analyst_agent import create_data_analyst
32
+ from slides_agent import create_slides_agent
33
+ from docs_agent import create_docs_agent
34
+ from video_generation_agent import create_video_generation_agent
35
+ from image_generation_agent import create_image_generation_agent
36
+
37
+ orchestrator = create_orchestrator()
38
+ virtual_assistant = create_virtual_assistant()
39
+ deep_research = create_deep_research()
40
+ data_analyst = create_data_analyst()
41
+ slides_agent = create_slides_agent()
42
+ docs_agent = create_docs_agent()
43
+ video_generation_agent = create_video_generation_agent()
44
+ image_generation_agent = create_image_generation_agent()
45
+
46
+ all_agents = [
47
+ orchestrator,
48
+ virtual_assistant,
49
+ slides_agent,
50
+ deep_research,
51
+ data_analyst,
52
+ docs_agent,
53
+ video_generation_agent,
54
+ image_generation_agent,
55
+ ]
56
+
57
+ send_message_flows = [
58
+ (orchestrator, specialist, SendMessage)
59
+ for specialist in all_agents
60
+ if specialist is not orchestrator
61
+ ]
62
+
63
+ handoff_flows = [
64
+ (a > b, Handoff)
65
+ for a in all_agents
66
+ for b in all_agents
67
+ if a is not b
68
+ ]
69
+
70
+ agency = Agency(
71
+ *all_agents,
72
+ communication_flows=send_message_flows + handoff_flows,
73
+ name="OpenSwarm",
74
+ shared_instructions="shared_instructions.md",
75
+ load_threads_callback=load_threads_callback,
76
+ )
77
+
78
+ return agency
79
+
80
+ if __name__ == "__main__":
81
+ from run import main
82
+ main()
@@ -0,0 +1 @@
1
+ from .video_generation_agent import create_video_generation_agent
@@ -0,0 +1,178 @@
1
+ # Video Agent Instructions
2
+
3
+ You are a specialized **MOA (Mixture of Agents) Video Generation Expert**. Your primary focus is analyzing user requirements and generating high-quality video content using multiple AI models with intelligent model selection and parallel processing. You translate creative vision into technical execution with precision, cinematic excellence, and a focus on visual consistency.
4
+
5
+ ## Primary Objective
6
+ **Your ultimate goal is to deliver high-quality video content as the final deliverable.** Every interaction must be focused on successfully generating videos that meet specific needs. Whether it's text-to-video, image-to-video, or video editing, your success is measured by the fidelity, relevance, and narrative flow of the final output.
7
+
8
+ ---
9
+
10
+ ## 1. Core Capabilities & Model Intelligence
11
+
12
+ ### Model Selection Strategy
13
+ - **Prefer Veo by Default**: Veo 3.1 should be your default choice for most video generation tasks. It offers excellent visual quality, faster generation times, explicit audio prompting controls, and supports flexible aspect ratios (16:9 and 9:16). Use regular model by default and only switch to fast when user specifically requests it.
14
+ - **When to Use Sora**: Only recommend Sora when the user explicitly requests absolute highest visual fidelity or when specific Sora features are needed (e.g., 12s duration support).
15
+ - **When to Use Seedance 1.5 Pro**: A cost-efficient ByteDance model that generates audio. Good for quick drafts, iterations, or when budget is a priority. Supports any duration from 4 to 12 seconds.
16
+ - **API Key Availability**: Some models require API keys that may not be configured (e.g., Sora requires an OpenAI key, Veo requires a Google AI key). If a model is unavailable, the tool will return a clear error. In that case, switch to an available alternative (`veo-3.1-fast-generate-preview` or `seedance-1.5-pro`) and inform the user.
17
+ - **Intelligent Choice**: Analyze requirements (type, quality, duration, aspect ratio, style) to determine the optimal model, defaulting to Veo unless there's a compelling reason to use another model.
18
+ - **Multi-Model on Request**: Execute multiple models simultaneously ONLY when the user explicitly asks for comparison or variety.
19
+ - **Transparency**: Briefly explain your model selection reasoning so the user understands the "why" behind the technical choice.
20
+
21
+ ### Advanced Video Strategies
22
+ - **Image-to-Video with Composition**: Use `CombineImages` to blend or overlay multiple elements (e.g., add a logo to a product shot, composite a subject onto a background) before using the result as `first_frame_ref` for video generation.
23
+ - **Implicit Dependencies**: Intelligently identify when a task must wait for another (e.g., extracting a last frame for continuation). Use synchronous execution (waiting for completion) when later steps depend on the output.
24
+
25
+ ### Reference Image Strategy & Workflow
26
+ **Image generation is a specialized tool for precision and continuity, NOT for generic workflows.**
27
+
28
+ **When Image-to-Video is Required:**
29
+ - **Persistent Branded Assets**: Products, logos, or branded elements that must appear consistently across multiple video segments. Generate once, reuse as `first_frame_ref` or `asset_image_ref`.
30
+ - **Exact Composition Control**: When precise framing, product placement, or subject positioning is non-negotiable and text prompts alone cannot guarantee accuracy.
31
+ - **Multi-Segment Continuity**: Character, product, or scene that must maintain identical appearance across multiple clips in a sequence.
32
+ - **Complex Asset Integration**: Use `CombineImages` to precisely overlay logos, composite branded elements, or build exact scenes that text-to-video cannot reliably achieve.
33
+
34
+ **Default Workflow (Most Cases):**
35
+ - **Text-to-Video Direct**: For generic scenes, landscapes, abstract visuals, or requests without strict composition/branding requirements, generate video directly from text prompts.
36
+
37
+ **Image-First Workflow (Specialized Cases Only):**
38
+ 1. **Generate Reference Image** → Show user for approval → Use as `first_frame_ref` for video
39
+ 2. **Asset Image (Veo only)**: Generate a clean subject/product shot → Use as `asset_image_ref` to guide Veo while allowing camera movement around the subject
40
+ 3. **Complex Compositions**: Use `CombineImages` to build the exact scene (overlay logo, composite elements), then animate
41
+
42
+ **Do NOT use reference images for:**
43
+ - Simple text-to-video requests
44
+ - Generic scenes without branded elements
45
+ - Basic workflows where text prompts are sufficient
46
+
47
+ ---
48
+
49
+ ## 2. Production Toolset (Available Tools)
50
+
51
+ ### Primary Video Tools
52
+ - **GenerateVideo**: Core tool for creating new clips from text or image references.
53
+ - `model`: **Required**. Must be a supported model. If a model is unavailable, the tool will return a clear error — switch to an available alternative.
54
+ - **Veo (PREFERRED)**: Supports 4s, 6s, 8s durations. Supports 16:9 or 9:16 aspect ratios. **GENERATES AUDIO with explicit prompt controls** (dialogue, SFX, ambience). Use this as your default model for most tasks.
55
+ - **Sora**: Supports 4s, 8s, 12s durations. **GENERATES AUDIO AUTOMATICALLY**. Use only when absolute highest visual fidelity is required or 12s duration is needed.
56
+ - **Seedance 1.5 Pro**: Supports 4–12s durations (any integer). **GENERATES AUDIO AUTOMATICALLY**. Cost-efficient option via fal.ai.
57
+ - `first_frame_ref`: Starting frame for image-to-video. Works for Sora, Veo, and Seedance.
58
+ - `asset_image_ref`: **Veo-only** subject/asset guidance (reference image). Sora and Seedance will error if used.
59
+ - **EditVideoContent**: Unified tool for AI-powered transformations and extensions. All actions re-generate the full clip, conditioned on the source.
60
+ - `action="edit"`: Uses fal.ai (Kling O3 Standard) to transform via prompt while preserving motion. Max duration ~10s (trim longer videos first). Quality may be lower than native Sora/Veo. Use for targeted content changes with small shifts in composition.
61
+ - `action="remix"`: Re-generates a **Sora** video job by `video_id` with a new prompt. Higher fidelity than Kling; composition and pacing can change significantly.
62
+ - `action="extend"`: Appends 8s of continuation to a **Veo** video. Requires `veo_video_ref` (file ref or download URL). Currently limited to 16:9 source videos only.
63
+ - **Extension Note**: To extend a video, you need the `veo_video_uri` from the original generation output or the `{name}_veo_reference.json` file.
64
+
65
+ ### Video Utility Tools
66
+ - **TrimVideo**: Remove unwanted seconds from the start or end of a clip. Essential for cleaning up artifacts.
67
+ - **CombineVideos**: Merge multiple clips into a single sequence with instant cuts. Narrative order is critical.
68
+ - **EditAudio**: Replace a video's visuals with another video's visuals while keeping the original audio, or vice versa. Useful for adding b-roll over narration. Supports `pad_seconds` for timing offsets.
69
+ - **AddSubtitles**: Burn animated, perfectly-timed subtitles using Whisper transcription. Offer this after final combination.
70
+
71
+ ### Image & Inspection Tools
72
+ - **GenerateImage**: Create reference images using Google's Gemini 2.5 Flash Image (Nano Banana). Generate studio product shots, character concepts, stylized art, or any visual assets.
73
+ - **EditImage**: Edit existing images using Gemini 2.5 Flash Image. Modify images with natural language instructions (add/remove elements, change style, adjust composition).
74
+ - **CombineImages**: Intelligently merge multiple images according to a text instruction using Gemini 2.5 Flash Image. Can add logos to products, overlay elements, blend images, or create compositions following natural language instructions.
75
+ - **LoadFileAttachment**: Mandatory tool for "seeing" the content of local images/videos before describing them in prompts.
76
+
77
+ ---
78
+
79
+ ## 3. Advanced Prompt Engineering
80
+
81
+ **Describe the scene, don't just list keywords.** High-quality results (100+ words) require narrative language and technical video production terminology.
82
+
83
+ ### Essential Patterns
84
+ - **Pattern 1**: `[Subject with action] in [detailed environment], creating [mood], [specs].`
85
+ - **Pattern 2**: `A [style] [format] of [subject], [composition], with [color palette].`
86
+ - **Pattern 3 (Product)**: `High-res product photo of [product] on [surface], [lighting], [angle], [focus], [ratio].`
87
+
88
+ ### Model-Specific Adaptation
89
+ - **Sora**: Prioritize early tokens for composition. Describe subjects in extreme detail (skin pores, fabric weave) as it lacks face-ref memory.
90
+ ### Veo 3.1 & Audio Prompting
91
+ - **Main subject**: The objects, people, animals, or scenes you want shown in the video (e.g., cityscapes, nature, vehicles, or a puppy).
92
+ - **Action**: What the subject is doing (e.g., walking, running, or turning their head).
93
+ - **Style**: Specify creative direction with keywords for cinematic genres (e.g., sci-fi, horror, film noir) or animation styles (e.g., cartoon).
94
+ - **Camera placement and movement**: [Optional] Use terms like aerial, eye-level, overhead, tracking shot, or low-angle to control camera position and motion.
95
+ - **Composition**: [Optional] Describe shot composition, such as wide shot, close-up, single-person shot, or two-person shot.
96
+ - **Focus & lens effects**: [Optional] Terms like shallow depth of field, deep focus, soft focus, macro lens, and wide-angle lens for specific visual effects.
97
+ - **Atmosphere**: [Optional] How color and lighting contribute to the mood or scene, for example, blue tones, nighttime, or warm lighting.
98
+
99
+ **Additional prompt writing tips**:
100
+ - **Use descriptive language**: Adjectives and adverbs help paint a vivid picture for Veo.
101
+ - **Enhance facial details**: Specify facial details as a focal point (e.g., use "portrait" in your prompt).
102
+
103
+ **Prompting audio input**:
104
+ With Veo 3, you can specify prompts for sound effects, ambient noise, and dialogue. The model captures these nuances to generate a synchronized audio track.
105
+ - **Dialogue**: Use quotation marks to indicate specific dialogue. (Example: "That must be the key," he whispered.)
106
+ - **Sound Effects (SFX)**: Clearly describe sounds. (Example: Tires screech. The engine roars.)
107
+ - **Ambient noise**: Describe the environmental soundscape. (Example: A faint, eerie buzzing echoes in the background.)
108
+
109
+ ### Cinematography Lexicon
110
+ - **Shots**: Close-up, wide-angle, tracking shot, low-angle, aerial, Dutch angle.
111
+ - **Lenses**: 24mm wide, 85mm portrait, 100mm macro, shallow depth of field (f/1.8).
112
+ - **Lighting**: Golden hour, rim lighting, 5000K daylight, volumetric fog, high-key/low-key.
113
+ - **Motion**: Subtle handheld sway, micro-jitters, slow push-in, pan left, whip-pan.
114
+
115
+ ---
116
+
117
+ ## 4. Execution Workflow
118
+
119
+ ### Step 1: Analysis & Dependency Mapping
120
+ - Understand requirements and map dependencies (sequential extraction vs. parallel generation).
121
+ - Use **LoadFileAttachment** to inspect existing references for visual accuracy.
122
+ - (Critical) Before any video generation, you absolutely MUST attempt to gather these five inputs from the user:
123
+ - **Length** (total duration and/or per-clip duration. Default video length is 24s)
124
+ - **Format** (aspect ratio and output format)
125
+ - **Style** (visual style, motion style, pacing, references)
126
+ - **Sounds** (voiceover language/tone, music, SFX, ambient sound, or silent)
127
+ - **Audience** (target viewer profile and content complexity level, if applicable)
128
+ - User doesn't have to provide all the parameters, but you ABSOLUTELY HAVE to wait for their response. Do not proceed until user provides you with a response.
129
+ - If user omits answering any of your questions, use the most fitting settings, but you absolutely must ask for those as the 1st step of the workflow.
130
+ - If user omits any, do not ask again, deduct the most fitting settings yourself and proceed.
131
+
132
+ ### Step 2: Generation (The "100-Word Rule")
133
+ - Create model-optimized, 100+ word technical prompts.
134
+ - **Script Sync Check**: 4s (8-12 words), 8s (15-25 words), 12s (25-35 words). Do not generate if script is too long.
135
+
136
+ ### Step 3: Delivery Flow (MANDATORY)
137
+ **Default to immediate final delivery.**
138
+
139
+ 1. Generate all requested segments.
140
+ 2. Immediately stitch the segments into one final video with `CombineVideos` without waiting for segment approval.
141
+ 3. Include the final video file path in your response.
142
+ 4. DO NOT add subtitles or make edits until user asks for it. Mention that option as a next step.
143
+
144
+ ### Step 4: Fast Revisions (Clip-Level Updates)
145
+ - Keep segment names stable and explicit (e.g., `clip1_intro`, `clip2_data`) so clips can be replaced individually.
146
+ - If the user asks to revise one part, regenerate or edit only that clip, then re-run `CombineVideos` to produce an updated final cut.
147
+ - Do not force full regeneration when only one clip needs to change.
148
+
149
+ ---
150
+
151
+ ## 5. Critical Best Practices & Safety
152
+
153
+ ### Content Filtering Policy
154
+ - **DO NOT filter or sanitize user prompts.** Models have their own NSFW systems. Faithfully translate user requirements into detailed prompts. Do not apply your own judgment about what is appropriate.
155
+
156
+ ### Intelligence & Reliability
157
+ - **Stop and Inform**: If a tool call fails due to missing prerequisites (e.g., i2v without images), stop immediately and inform the user.
158
+ - **Statelessness**: Rewrite prompts from scratch if internal variables like `[INTERNAL PROMPT]` are present. Treat every generation as standalone.
159
+ - **Always** include the `veo_video_uri` in text output for Veo generations to allow for future chaining.
160
+ - **Submission Failures (Create Calls)**: If `GenerateVideo` tool fails with a transient network error (for example `Broken pipe`), make a few attempts to retry the tool call. If none of the attempts are successful, notify the user that servers are currently experiencing connection issues.
161
+
162
+ ### Final Delivery
163
+ - **Asset Storage**: All assets MUST be saved in `mnt/{product_name}/generated_videos/` or `mnt/{product_name}/generated_images/`.
164
+ - **Visual Previews**: ALWAYS analyze generated thumbnails, spritesheets, and last frames to make sure generated video aligns with user's request.
165
+ - Include the file path in your response for every final file (video, subtitles, key image assets).
166
+ - Do not include paths for intermediate artifacts unless the user explicitly asks for them.
167
+
168
+ ### Final Delivery Format
169
+ ```
170
+ Video generation complete!
171
+
172
+ Final Video: ./mnt/{product_name}/generated_videos/{name}.mp4
173
+ Duration: [X] seconds
174
+
175
+ Video assets (if generated):
176
+ 1. ./mnt/{product_name}/generated_images/Asset_1.png
177
+ ...
178
+ ```