quantalogic 0.80__tar.gz → 0.93__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 (224) hide show
  1. quantalogic-0.93/PKG-INFO +475 -0
  2. quantalogic-0.93/README.md +412 -0
  3. {quantalogic-0.80 → quantalogic-0.93}/pyproject.toml +13 -4
  4. quantalogic-0.93/quantalogic/flow/__init__.py +22 -0
  5. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/main.py +11 -6
  6. quantalogic-0.93/quantalogic/tools/tool.py +8 -0
  7. quantalogic-0.80/PKG-INFO +0 -900
  8. quantalogic-0.80/README.md +0 -843
  9. quantalogic-0.80/quantalogic/codeact/TODO.md +0 -14
  10. quantalogic-0.80/quantalogic/codeact/__init__.py +0 -0
  11. quantalogic-0.80/quantalogic/codeact/agent.py +0 -478
  12. quantalogic-0.80/quantalogic/codeact/cli.py +0 -50
  13. quantalogic-0.80/quantalogic/codeact/cli_commands/__init__.py +0 -0
  14. quantalogic-0.80/quantalogic/codeact/cli_commands/create_toolbox.py +0 -45
  15. quantalogic-0.80/quantalogic/codeact/cli_commands/install_toolbox.py +0 -20
  16. quantalogic-0.80/quantalogic/codeact/cli_commands/list_executor.py +0 -15
  17. quantalogic-0.80/quantalogic/codeact/cli_commands/list_reasoners.py +0 -15
  18. quantalogic-0.80/quantalogic/codeact/cli_commands/list_toolboxes.py +0 -47
  19. quantalogic-0.80/quantalogic/codeact/cli_commands/task.py +0 -215
  20. quantalogic-0.80/quantalogic/codeact/cli_commands/tool_info.py +0 -24
  21. quantalogic-0.80/quantalogic/codeact/cli_commands/uninstall_toolbox.py +0 -43
  22. quantalogic-0.80/quantalogic/codeact/config.yaml +0 -21
  23. quantalogic-0.80/quantalogic/codeact/constants.py +0 -9
  24. quantalogic-0.80/quantalogic/codeact/events.py +0 -85
  25. quantalogic-0.80/quantalogic/codeact/examples/README.md +0 -342
  26. quantalogic-0.80/quantalogic/codeact/examples/agent_sample.yaml +0 -29
  27. quantalogic-0.80/quantalogic/codeact/executor.py +0 -186
  28. quantalogic-0.80/quantalogic/codeact/history_manager.py +0 -94
  29. quantalogic-0.80/quantalogic/codeact/llm_util.py +0 -57
  30. quantalogic-0.80/quantalogic/codeact/plugin_manager.py +0 -92
  31. quantalogic-0.80/quantalogic/codeact/prompts/error_format.j2 +0 -11
  32. quantalogic-0.80/quantalogic/codeact/prompts/generate_action.j2 +0 -77
  33. quantalogic-0.80/quantalogic/codeact/prompts/generate_program.j2 +0 -52
  34. quantalogic-0.80/quantalogic/codeact/prompts/response_format.j2 +0 -11
  35. quantalogic-0.80/quantalogic/codeact/react_agent.py +0 -318
  36. quantalogic-0.80/quantalogic/codeact/reasoner.py +0 -185
  37. quantalogic-0.80/quantalogic/codeact/templates/toolbox/README.md.j2 +0 -10
  38. quantalogic-0.80/quantalogic/codeact/templates/toolbox/pyproject.toml.j2 +0 -16
  39. quantalogic-0.80/quantalogic/codeact/templates/toolbox/tools.py.j2 +0 -6
  40. quantalogic-0.80/quantalogic/codeact/templates.py +0 -7
  41. quantalogic-0.80/quantalogic/codeact/tools_manager.py +0 -258
  42. quantalogic-0.80/quantalogic/codeact/utils.py +0 -62
  43. quantalogic-0.80/quantalogic/codeact/xml_utils.py +0 -126
  44. quantalogic-0.80/quantalogic/flow/__init__.py +0 -40
  45. quantalogic-0.80/quantalogic/flow/flow.py +0 -1070
  46. quantalogic-0.80/quantalogic/flow/flow_extractor.py +0 -783
  47. quantalogic-0.80/quantalogic/flow/flow_generator.py +0 -322
  48. quantalogic-0.80/quantalogic/flow/flow_manager.py +0 -676
  49. quantalogic-0.80/quantalogic/flow/flow_manager_schema.py +0 -287
  50. quantalogic-0.80/quantalogic/flow/flow_mermaid.py +0 -365
  51. quantalogic-0.80/quantalogic/flow/flow_validator.py +0 -479
  52. quantalogic-0.80/quantalogic/flow/flow_yaml.linkedin.md +0 -31
  53. quantalogic-0.80/quantalogic/flow/flow_yaml.md +0 -767
  54. quantalogic-0.80/quantalogic/flow/templates/prompt_check_inventory.j2 +0 -1
  55. quantalogic-0.80/quantalogic/flow/templates/system_check_inventory.j2 +0 -1
  56. quantalogic-0.80/quantalogic/tools/tool.py +0 -922
  57. {quantalogic-0.80 → quantalogic-0.93}/LICENSE +0 -0
  58. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/__init__.py +0 -0
  59. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/agent.py +0 -0
  60. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/agent_config.py +0 -0
  61. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/agent_factory.py +0 -0
  62. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/coding_agent.py +0 -0
  63. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/config.py +0 -0
  64. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/console_print_events.py +0 -0
  65. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/console_print_token.py +0 -0
  66. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/create_custom_agent.py +0 -0
  67. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/docs_cli.py +0 -0
  68. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/event_emitter.py +0 -0
  69. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/generative_model.py +0 -0
  70. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/get_model_info.py +0 -0
  71. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/interactive_text_editor.py +0 -0
  72. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/memory.py +0 -0
  73. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/model_info.py +0 -0
  74. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/model_info_list.py +0 -0
  75. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/model_info_litellm.py +0 -0
  76. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/model_names.py +0 -0
  77. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/chat_system_prompt.j2 +0 -0
  78. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/code_2_system_prompt.j2 +0 -0
  79. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/code_system_prompt.j2 +0 -0
  80. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/doc_system_prompt.j2 +0 -0
  81. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/legal_2_system_prompt.j2 +0 -0
  82. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/legal_system_prompt.j2 +0 -0
  83. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/memory_compaction_prompt.j2 +0 -0
  84. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/observation_response_format.j2 +0 -0
  85. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/repeated_tool_call_error.j2 +0 -0
  86. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/system_prompt.j2 +0 -0
  87. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/task_prompt.j2 +0 -0
  88. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/task_summary_prompt.j2 +0 -0
  89. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/tools_prompt.j2 +0 -0
  90. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts/variables_prompt.j2 +0 -0
  91. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/prompts.py +0 -0
  92. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/quantlitellm.py +0 -0
  93. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/search_agent.py +0 -0
  94. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/server/__init__.py +0 -0
  95. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/server/agent_server.py +0 -0
  96. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/server/models.py +0 -0
  97. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/server/routes.py +0 -0
  98. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/server/state.py +0 -0
  99. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/server/static/js/event_visualizer.js +0 -0
  100. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/server/static/js/quantalogic.js +0 -0
  101. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/server/templates/index.html +0 -0
  102. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/task_file_reader.py +0 -0
  103. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/task_runner.py +0 -0
  104. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tool_manager.py +0 -0
  105. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/__init__.py +0 -0
  106. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/action_gen.py +0 -0
  107. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/action_gen_safe.py +0 -0
  108. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/agent_tool.py +0 -0
  109. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/composio/__init__.py +0 -0
  110. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/composio/composio.py +0 -0
  111. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/database/__init__.py +0 -0
  112. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/database/generate_database_report_tool.py +0 -0
  113. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/database/sql_query_tool_advanced.py +0 -0
  114. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/document_tools/__init__.py +0 -0
  115. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/document_tools/markdown_to_docx_tool.py +0 -0
  116. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/document_tools/markdown_to_epub_tool.py +0 -0
  117. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/document_tools/markdown_to_html_tool.py +0 -0
  118. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/document_tools/markdown_to_ipynb_tool.py +0 -0
  119. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/document_tools/markdown_to_latex_tool.py +0 -0
  120. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/document_tools/markdown_to_pdf_tool.py +0 -0
  121. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/document_tools/markdown_to_pptx_tool.py +0 -0
  122. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/download_http_file_tool.py +0 -0
  123. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/duckduckgo_search_tool.py +0 -0
  124. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/edit_whole_content_tool.py +0 -0
  125. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/elixir_tool.py +0 -0
  126. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/execute_bash_command_tool.py +0 -0
  127. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/file_tracker_tool.py +0 -0
  128. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/__init__.py +0 -0
  129. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/alpha_vantage_tool.py +0 -0
  130. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/ccxt_tool.py +0 -0
  131. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/finance_llm_tool.py +0 -0
  132. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/google_finance.py +0 -0
  133. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/market_intelligence_tool.py +0 -0
  134. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/technical_analysis_tool.py +0 -0
  135. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/tradingview_tool.py +0 -0
  136. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/finance/yahoo_finance.py +0 -0
  137. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/git/__init__.py +0 -0
  138. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/git/bitbucket_clone_repo_tool.py +0 -0
  139. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/git/bitbucket_operations_tool.py +0 -0
  140. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/git/clone_repo_tool.py +0 -0
  141. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/git/git_operations_tool.py +0 -0
  142. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/google_packages/__init__.py +0 -0
  143. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/google_packages/google_news_tool.py +0 -0
  144. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/grep_app_tool.py +0 -0
  145. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/image_generation/__init__.py +0 -0
  146. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/image_generation/dalle_e.py +0 -0
  147. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/input_question_tool.py +0 -0
  148. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/jinja_tool.py +0 -0
  149. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/__init__.py +0 -0
  150. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/c_handler.py +0 -0
  151. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/cpp_handler.py +0 -0
  152. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/go_handler.py +0 -0
  153. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/java_handler.py +0 -0
  154. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/javascript_handler.py +0 -0
  155. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/python_handler.py +0 -0
  156. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/rust_handler.py +0 -0
  157. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/scala_handler.py +0 -0
  158. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/language_handlers/typescript_handler.py +0 -0
  159. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/list_directory_tool.py +0 -0
  160. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/llm_tool.py +0 -0
  161. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/llm_vision_tool.py +0 -0
  162. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/markitdown_tool.py +0 -0
  163. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/nasa_packages/__init__.py +0 -0
  164. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/nasa_packages/models.py +0 -0
  165. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/nasa_packages/nasa_apod_tool.py +0 -0
  166. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/nasa_packages/nasa_neows_tool.py +0 -0
  167. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/nasa_packages/services.py +0 -0
  168. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/nodejs_tool.py +0 -0
  169. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/presentation_tools/__init__.py +0 -0
  170. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/presentation_tools/presentation_llm_tool.py +0 -0
  171. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/product_hunt/__init__.py +0 -0
  172. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/product_hunt/product_hunt_tool.py +0 -0
  173. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/product_hunt/services.py +0 -0
  174. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/python_tool.py +0 -0
  175. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/rag_tool/__init__.py +0 -0
  176. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/rag_tool/document_rag_sources_.py +0 -0
  177. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/rag_tool/ocr_pdf_markdown.py +0 -0
  178. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/read_file_block_tool.py +0 -0
  179. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/read_file_tool.py +0 -0
  180. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/read_html_tool.py +0 -0
  181. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/replace_in_file_tool.py +0 -0
  182. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/ripgrep_tool.py +0 -0
  183. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/safe_python_interpreter_tool.py +0 -0
  184. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/search_definition_names_tool.py +0 -0
  185. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/sequence_tool.py +0 -0
  186. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/serpapi_search_tool.py +0 -0
  187. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/sql_query_tool.py +0 -0
  188. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/task_complete_tool.py +0 -0
  189. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/terminal_capture_tool.py +0 -0
  190. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/unified_diff_tool.py +0 -0
  191. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utilities/__init__.py +0 -0
  192. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utilities/csv_processor_tool.py +0 -0
  193. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utilities/download_file_tool.py +0 -0
  194. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utilities/llm_tool.py +0 -0
  195. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utilities/mermaid_validator_tool.py +0 -0
  196. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utilities/selenium_tool.py +0 -0
  197. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utilities/vscode_tool.py +0 -0
  198. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utils/__init__.py +0 -0
  199. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utils/create_sample_database.py +0 -0
  200. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/utils/generate_database_report.py +0 -0
  201. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/web_navigation/__init__.py +0 -0
  202. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/web_navigation/web_tool.py +0 -0
  203. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/wikipedia_search_tool.py +0 -0
  204. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/tools/write_file_tool.py +0 -0
  205. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/__init__.py +0 -0
  206. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/ask_user_validation.py +0 -0
  207. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/async_utils.py +0 -0
  208. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/check_version.py +0 -0
  209. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/download_http_file.py +0 -0
  210. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/get_all_models.py +0 -0
  211. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/get_coding_environment.py +0 -0
  212. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/get_environment.py +0 -0
  213. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/get_quantalogic_rules_content.py +0 -0
  214. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/git_ls.py +0 -0
  215. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/lm_studio_model_info.py +0 -0
  216. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/read_file.py +0 -0
  217. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/read_http_text_content.py +0 -0
  218. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/test_python_interpreter.py +0 -0
  219. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/utils/xml_utility.py +0 -0
  220. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/version.py +0 -0
  221. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/version_check.py +0 -0
  222. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/welcome_message.py +0 -0
  223. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/xml_parser.py +0 -0
  224. {quantalogic-0.80 → quantalogic-0.93}/quantalogic/xml_tool_parser.py +0 -0
@@ -0,0 +1,475 @@
1
+ Metadata-Version: 2.3
2
+ Name: quantalogic
3
+ Version: 0.93
4
+ Summary: QuantaLogic ReAct Agents
5
+ License: MIT
6
+ Author: Raphaël MANSUY
7
+ Author-email: raphael.mansuy@gmail.com
8
+ Requires-Python: >=3.10,<4.0
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Dist: aiofiles (>=24.1.0,<25.0.0)
16
+ Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0)
17
+ Requires-Dist: boto3 (>=1.34.0,<2.0.0)
18
+ Requires-Dist: botocore (>=1.29.123,<2.0.0)
19
+ Requires-Dist: click (>=8.1.8,<9.0.0)
20
+ Requires-Dist: duckduckgo-search (>=7.2.1,<8.0.0)
21
+ Requires-Dist: faker (>=36.1.1,<37.0.0)
22
+ Requires-Dist: fuzzywuzzy (>=0.18.0,<0.19.0)
23
+ Requires-Dist: google-search-results (>=2.4.2,<3.0.0)
24
+ Requires-Dist: html2text (>=2024.2.26,<2025.0.0)
25
+ Requires-Dist: instructor (>=1.7.2,<2.0.0)
26
+ Requires-Dist: jinja2 (>=3.1.5,<4.0.0)
27
+ Requires-Dist: litellm (>=1.63.14,<2.0.0)
28
+ Requires-Dist: loguru (>=0.7.3,<0.8.0)
29
+ Requires-Dist: markdownify (>=0.14.1,<0.15.0)
30
+ Requires-Dist: markitdown (>=0.0.1a3,<0.0.2)
31
+ Requires-Dist: networkx (>=3.2.1,<4.0.0)
32
+ Requires-Dist: openai (>=1.68.0,<2.0.0)
33
+ Requires-Dist: pathspec (>=0.12.1,<0.13.0)
34
+ Requires-Dist: prompt-toolkit (>=3.0.48,<4.0.0)
35
+ Requires-Dist: psutil (>=7.0.0,<8.0.0)
36
+ Requires-Dist: pydantic (>=2.10.4,<3.0.0)
37
+ Requires-Dist: pytest-asyncio (>=0.25.3,<0.26.0)
38
+ Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
39
+ Requires-Dist: quantalogic-flow (>=0.6.2,<0.7.0)
40
+ Requires-Dist: quantalogic-pythonbox (>=0.9.11)
41
+ Requires-Dist: quantalogic-toolbox (>=0.8.0)
42
+ Requires-Dist: requests (>=2.32.3,<3.0.0)
43
+ Requires-Dist: rich (>=13.9.4,<14.0.0)
44
+ Requires-Dist: serpapi (>=0.1.5,<0.2.0)
45
+ Requires-Dist: sqlalchemy (>=2.0.25,<3.0.0)
46
+ Requires-Dist: tenacity (>=9.0.0,<10.0.0)
47
+ Requires-Dist: tree-sitter (>=0.23.2,<0.24.0)
48
+ Requires-Dist: tree-sitter-c (>=0.23.4,<0.24.0)
49
+ Requires-Dist: tree-sitter-cpp (>=0.23.4,<0.24.0)
50
+ Requires-Dist: tree-sitter-go (>=0.23.4,<0.24.0)
51
+ Requires-Dist: tree-sitter-java (>=0.23.5,<0.24.0)
52
+ Requires-Dist: tree-sitter-javascript (>=0.23.1,<0.24.0)
53
+ Requires-Dist: tree-sitter-python (>=0.23.6,<0.24.0)
54
+ Requires-Dist: tree-sitter-rust (>=0.23.2,<0.24.0)
55
+ Requires-Dist: tree-sitter-scala (>=0.23.4,<0.24.0)
56
+ Requires-Dist: tree-sitter-typescript (>=0.23.2,<0.24.0)
57
+ Requires-Dist: types-pyyaml (>=6.0.12.20241230,<7.0.0.0)
58
+ Requires-Dist: typing-extensions (>=4.12.2,<5.0.0)
59
+ Project-URL: Documentation, https://github.com/quantalogic/quantalogic#readme
60
+ Project-URL: Homepage, https://github.com/quantalogic/quantalogic
61
+ Project-URL: Repository, https://github.com/quantalogic/quantalogic
62
+ Description-Content-Type: text/markdown
63
+
64
+ # QuantaLogic: Unleash AI for Coding, Automation, and Conversations
65
+
66
+ **QuantaLogic** is your all-in-one AI framework for building smart agents that code, automate workflows, and chat like pros. Powered by large language models (LLMs) and a versatile toolset, it offers three killer modes: **ReAct** for tackling tough tasks, **Flow** for streamlined processes, and **Chat** for natural, tool-savvy conversations. Whether you’re a coder, a business innovator, or an AI enthusiast, QuantaLogic delivers fast, flexible, and fun solutions. Let’s blast off!
67
+
68
+ > **New: CodeAct**
69
+ >
70
+ > QuantaLogic CodeAct is a powerful, modular extension for creating AI agents that not only reason and act (ReAct) but also use **executable code as their primary action language**. Inspired by the latest research, CodeAct enables agents to solve complex, multi-step tasks by generating, running, and iterating on Python code, all while maintaining context and leveraging a robust tool system. This makes it ideal for advanced automation, mathematical problem-solving, and user-friendly conversational interfaces.
71
+
72
+ [📖 Full Docs](https://quantalogic.github.io/quantalogic/) | [⚡ Quick Guide](./docs/howto/howto.md)
73
+
74
+ ![Demo GIF](./examples/generated_tutorials/python/quantalogic_8s.gif)
75
+
76
+ ---
77
+
78
+ ## Why QuantaLogic?
79
+
80
+ **Why pick QuantaLogic?** It turns the complexity of LLMs into practical magic, making AI work for *you*. From coding scripts to automating business tasks or chatting about the universe, QuantaLogic is your creative sidekick, saving time and unlocking possibilities.
81
+
82
+ - **Versatile Power**: Code, automate, or converse—handle any task.
83
+ - **Your Rules**: Customize agents and tools to match your needs.
84
+ - **Scales Big**: From CLI hacks to enterprise workflows.
85
+ - **Free & Open**: Apache 2.0 license—use it, tweak it, share it.
86
+
87
+ > *“AI should spark joy, not stress. QuantaLogic makes it happen!”*
88
+
89
+ ---
90
+
91
+ ## What is QuantaLogic?
92
+
93
+ **What’s the vibe?** QuantaLogic is a Python framework that harnesses LLMs (like GPT-4o, Claude, or DeepSeek) to create AI agents. These agents wield tools for coding, searching, file ops, and more, all accessible via a slick CLI or Python API. With **ReAct**, **Flow**, and **Chat** modes, it adapts to any challenge—dynamic tasks, structured pipelines, or friendly chats.
94
+
95
+ ### Core Features
96
+ - **ReAct Mode**: Solve problems with LLM reasoning + tool actions.
97
+ - **Flow Mode**: Craft structured workflows with nodes and transitions.
98
+ - **Chat Mode**: Converse naturally with tool-calling smarts.
99
+ - **LLM Integration**: Supports OpenAI, Anthropic, DeepSeek via LiteLLM.
100
+ - **Toolset**: Code execution, web search, file management, and custom tools.
101
+ - **Smart Memory**: Keeps context lean for long tasks or chats.
102
+ - **Real-Time Insights**: Track progress with events and logs.
103
+ - **Safe Execution**: Docker-based tool isolation.
104
+
105
+ ---
106
+
107
+ ## CodeAct vs ReAct: What's the Difference?
108
+
109
+ QuantaLogic supports both the classic **ReAct** paradigm and its advanced extension, **CodeAct**:
110
+
111
+ - **ReAct** (Reason + Act):
112
+ - Based on the [ReAct paper](https://arxiv.org/abs/2210.03629), this approach lets agents *reason* (think step-by-step) and *act* (use tools or code) in a loop. It's great for tasks where language models need to plan, use tools, and adapt to feedback.
113
+
114
+ - **CodeAct**:
115
+ - Builds on ReAct by making **executable Python code** the main language for agent actions. Instead of just calling tools or outputting text, the agent writes and runs code, observes the results (including errors), and iterates until the task is solved.
116
+ - This approach is inspired by recent research ([Yang et al., 2024](https://arxiv.org/html/2402.01030v4)) showing that executable code actions enable more capable and reliable LLM agents.
117
+ - CodeAct is ideal for complex, multi-step tasks, advanced automation, and scenarios where precise, verifiable actions are needed.
118
+
119
+ **Summary**:
120
+ - Use **ReAct** for flexible reasoning with tool use.
121
+ - Use **CodeAct** for tasks where generating and executing code is the best way to solve a problem or automate a workflow.
122
+
123
+ Here’s how it flows:
124
+
125
+ ```mermaid
126
+ graph TD
127
+ A[User] -->|Input| B[QuantaLogic]
128
+ B --> C1[Pure ReAct]
129
+ B --> C2[CodeAct]
130
+ B --> D[Flow: Automate]
131
+ B --> E[Chat: Converse]
132
+ C1 --> F1[LLM + Tools]
133
+ C2 --> F2[LLM + Code Actions]
134
+ D --> G[Nodes + Engine]
135
+ E --> H[Persona + Tools]
136
+ F1 --> I[Output]
137
+ F2 --> I
138
+ G --> I
139
+ H --> I
140
+ I --> A
141
+ style A fill:#ffe5b4,stroke:#555
142
+ style B fill:#cfe0e8,stroke:#555
143
+ style C1 fill:#e6e6fa,stroke:#555
144
+ style C2 fill:#ffd1dc,stroke:#555
145
+ style D fill:#c8e6c9,stroke:#555
146
+ style E fill:#fff9c4,stroke:#555
147
+ style F1 fill:#f0f0f0,stroke:#555
148
+ style F2 fill:#f0f0f0,stroke:#555
149
+ style G fill:#d0f0c0,stroke:#555
150
+ style H fill:#ffefdb,stroke:#555
151
+ style I fill:#cfe0e8,stroke:#555
152
+ ```
153
+
154
+ For detailed CodeAct documentation, see [CodeAct Module](quantalogic_codeact/README.md).
155
+
156
+ ---
157
+
158
+ ## How to Get Started
159
+
160
+ **How do you dive in?** Install it, set it up, and start creating. We’ll guide you through setup, examples, and pro tips to master QuantaLogic in minutes.
161
+
162
+ ### Installation & Setup
163
+
164
+ #### Prerequisites
165
+ - Python >= 3.10+ (required)
166
+ - Docker (optional; sandboxed execution)
167
+ - Poetry (optional; for source builds)
168
+
169
+ #### Installation
170
+ Install the core CLI and (optionally) CodeAct extension:
171
+ ```bash
172
+ pip install quantalogic
173
+ pip install quantalogic-codeact
174
+ ```
175
+ Or with pipx:
176
+ ```bash
177
+ pipx install quantalogic
178
+ pipx install quantalogic-codeact
179
+ ```
180
+
181
+ #### Developer Build (optional)
182
+ ```bash
183
+ git clone https://github.com/quantalogic/quantalogic.git
184
+ cd quantalogic
185
+ python -m venv .venv
186
+ # macOS/Linux
187
+ source .venv/bin/activate
188
+ # Windows
189
+ .venv\\Scripts\\activate
190
+ poetry install
191
+ ```
192
+
193
+ #### Verify Installation
194
+ ```bash
195
+ quantalogic --help
196
+ quantalogic_codeact --help
197
+ ```
198
+
199
+ #### Configure API Keys
200
+ ```bash
201
+ cat <<EOF > .env
202
+ OPENAI_API_KEY=sk-your-key
203
+ DEEPSEEK_API_KEY=ds-your-key
204
+ EOF
205
+ ```
206
+ > For advanced settings, see [docs/config.md](./docs/config.md)
207
+
208
+ ---
209
+
210
+ ### Quick Start Examples
211
+
212
+ Let’s see QuantaLogic shine with these quick demos.
213
+
214
+ #### CLI: Solve a Task
215
+ ```bash
216
+ quantalogic task "Write a Python script to reverse a string"
217
+ ```
218
+ **Output**: A clean, working string-reversal script!
219
+
220
+ #### CLI: Chat It Up
221
+ ```bash
222
+ quantalogic chat --persona "You’re a cosmic guide" "What’s the tallest mountain?"
223
+ ```
224
+ **Output**: A lively response, possibly with search results!
225
+
226
+ #### CLI: CodeAct Shell
227
+ ```bash
228
+ quantalogic_codeact shell
229
+ ```
230
+
231
+ #### CLI: CodeAct Task
232
+ ```bash
233
+ quantalogic_codeact task "Solve 2 + 2" --model deepseek/deepseek-chat --timeout 60 --streaming
234
+ ```
235
+
236
+ #### Python: ReAct Agent
237
+ ```python
238
+ from quantalogic import Agent
239
+
240
+ agent = Agent(model_name="deepseek/deepseek-chat")
241
+ result = agent.solve_task("Write a Python function to reverse a string")
242
+ print(result)
243
+ # Output: "def reverse_string(s): return s[::-1]"
244
+ ```
245
+
246
+ #### Python: Chat Mode
247
+ ```python
248
+ from quantalogic import Agent, DuckDuckGoSearchTool
249
+
250
+ agent = Agent(
251
+ model_name="gpt-4o-mini",
252
+ chat_system_prompt="You’re a curious explorer",
253
+ tools=[DuckDuckGoSearchTool()]
254
+ )
255
+ response = agent.chat("What’s new in quantum computing?")
256
+ print(response)
257
+ # Output: "I checked the latest news! Here’s a breakthrough in quantum computing: [details]."
258
+ ```
259
+
260
+ ---
261
+
262
+ ### The Three Modes: Your Superpowers
263
+
264
+ #### 1. ReAct Framework: Dynamic Task-Solving
265
+ **Why**: Tackle open-ended tasks like coding or research with creative flair.
266
+ **What**: Combines LLM reasoning with tools to iterate toward solutions.
267
+ **How**: The agent thinks, acts, and loops until the task is complete.
268
+
269
+ **Example**: Debug some code.
270
+ ```bash
271
+ quantalogic task "Debug this Python code: def add(a, b): return a - b"
272
+ ```
273
+ **Flow**:
274
+ ```mermaid
275
+ sequenceDiagram
276
+ User->>Agent: "Debug code"
277
+ Agent->>LLM: "Analyze error"
278
+ LLM-->>Agent: "Subtraction should be addition"
279
+ Agent->>PythonTool: "Fix code"
280
+ PythonTool-->>Agent: "def add(a, b): return a + b"
281
+ Agent-->>User: "Fixed code!"
282
+ ```
283
+
284
+ **Memorization Trick**: ReAct = **R**eason + **A**ct, like a detective solving a mystery step-by-step.
285
+
286
+ #### 2. Flow Module: Structured Automation
287
+ **Why**: Perfect for repeatable processes like data pipelines or content creation.
288
+ **What**: A system of nodes (tasks) connected by transitions, run by an engine.
289
+ **How**: Define nodes, link them, and let the workflow hum.
290
+
291
+ **Example**: Process text.
292
+ ```python
293
+ from quantalogic.flow import Workflow, Nodes
294
+
295
+ @Nodes.define(output="processed")
296
+ def uppercase(text: str) -> str:
297
+ return text.upper()
298
+
299
+ workflow = Workflow("uppercase").build()
300
+ result = await workflow.run({"text": "hello world"})
301
+ print(result["processed"]) # "HELLO WORLD"
302
+ ```
303
+
304
+ **Diagram**:
305
+ ```mermaid
306
+ graph LR
307
+ A[Start] --> B[Uppercase Node]
308
+ B --> C[End]
309
+ A -->|Observer| D[Log: NODE_START]
310
+ B -->|Observer| E[Log: NODE_END]
311
+ style A fill:#dfd,stroke:#333
312
+ style C fill:#dfd,stroke:#333
313
+ ```
314
+
315
+ **Memorization Trick**: Flow = a recipe—nodes are ingredients, transitions are steps, and the engine is the chef.
316
+
317
+ **Learn More**: Explore the [Flow YAML DSL Specification](./quantalogic/flow/flow_yaml.md) for advanced workflows.
318
+
319
+ #### 3. Chat Mode: Natural Conversations
320
+ **Why**: Ideal for interactive Q&A or quick info with a touch of tool power.
321
+ **What**: A conversational AI that calls tools when needed, keeping chats smooth.
322
+ **How**: Engages naturally, using tools via ReAct’s XML system.
323
+
324
+ **Example**: Check the weather.
325
+ ```python
326
+ from quantalogic import Agent
327
+
328
+ agent = Agent(model_name="gpt-4o", chat_system_prompt="You’re a travel guide")
329
+ response = agent.chat("What’s the weather in Paris?")
330
+ print(response)
331
+ # Output: "I’ll look it up! Paris is sunny, 20°C today."
332
+ ```
333
+
334
+ **Memorization Trick**: Chat = your AI bestie—talks, listens, and grabs tools like a search engine when curious.
335
+
336
+ ---
337
+
338
+ ### Which Mode to Pick?
339
+
340
+ | Mode | Best For | Style | Tools |
341
+ |------------|------------------------------|---------------------|--------------------|
342
+ | **ReAct** | Coding, research, Q&A | Iterative, adaptive | Dynamic, on-demand |
343
+ | **Flow** | Pipelines, automation | Structured, orderly | Node-specific |
344
+ | **Chat** | Conversations, quick queries | Free-flowing | Contextual |
345
+
346
+ **Pro Tip**: Combine modes! Use Chat for user input, Flow for backend automation, and ReAct for complex tasks.
347
+
348
+ ---
349
+
350
+ ### CLI Mastery
351
+
352
+ The QuantaLogic CLI is your mission control. Here’s the scoop:
353
+
354
+ ```bash
355
+ quantalogic [COMMAND] [OPTIONS]
356
+ ```
357
+
358
+ #### Commands
359
+ - **task**: Run a task.
360
+ ```bash
361
+ quantalogic task "Calculate 5 + 3" --model-name gpt-4o-mini
362
+ ```
363
+ - **chat**: Start a conversation.
364
+ ```bash
365
+ quantalogic chat --persona "AI expert" "What’s the latest in machine learning?"
366
+ ```
367
+ - **list-models**: List LLMs.
368
+ ```bash
369
+ quantalogic list-models --search claude
370
+ ```
371
+
372
+ #### Key Options
373
+ - `--model-name`: Select your LLM (e.g., `anthropic/claude-3.5-sonnet`).
374
+ - `--mode`: Choose ReAct, Flow, or Chat.
375
+ - `--tool-mode`: Prioritize tools in Chat (e.g., `code`).
376
+ - `--verbose`: See detailed logs.
377
+
378
+ **Insider Secret**: Add `--no-stream` for cleaner output on slow terminals!
379
+
380
+ ---
381
+
382
+ ### Advanced Tricks
383
+
384
+ #### Build Custom Tools
385
+ Create your own tools for unique tasks:
386
+ ```python
387
+ from quantalogic.tools import Tool
388
+
389
+ class TimeTool(Tool):
390
+ name = "time_tool"
391
+ def execute(self) -> str:
392
+ from datetime import datetime
393
+ return f"Current time: {datetime.now()}"
394
+
395
+ agent = Agent(model_name="gpt-4o")
396
+ agent.add_tool(TimeTool())
397
+ ```
398
+
399
+ #### Go Async
400
+ Boost performance with async:
401
+ ```python
402
+ import asyncio
403
+ from quantalogic import Agent
404
+
405
+ async def main():
406
+ agent = Agent(model_name="gpt-4o")
407
+ result = await agent.async_chat("Tell me a joke", streaming=True)
408
+ print(result)
409
+
410
+ asyncio.run(main())
411
+ ```
412
+
413
+ #### Monitor Events
414
+ Track every step:
415
+ ```python
416
+ from quantalogic import Agent, console_print_events
417
+
418
+ agent = Agent(model_name="gpt-4o")
419
+ agent.event_emitter.on(["task_start", "tool_execution_start"], console_print_events)
420
+ result = agent.solve_task("Write a poem")
421
+ ```
422
+
423
+ ---
424
+
425
+ ### Memorization Hacks
426
+ - **Modes as Jobs**: ReAct = Freelancer (flexible tasks), Flow = Engineer (structured builds), Chat = Barista (serves up chats).
427
+ - **Tools as Toys**: `PythonTool` = LEGO for coding, `SearchTool` = binoculars for info.
428
+ - **Workflows as Maps**: Nodes = destinations, transitions = roads, engine = GPS.
429
+
430
+ ---
431
+
432
+ ### Simplified Concepts
433
+
434
+ **Tools 101**: Picture QuantaLogic as a handyman. You ask for a fix (task). It grabs tools—a hammer (`WriteFileTool`) or screwdriver (`SearchTool`)—to get the job done right.
435
+
436
+ **Memory Magic**: Imagine a sticky note board. As tasks or chats grow, QuantaLogic condenses old notes to keep space for new ones—efficient and clutter-free.
437
+
438
+
439
+ ### Contributing
440
+
441
+ **Why**: Make AI better for everyone!
442
+ **What**: Add features, squash bugs, or suggest ideas.
443
+ **How**: Fork, branch, code, and PR. Check [CONTRIBUTING.md](./CONTRIBUTING.md).
444
+
445
+ ---
446
+
447
+ ### License
448
+
449
+ QuantaLogic is **Apache 2.0**—free to use, modify, and distribute. Built with ❤️ by Raphaël MANSUY at [QuantaLogic](https://www.quantalogic.app).
450
+
451
+ ---
452
+
453
+ ### API Keys & Models
454
+
455
+ Power up with LLM API keys in a `.env` file:
456
+ ```bash
457
+ OPENAI_API_KEY=sk-your-key
458
+ ANTHROPIC_API_KEY=your-key
459
+ DEEPSEEK_API_KEY=ds-your-key
460
+ ```
461
+
462
+ **Top Models**:
463
+ - `openai/gpt-4o-mini`: Speedy and budget-friendly.
464
+ - `anthropic/claude-3.5-sonnet`: Razor-sharp reasoning.
465
+ - `deepseek/deepseek-reasoner`: Deep problem-solving.
466
+
467
+ **Insider Secret**: Set `LM_STUDIO_API_BASE` for local LLMs—great for offline work!
468
+
469
+ ---
470
+
471
+ ### Let’s Build the Future
472
+
473
+ QuantaLogic is your launchpad for AI awesomeness. Install it, try the examples, and create something epic—code, workflows, or chats. Star the repo, join the community, and let’s make AI unstoppable!
474
+
475
+ [![Star History](https://api.star-history.com/svg?repos=quantalogic/quantalogic&type=Date)](https://star-history.com/#quantalogic/quantalogic?Date)