evoagentx 0.1.0__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 (294) hide show
  1. evoagentx-0.1.0/LICENSE +82 -0
  2. evoagentx-0.1.0/PKG-INFO +528 -0
  3. evoagentx-0.1.0/README.md +448 -0
  4. evoagentx-0.1.0/evoagentx/__init__.py +2 -0
  5. evoagentx-0.1.0/evoagentx/actions/__init__.py +5 -0
  6. evoagentx-0.1.0/evoagentx/actions/action.py +256 -0
  7. evoagentx-0.1.0/evoagentx/actions/agent_generation.py +198 -0
  8. evoagentx-0.1.0/evoagentx/actions/code_extraction.py +276 -0
  9. evoagentx-0.1.0/evoagentx/actions/code_verification.py +63 -0
  10. evoagentx-0.1.0/evoagentx/actions/customize_action.py +508 -0
  11. evoagentx-0.1.0/evoagentx/actions/task_planning.py +80 -0
  12. evoagentx-0.1.0/evoagentx/agents/__init__.py +6 -0
  13. evoagentx-0.1.0/evoagentx/agents/action_agent.py +502 -0
  14. evoagentx-0.1.0/evoagentx/agents/agent.py +531 -0
  15. evoagentx-0.1.0/evoagentx/agents/agent_generator.py +23 -0
  16. evoagentx-0.1.0/evoagentx/agents/agent_manager.py +505 -0
  17. evoagentx-0.1.0/evoagentx/agents/customize_agent.py +522 -0
  18. evoagentx-0.1.0/evoagentx/agents/long_term_memory_agent.py +470 -0
  19. evoagentx-0.1.0/evoagentx/agents/task_planner.py +35 -0
  20. evoagentx-0.1.0/evoagentx/agents/workflow_reviewer.py +14 -0
  21. evoagentx-0.1.0/evoagentx/app/__init__.py +0 -0
  22. evoagentx-0.1.0/evoagentx/app/api.py +329 -0
  23. evoagentx-0.1.0/evoagentx/app/config.py +83 -0
  24. evoagentx-0.1.0/evoagentx/app/db.py +177 -0
  25. evoagentx-0.1.0/evoagentx/app/main.py +177 -0
  26. evoagentx-0.1.0/evoagentx/app/schemas.py +168 -0
  27. evoagentx-0.1.0/evoagentx/app/security.py +172 -0
  28. evoagentx-0.1.0/evoagentx/app/services.py +463 -0
  29. evoagentx-0.1.0/evoagentx/benchmark/WorfBench.py +155 -0
  30. evoagentx-0.1.0/evoagentx/benchmark/__init__.py +21 -0
  31. evoagentx-0.1.0/evoagentx/benchmark/benchmark.py +313 -0
  32. evoagentx-0.1.0/evoagentx/benchmark/gsm8k.py +156 -0
  33. evoagentx-0.1.0/evoagentx/benchmark/hotpotqa.py +109 -0
  34. evoagentx-0.1.0/evoagentx/benchmark/humaneval.py +227 -0
  35. evoagentx-0.1.0/evoagentx/benchmark/lcb_utils/__init__.py +0 -0
  36. evoagentx-0.1.0/evoagentx/benchmark/lcb_utils/code_execution.py +67 -0
  37. evoagentx-0.1.0/evoagentx/benchmark/lcb_utils/code_generation.py +149 -0
  38. evoagentx-0.1.0/evoagentx/benchmark/lcb_utils/evaluation.py +1133 -0
  39. evoagentx-0.1.0/evoagentx/benchmark/lcb_utils/test_output_prediction.py +70 -0
  40. evoagentx-0.1.0/evoagentx/benchmark/lcb_utils/utils.py +40 -0
  41. evoagentx-0.1.0/evoagentx/benchmark/livecodebench.py +153 -0
  42. evoagentx-0.1.0/evoagentx/benchmark/math_benchmark.py +223 -0
  43. evoagentx-0.1.0/evoagentx/benchmark/mbpp.py +285 -0
  44. evoagentx-0.1.0/evoagentx/benchmark/measures.py +282 -0
  45. evoagentx-0.1.0/evoagentx/benchmark/nq.py +89 -0
  46. evoagentx-0.1.0/evoagentx/config.py +67 -0
  47. evoagentx-0.1.0/evoagentx/core/__init__.py +10 -0
  48. evoagentx-0.1.0/evoagentx/core/base_config.py +67 -0
  49. evoagentx-0.1.0/evoagentx/core/callbacks.py +176 -0
  50. evoagentx-0.1.0/evoagentx/core/decorators.py +35 -0
  51. evoagentx-0.1.0/evoagentx/core/logging.py +33 -0
  52. evoagentx-0.1.0/evoagentx/core/message.py +140 -0
  53. evoagentx-0.1.0/evoagentx/core/module.py +477 -0
  54. evoagentx-0.1.0/evoagentx/core/module_utils.py +334 -0
  55. evoagentx-0.1.0/evoagentx/core/parser.py +26 -0
  56. evoagentx-0.1.0/evoagentx/core/registry.py +198 -0
  57. evoagentx-0.1.0/evoagentx/evaluators/__init__.py +3 -0
  58. evoagentx-0.1.0/evoagentx/evaluators/aflow_evaluator.py +101 -0
  59. evoagentx-0.1.0/evoagentx/evaluators/evaluator.py +516 -0
  60. evoagentx-0.1.0/evoagentx/hitl/__init__.py +61 -0
  61. evoagentx-0.1.0/evoagentx/hitl/approval_manager.py +481 -0
  62. evoagentx-0.1.0/evoagentx/hitl/hitl.py +50 -0
  63. evoagentx-0.1.0/evoagentx/hitl/hitl_gui.py +341 -0
  64. evoagentx-0.1.0/evoagentx/hitl/interceptor_agent.py +299 -0
  65. evoagentx-0.1.0/evoagentx/hitl/special_hitl_agent.py +320 -0
  66. evoagentx-0.1.0/evoagentx/hitl/workflow_editor.py +214 -0
  67. evoagentx-0.1.0/evoagentx/memory/__init__.py +5 -0
  68. evoagentx-0.1.0/evoagentx/memory/long_term_memory.py +276 -0
  69. evoagentx-0.1.0/evoagentx/memory/memory.py +198 -0
  70. evoagentx-0.1.0/evoagentx/memory/memory_manager.py +250 -0
  71. evoagentx-0.1.0/evoagentx/models/__init__.py +9 -0
  72. evoagentx-0.1.0/evoagentx/models/aliyun_model.py +386 -0
  73. evoagentx-0.1.0/evoagentx/models/base_model.py +615 -0
  74. evoagentx-0.1.0/evoagentx/models/litellm_model.py +188 -0
  75. evoagentx-0.1.0/evoagentx/models/model_configs.py +210 -0
  76. evoagentx-0.1.0/evoagentx/models/model_utils.py +143 -0
  77. evoagentx-0.1.0/evoagentx/models/openai_model.py +203 -0
  78. evoagentx-0.1.0/evoagentx/models/openrouter_model.py +186 -0
  79. evoagentx-0.1.0/evoagentx/models/siliconflow_model.py +132 -0
  80. evoagentx-0.1.0/evoagentx/models/siliconflow_model_cost.py +132 -0
  81. evoagentx-0.1.0/evoagentx/optimizers/__init__.py +6 -0
  82. evoagentx-0.1.0/evoagentx/optimizers/aflow_optimizer.py +303 -0
  83. evoagentx-0.1.0/evoagentx/optimizers/engine/__init__.py +0 -0
  84. evoagentx-0.1.0/evoagentx/optimizers/engine/base.py +70 -0
  85. evoagentx-0.1.0/evoagentx/optimizers/engine/decorators.py +94 -0
  86. evoagentx-0.1.0/evoagentx/optimizers/engine/registry.py +432 -0
  87. evoagentx-0.1.0/evoagentx/optimizers/example_optimizer.py +70 -0
  88. evoagentx-0.1.0/evoagentx/optimizers/mipro_optimizer.py +1598 -0
  89. evoagentx-0.1.0/evoagentx/optimizers/optimizer.py +45 -0
  90. evoagentx-0.1.0/evoagentx/optimizers/optimizer_core.py +310 -0
  91. evoagentx-0.1.0/evoagentx/optimizers/sew_optimizer.py +932 -0
  92. evoagentx-0.1.0/evoagentx/optimizers/textgrad_optimizer.py +661 -0
  93. evoagentx-0.1.0/evoagentx/prompts/__init__.py +3 -0
  94. evoagentx-0.1.0/evoagentx/prompts/agent_generator.py +375 -0
  95. evoagentx-0.1.0/evoagentx/prompts/code_extraction.py +39 -0
  96. evoagentx-0.1.0/evoagentx/prompts/code_verification.py +70 -0
  97. evoagentx-0.1.0/evoagentx/prompts/context_extraction.py +56 -0
  98. evoagentx-0.1.0/evoagentx/prompts/memory/manager.py +54 -0
  99. evoagentx-0.1.0/evoagentx/prompts/operators.py +74 -0
  100. evoagentx-0.1.0/evoagentx/prompts/optimizers/aflow_optimizer.py +68 -0
  101. evoagentx-0.1.0/evoagentx/prompts/optimizers/textgrad_optimizer.py +107 -0
  102. evoagentx-0.1.0/evoagentx/prompts/rag/graph_extract.py +51 -0
  103. evoagentx-0.1.0/evoagentx/prompts/rag/graph_synonym.py +11 -0
  104. evoagentx-0.1.0/evoagentx/prompts/rag/hyde.py +15 -0
  105. evoagentx-0.1.0/evoagentx/prompts/task_planner.py +339 -0
  106. evoagentx-0.1.0/evoagentx/prompts/template.py +566 -0
  107. evoagentx-0.1.0/evoagentx/prompts/tool_calling.py +118 -0
  108. evoagentx-0.1.0/evoagentx/prompts/utils.py +2 -0
  109. evoagentx-0.1.0/evoagentx/prompts/workflow/sew_optimizer.py +100 -0
  110. evoagentx-0.1.0/evoagentx/prompts/workflow/sew_workflow.py +113 -0
  111. evoagentx-0.1.0/evoagentx/prompts/workflow/workflow_editor.py +32 -0
  112. evoagentx-0.1.0/evoagentx/prompts/workflow/workflow_manager.py +155 -0
  113. evoagentx-0.1.0/evoagentx/rag/__init__.py +17 -0
  114. evoagentx-0.1.0/evoagentx/rag/chunkers/__init__.py +61 -0
  115. evoagentx-0.1.0/evoagentx/rag/chunkers/base.py +31 -0
  116. evoagentx-0.1.0/evoagentx/rag/chunkers/hierachical_chunker.py +152 -0
  117. evoagentx-0.1.0/evoagentx/rag/chunkers/semantic_chunker.py +91 -0
  118. evoagentx-0.1.0/evoagentx/rag/chunkers/simple_chunker.py +111 -0
  119. evoagentx-0.1.0/evoagentx/rag/embeddings/__init__.py +51 -0
  120. evoagentx-0.1.0/evoagentx/rag/embeddings/base.py +84 -0
  121. evoagentx-0.1.0/evoagentx/rag/embeddings/huggingface_embedding.py +130 -0
  122. evoagentx-0.1.0/evoagentx/rag/embeddings/ollama_embedding.py +151 -0
  123. evoagentx-0.1.0/evoagentx/rag/embeddings/openai_embedding.py +167 -0
  124. evoagentx-0.1.0/evoagentx/rag/indexings/__init__.py +61 -0
  125. evoagentx-0.1.0/evoagentx/rag/indexings/base.py +46 -0
  126. evoagentx-0.1.0/evoagentx/rag/indexings/graph_index.py +218 -0
  127. evoagentx-0.1.0/evoagentx/rag/indexings/summary_index.py +6 -0
  128. evoagentx-0.1.0/evoagentx/rag/indexings/tree_index.py +8 -0
  129. evoagentx-0.1.0/evoagentx/rag/indexings/vector_index.py +203 -0
  130. evoagentx-0.1.0/evoagentx/rag/postprocessors/__init__.py +42 -0
  131. evoagentx-0.1.0/evoagentx/rag/postprocessors/base.py +23 -0
  132. evoagentx-0.1.0/evoagentx/rag/postprocessors/simple_reranker.py +53 -0
  133. evoagentx-0.1.0/evoagentx/rag/rag.py +637 -0
  134. evoagentx-0.1.0/evoagentx/rag/rag_config.py +66 -0
  135. evoagentx-0.1.0/evoagentx/rag/readers/__init__.py +3 -0
  136. evoagentx-0.1.0/evoagentx/rag/readers/base.py +182 -0
  137. evoagentx-0.1.0/evoagentx/rag/retrievers/__init__.py +51 -0
  138. evoagentx-0.1.0/evoagentx/rag/retrievers/base.py +29 -0
  139. evoagentx-0.1.0/evoagentx/rag/retrievers/graph_retriever.py +224 -0
  140. evoagentx-0.1.0/evoagentx/rag/retrievers/vector_retriever.py +80 -0
  141. evoagentx-0.1.0/evoagentx/rag/schema.py +583 -0
  142. evoagentx-0.1.0/evoagentx/rag/transforms/graph_extract.py +244 -0
  143. evoagentx-0.1.0/evoagentx/rag/transforms/query/HyDE.py +102 -0
  144. evoagentx-0.1.0/evoagentx/rag/transforms/query/base.py +36 -0
  145. evoagentx-0.1.0/evoagentx/storages/__init__.py +3 -0
  146. evoagentx-0.1.0/evoagentx/storages/base.py +344 -0
  147. evoagentx-0.1.0/evoagentx/storages/db_stores/__init__.py +59 -0
  148. evoagentx-0.1.0/evoagentx/storages/db_stores/base.py +74 -0
  149. evoagentx-0.1.0/evoagentx/storages/db_stores/posgre_sql.py +0 -0
  150. evoagentx-0.1.0/evoagentx/storages/db_stores/sqlite.py +450 -0
  151. evoagentx-0.1.0/evoagentx/storages/graph_stores/__init__.py +40 -0
  152. evoagentx-0.1.0/evoagentx/storages/graph_stores/base.py +36 -0
  153. evoagentx-0.1.0/evoagentx/storages/graph_stores/neo4j.py +277 -0
  154. evoagentx-0.1.0/evoagentx/storages/schema.py +68 -0
  155. evoagentx-0.1.0/evoagentx/storages/storages_config.py +51 -0
  156. evoagentx-0.1.0/evoagentx/storages/vectore_stores/__init__.py +32 -0
  157. evoagentx-0.1.0/evoagentx/storages/vectore_stores/base.py +22 -0
  158. evoagentx-0.1.0/evoagentx/storages/vectore_stores/chroma.py +0 -0
  159. evoagentx-0.1.0/evoagentx/storages/vectore_stores/faiss.py +59 -0
  160. evoagentx-0.1.0/evoagentx/storages/vectore_stores/qdrant.py +0 -0
  161. evoagentx-0.1.0/evoagentx/tools/__init__.py +56 -0
  162. evoagentx-0.1.0/evoagentx/tools/browser_tool.py +1795 -0
  163. evoagentx-0.1.0/evoagentx/tools/browser_use.py +223 -0
  164. evoagentx-0.1.0/evoagentx/tools/cmd_toolkit.py +340 -0
  165. evoagentx-0.1.0/evoagentx/tools/database_base.py +321 -0
  166. evoagentx-0.1.0/evoagentx/tools/database_faiss.py +1006 -0
  167. evoagentx-0.1.0/evoagentx/tools/database_mongodb.py +1258 -0
  168. evoagentx-0.1.0/evoagentx/tools/database_postgresql.py +1203 -0
  169. evoagentx-0.1.0/evoagentx/tools/file_tool.py +428 -0
  170. evoagentx-0.1.0/evoagentx/tools/image_analysis.py +157 -0
  171. evoagentx-0.1.0/evoagentx/tools/images_flux_generation.py +138 -0
  172. evoagentx-0.1.0/evoagentx/tools/images_openai_generation.py +152 -0
  173. evoagentx-0.1.0/evoagentx/tools/interpreter_base.py +15 -0
  174. evoagentx-0.1.0/evoagentx/tools/interpreter_docker.py +467 -0
  175. evoagentx-0.1.0/evoagentx/tools/interpreter_python.py +472 -0
  176. evoagentx-0.1.0/evoagentx/tools/mcp.py +419 -0
  177. evoagentx-0.1.0/evoagentx/tools/request.py +96 -0
  178. evoagentx-0.1.0/evoagentx/tools/request_arxiv.py +382 -0
  179. evoagentx-0.1.0/evoagentx/tools/request_base.py +336 -0
  180. evoagentx-0.1.0/evoagentx/tools/rss_feed.py +363 -0
  181. evoagentx-0.1.0/evoagentx/tools/search_base.py +116 -0
  182. evoagentx-0.1.0/evoagentx/tools/search_ddgs.py +187 -0
  183. evoagentx-0.1.0/evoagentx/tools/search_google.py +168 -0
  184. evoagentx-0.1.0/evoagentx/tools/search_google_f.py +141 -0
  185. evoagentx-0.1.0/evoagentx/tools/search_serpapi.py +473 -0
  186. evoagentx-0.1.0/evoagentx/tools/search_serperapi.py +422 -0
  187. evoagentx-0.1.0/evoagentx/tools/search_wiki.py +169 -0
  188. evoagentx-0.1.0/evoagentx/tools/storage_base.py +984 -0
  189. evoagentx-0.1.0/evoagentx/tools/storage_file.py +565 -0
  190. evoagentx-0.1.0/evoagentx/tools/storage_handler.py +1139 -0
  191. evoagentx-0.1.0/evoagentx/tools/tool.py +113 -0
  192. evoagentx-0.1.0/evoagentx/utils/__init__.py +0 -0
  193. evoagentx-0.1.0/evoagentx/utils/aflow_utils/convergence_utils.py +119 -0
  194. evoagentx-0.1.0/evoagentx/utils/aflow_utils/data_utils.py +221 -0
  195. evoagentx-0.1.0/evoagentx/utils/aflow_utils/evaluation_utils.py +41 -0
  196. evoagentx-0.1.0/evoagentx/utils/aflow_utils/experience_utils.py +98 -0
  197. evoagentx-0.1.0/evoagentx/utils/aflow_utils/graph_utils.py +173 -0
  198. evoagentx-0.1.0/evoagentx/utils/mipro_utils/module_utils.py +554 -0
  199. evoagentx-0.1.0/evoagentx/utils/mipro_utils/register_utils.py +92 -0
  200. evoagentx-0.1.0/evoagentx/utils/mipro_utils/signature_utils.py +371 -0
  201. evoagentx-0.1.0/evoagentx/utils/sanitize.py +178 -0
  202. evoagentx-0.1.0/evoagentx/utils/utils.py +104 -0
  203. evoagentx-0.1.0/evoagentx/workflow/__init__.py +20 -0
  204. evoagentx-0.1.0/evoagentx/workflow/action_graph.py +141 -0
  205. evoagentx-0.1.0/evoagentx/workflow/controller.py +23 -0
  206. evoagentx-0.1.0/evoagentx/workflow/environment.py +111 -0
  207. evoagentx-0.1.0/evoagentx/workflow/operators.py +466 -0
  208. evoagentx-0.1.0/evoagentx/workflow/workflow.py +435 -0
  209. evoagentx-0.1.0/evoagentx/workflow/workflow_generator.py +215 -0
  210. evoagentx-0.1.0/evoagentx/workflow/workflow_graph.py +1225 -0
  211. evoagentx-0.1.0/evoagentx/workflow/workflow_manager.py +493 -0
  212. evoagentx-0.1.0/evoagentx.egg-info/PKG-INFO +528 -0
  213. evoagentx-0.1.0/evoagentx.egg-info/SOURCES.txt +292 -0
  214. evoagentx-0.1.0/evoagentx.egg-info/dependency_links.txt +1 -0
  215. evoagentx-0.1.0/evoagentx.egg-info/requires.txt +64 -0
  216. evoagentx-0.1.0/evoagentx.egg-info/top_level.txt +6 -0
  217. evoagentx-0.1.0/examples/action_agent.py +405 -0
  218. evoagentx-0.1.0/examples/aflow/code_generation/graph.py +30 -0
  219. evoagentx-0.1.0/examples/aflow/code_generation/prompt.py +5 -0
  220. evoagentx-0.1.0/examples/aflow/hotpotqa/graph.py +27 -0
  221. evoagentx-0.1.0/examples/aflow/hotpotqa/prompt.py +6 -0
  222. evoagentx-0.1.0/examples/aflow/math/graph.py +26 -0
  223. evoagentx-0.1.0/examples/aflow/math/prompt.py +5 -0
  224. evoagentx-0.1.0/examples/agent_with_memory_action.py +423 -0
  225. evoagentx-0.1.0/examples/agent_with_multiple_actions.py +461 -0
  226. evoagentx-0.1.0/examples/benchmark_and_evaluation.py +73 -0
  227. evoagentx-0.1.0/examples/customize_agent.py +524 -0
  228. evoagentx-0.1.0/examples/hitl/hitl_example.py +179 -0
  229. evoagentx-0.1.0/examples/hitl/hitl_example2.py +180 -0
  230. evoagentx-0.1.0/examples/hitl/hitl_multi_conversation_example.py +70 -0
  231. evoagentx-0.1.0/examples/mcp_agent.py +49 -0
  232. evoagentx-0.1.0/examples/models/lite_azure_model_test.py +36 -0
  233. evoagentx-0.1.0/examples/models/openrouter_example.py +160 -0
  234. evoagentx-0.1.0/examples/models/workflow_demo_lite_azure.py +233 -0
  235. evoagentx-0.1.0/examples/optimization/aflow/aflow_hotpotqa.py +96 -0
  236. evoagentx-0.1.0/examples/optimization/aflow/aflow_humaneval.py +64 -0
  237. evoagentx-0.1.0/examples/optimization/aflow/aflow_math.py +92 -0
  238. evoagentx-0.1.0/examples/optimization/aflow/aflow_mbpp.py +89 -0
  239. evoagentx-0.1.0/examples/optimization/mipro/math_mipro.py +104 -0
  240. evoagentx-0.1.0/examples/optimization/mipro/math_plug_and_play.py +124 -0
  241. evoagentx-0.1.0/examples/optimization/textgrad/hotpotqa_textgrad.py +112 -0
  242. evoagentx-0.1.0/examples/optimization/textgrad/math_textgrad.py +107 -0
  243. evoagentx-0.1.0/examples/optimization/textgrad/mbpp_textgrad.py +107 -0
  244. evoagentx-0.1.0/examples/rag.py +274 -0
  245. evoagentx-0.1.0/examples/sequential_workflow.py +94 -0
  246. evoagentx-0.1.0/examples/sew_optimizer.py +77 -0
  247. evoagentx-0.1.0/examples/tools/hello_world.py +2 -0
  248. evoagentx-0.1.0/examples/tools/tools_browser.py +253 -0
  249. evoagentx-0.1.0/examples/tools/tools_database.py +455 -0
  250. evoagentx-0.1.0/examples/tools/tools_files.py +382 -0
  251. evoagentx-0.1.0/examples/tools/tools_images.py +229 -0
  252. evoagentx-0.1.0/examples/tools/tools_integration.py +94 -0
  253. evoagentx-0.1.0/examples/tools/tools_interpreter.py +283 -0
  254. evoagentx-0.1.0/examples/tools/tools_search.py +416 -0
  255. evoagentx-0.1.0/examples/workflow/arxiv_workflow.py +89 -0
  256. evoagentx-0.1.0/examples/workflow/invest/catl_data_functions.py +764 -0
  257. evoagentx-0.1.0/examples/workflow/invest/csv_to_llm_converter.py +341 -0
  258. evoagentx-0.1.0/examples/workflow/invest/generate_report.py +47 -0
  259. evoagentx-0.1.0/examples/workflow/invest/html_report_generator.py +1636 -0
  260. evoagentx-0.1.0/examples/workflow/invest/stock_analysis.py +323 -0
  261. evoagentx-0.1.0/examples/workflow/invest/stock_chart_tools.py +541 -0
  262. evoagentx-0.1.0/examples/workflow/workflow_demo.py +86 -0
  263. evoagentx-0.1.0/examples/workflow/workflow_direction.py +86 -0
  264. evoagentx-0.1.0/examples/workflow_demo_with_tools.py +224 -0
  265. evoagentx-0.1.0/pyproject.toml +94 -0
  266. evoagentx-0.1.0/setup.cfg +4 -0
  267. evoagentx-0.1.0/tests/__init__.py +0 -0
  268. evoagentx-0.1.0/tests/data/benchmark/benchmark_ex_02.py +515 -0
  269. evoagentx-0.1.0/tests/src/agents/test_agent.py +111 -0
  270. evoagentx-0.1.0/tests/src/agents/test_agent_manager.py +86 -0
  271. evoagentx-0.1.0/tests/src/agents/test_customize_agent.py +208 -0
  272. evoagentx-0.1.0/tests/src/benchmark/lcb_solutions.py +235 -0
  273. evoagentx-0.1.0/tests/src/benchmark/test_gsm8k.py +92 -0
  274. evoagentx-0.1.0/tests/src/benchmark/test_hotpotqa.py +153 -0
  275. evoagentx-0.1.0/tests/src/benchmark/test_humaneval.py +56 -0
  276. evoagentx-0.1.0/tests/src/benchmark/test_livecodebench.py +76 -0
  277. evoagentx-0.1.0/tests/src/benchmark/test_math.py +86 -0
  278. evoagentx-0.1.0/tests/src/benchmark/test_mbpp.py +66 -0
  279. evoagentx-0.1.0/tests/src/benchmark/test_nq.py +92 -0
  280. evoagentx-0.1.0/tests/src/core/test_base_config.py +29 -0
  281. evoagentx-0.1.0/tests/src/core/test_message.py +48 -0
  282. evoagentx-0.1.0/tests/src/core/test_module.py +252 -0
  283. evoagentx-0.1.0/tests/src/evaluator/test_evaluator.py +192 -0
  284. evoagentx-0.1.0/tests/src/hitl/__init__.py +1 -0
  285. evoagentx-0.1.0/tests/src/hitl/test_workflow_editor.py +384 -0
  286. evoagentx-0.1.0/tests/src/models/mock_response.py +59 -0
  287. evoagentx-0.1.0/tests/src/models/test_openai_model.py +50 -0
  288. evoagentx-0.1.0/tests/src/optimizers/test_sew_workflow_scheme.py +109 -0
  289. evoagentx-0.1.0/tests/src/rag/test_rag.py +441 -0
  290. evoagentx-0.1.0/tests/src/storages/test_storagehandler.py +513 -0
  291. evoagentx-0.1.0/tests/src/workflow/test_action_graph.py +81 -0
  292. evoagentx-0.1.0/tests/src/workflow/test_sequential_graph.py +199 -0
  293. evoagentx-0.1.0/tests/src/workflow/test_workflow_graph.py +263 -0
  294. evoagentx-0.1.0/tests/src/workflow/test_workflow_manager.py +296 -0
@@ -0,0 +1,82 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 EvoAgentX
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
13
+ all 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
21
+ THE SOFTWARE.
22
+
23
+ ---
24
+
25
+ ## Third-party Licenses
26
+
27
+ This project includes modified code from the following open-source projects:
28
+
29
+ ### 1. AFlow
30
+
31
+ Repository: https://github.com/geekan/MetaGPT/tree/main/metagpt/ext/aflow
32
+ License:
33
+
34
+ MIT License (for parts derived from AFlow)
35
+
36
+ Copyright (c) 2024 Chenglin Wu
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining a copy
39
+ of this software and associated documentation files (the "Software"), to deal
40
+ in the Software without restriction, including without limitation the rights
41
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42
+ copies of the Software, and to permit persons to whom the Software is
43
+ furnished to do so, subject to the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be included in
46
+ all copies or substantial portions of the Software.
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
54
+ THE SOFTWARE.
55
+
56
+
57
+ ### 2. LiveCodeBench
58
+
59
+ Repository: https://github.com/LiveCodeBench/LiveCodeBench
60
+ License:
61
+
62
+ MIT License
63
+
64
+ Copyright (c) 2024 LiveCodeBench
65
+
66
+ Permission is hereby granted, free of charge, to any person obtaining a copy
67
+ of this software and associated documentation files (the "Software"), to deal
68
+ in the Software without restriction, including without limitation the rights
69
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
70
+ copies of the Software, and to permit persons to whom the Software is
71
+ furnished to do so, subject to the following conditions:
72
+
73
+ The above copyright notice and this permission notice shall be included in all
74
+ copies or substantial portions of the Software.
75
+
76
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
77
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
78
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
79
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
80
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
81
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
82
+ SOFTWARE.
@@ -0,0 +1,528 @@
1
+ Metadata-Version: 2.4
2
+ Name: evoagentx
3
+ Version: 0.1.0
4
+ Summary: A framework for evolving agentic workflows with LLMs.
5
+ Author-email: EvoAgentX Team <evoagentx.ai@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/EvoAgentX/EvoAgentX
8
+ Project-URL: Documentation, https://EvoAgentX.github.io/EvoAgentX/
9
+ Project-URL: Repository, https://github.com/EvoAgentX/EvoAgentX
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: sympy
17
+ Requires-Dist: overdue
18
+ Requires-Dist: scipy
19
+ Requires-Dist: setuptools
20
+ Requires-Dist: tree_sitter
21
+ Requires-Dist: tree_sitter_python
22
+ Requires-Dist: antlr4-python3-runtime==4.11
23
+ Requires-Dist: tenacity
24
+ Requires-Dist: networkx>=3.3
25
+ Requires-Dist: nltk>=3.9.1
26
+ Requires-Dist: numpy>=1.26.4
27
+ Requires-Dist: openai>=1.55.3
28
+ Requires-Dist: litellm>=1.55.6
29
+ Requires-Dist: pydantic>=2.9.0
30
+ Requires-Dist: loguru>=0.7.3
31
+ Requires-Dist: pandas>=2.2.3
32
+ Requires-Dist: matplotlib>=3.10.0
33
+ Requires-Dist: transformers>=4.47.1
34
+ Requires-Dist: datasets>=3.4.0
35
+ Requires-Dist: faiss-cpu==1.8.0.post1
36
+ Requires-Dist: docker>=6.1.2
37
+ Requires-Dist: fastapi>=0.115.11
38
+ Requires-Dist: motor>=3.7.0
39
+ Requires-Dist: uvicorn>=0.34.0
40
+ Requires-Dist: sqlalchemy>=2.0.38
41
+ Requires-Dist: python-jose>=3.3.0
42
+ Requires-Dist: passlib>=1.7.4
43
+ Requires-Dist: python-multipart>=0.0.6
44
+ Requires-Dist: bcrypt>=4.0.1
45
+ Requires-Dist: celery>=5.3.4
46
+ Requires-Dist: redis>=5.0.0
47
+ Requires-Dist: httpx>=0.24.1
48
+ Requires-Dist: asgi-lifespan>=1.0.1
49
+ Requires-Dist: python-dotenv>=1.0.0
50
+ Requires-Dist: jwt>=1.3.1
51
+ Requires-Dist: dashscope>=1.23.4
52
+ Requires-Dist: textgrad>=0.1.8
53
+ Requires-Dist: dspy
54
+ Requires-Dist: googlesearch-python
55
+ Requires-Dist: wikipedia
56
+ Requires-Dist: mcp
57
+ Requires-Dist: beautifulsoup4
58
+ Requires-Dist: neo4j
59
+ Requires-Dist: ollama
60
+ Requires-Dist: llama-index
61
+ Requires-Dist: llama-index-vector-stores-faiss
62
+ Requires-Dist: llama-index-graph-stores-neo4j
63
+ Requires-Dist: sentence-transformers
64
+ Requires-Dist: docx2txt
65
+ Requires-Dist: python-pptx
66
+ Requires-Dist: Pillow
67
+ Requires-Dist: PyPDF2
68
+ Requires-Dist: selenium
69
+ Requires-Dist: html2text
70
+ Requires-Dist: fastmcp
71
+ Provides-Extra: dev
72
+ Requires-Dist: pytest; extra == "dev"
73
+ Requires-Dist: pytest-cov; extra == "dev"
74
+ Requires-Dist: pytest-mock; extra == "dev"
75
+ Requires-Dist: pytest-asyncio; extra == "dev"
76
+ Requires-Dist: pytest-subtests; extra == "dev"
77
+ Requires-Dist: pytest-json-report; extra == "dev"
78
+ Requires-Dist: ruff; extra == "dev"
79
+ Dynamic: license-file
80
+
81
+ <!-- Add logo here -->
82
+ <div align="center">
83
+ <a href="https://github.com/EvoAgentX/EvoAgentX">
84
+ <img src="./assets/EAXLoGo.svg" alt="EvoAgentX" width="50%">
85
+ </a>
86
+ </div>
87
+
88
+ <h2 align="center">
89
+ Building a Self-Evolving Ecosystem of AI Agents
90
+ </h2>
91
+
92
+ <div align="center">
93
+
94
+ [![EvoAgentX Homepage](https://img.shields.io/badge/EvoAgentX-Homepage-blue?logo=homebridge)](https://evoagentx.org/)
95
+ [![Docs](https://img.shields.io/badge/-Documentation-0A66C2?logo=readthedocs&logoColor=white&color=7289DA&labelColor=grey)](https://EvoAgentX.github.io/EvoAgentX/)
96
+ [![Discord](https://img.shields.io/badge/Chat-Discord-5865F2?&logo=discord&logoColor=white)](https://discord.gg/XWBZUJFwKe)
97
+ [![Twitter](https://img.shields.io/badge/Follow-@EvoAgentX-e3dee5?&logo=x&logoColor=white)](https://x.com/EvoAgentX)
98
+ [![Wechat](https://img.shields.io/badge/WeChat-EvoAgentX-brightgreen?logo=wechat&logoColor=white)](./assets/wechat_info.md)
99
+ [![GitHub star chart](https://img.shields.io/github/stars/EvoAgentX/EvoAgentX?style=social)](https://star-history.com/#EvoAgentX/EvoAgentX)
100
+ [![GitHub fork](https://img.shields.io/github/forks/EvoAgentX/EvoAgentX?style=social)](https://github.com/EvoAgentX/EvoAgentX/fork)
101
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg?)](https://github.com/EvoAgentX/EvoAgentX/blob/main/LICENSE)
102
+ <!-- [![EvoAgentX Homepage](https://img.shields.io/badge/EvoAgentX-Homepage-blue?logo=homebridge)](https://EvoAgentX.github.io/EvoAgentX/) -->
103
+ <!-- [![hf_space](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-EvoAgentX-ffc107?color=ffc107&logoColor=white)](https://huggingface.co/EvoAgentX) -->
104
+ </div>
105
+
106
+ <div align="center">
107
+
108
+ <h3 align="center">
109
+
110
+ <a href="./README.md" style="text-decoration: underline;">English</a> | <a href="./README-zh.md">简体中文</a>
111
+
112
+ </h3>
113
+
114
+ </div>
115
+
116
+ <h4 align="center">
117
+ <i>An automated framework for evaluating and evolving agentic workflows.</i>
118
+ </h4>
119
+
120
+ <p align="center">
121
+ <img src="./assets/framework_en.jpg">
122
+ </p>
123
+
124
+
125
+ ## 🔥 Latest News
126
+ - **[Aug 2025]** 🎉 **The EvoAgentX Team has published the latest survey of self-evolving AI Agents** on [arxiv](https://arxiv.org/abs/2508.07407)!
127
+ - **[July 2025]** 🎉 **EvoAgentX** is on [arxiv](https://arxiv.org/abs/2507.03616)!
128
+ - **[July 2025]** 🎉 **EvoAgentX** has achieved 1,000 stars!
129
+ - **[May 2025]** 🎉 **EvoAgentX** has been officially released!
130
+
131
+ ## ⚡ Get Started
132
+ - [🔥 Latest News](#-latest-news)
133
+ - [⚡ Get Started](#-get-started)
134
+ - [Installation](#installation)
135
+ - [LLM Configuration](#llm-configuration)
136
+ - [API Key Configuration](#api-key-configuration)
137
+ - [Configure and Use the LLM](#configure-and-use-the-llm)
138
+ - [Automatic WorkFlow Generation](#automatic-workflow-generation)
139
+ - [Tool-Enabled Workflows Generation:](#tool-enabled-workflows-generation)
140
+ - [Demo Video](#demo-video)
141
+ - [✨ Final Results](#-final-results)
142
+ - [Evolution Algorithms](#evolution-algorithms)
143
+ - [📊 Results](#-results)
144
+ - [Applications](#applications)
145
+ - [Tutorial and Use Cases](#tutorial-and-use-cases)
146
+ - [🎯 Roadmap](#-roadmap)
147
+ - [🙋 Support](#-support)
148
+ - [Join the Community](#join-the-community)
149
+ - [Add the meeting to your calendar](#add-the-meeting-to-your-calendar)
150
+ - [Contact Information](#contact-information)
151
+ - [Community Call](#community-call)
152
+ - [🙌 Contributing to EvoAgentX](#-contributing-to-evoagentx)
153
+ - [📖 Citation](#-citation)
154
+ - [📚 Acknowledgements](#-acknowledgements)
155
+ - [📄 License](#-license)
156
+
157
+
158
+
159
+ ## Installation
160
+
161
+ We recommend installing EvoAgentX using `pip`:
162
+
163
+ ```bash
164
+ pip install git+https://github.com/EvoAgentX/EvoAgentX.git
165
+ ```
166
+
167
+ For local development or detailed setup (e.g., using conda), refer to the [Installation Guide for EvoAgentX](./docs/installation.md).
168
+
169
+ <details>
170
+ <summary>Example (optional, for local development):</summary>
171
+
172
+ ```bash
173
+ git clone https://github.com/EvoAgentX/EvoAgentX.git
174
+ cd EvoAgentX
175
+ # Create a new conda environment
176
+ conda create -n evoagentx python=3.11
177
+
178
+ # Activate the environment
179
+ conda activate evoagentx
180
+
181
+ # Install the package
182
+ pip install -r requirements.txt
183
+ # OR install in development mode
184
+ pip install -e .
185
+ ```
186
+ </details>
187
+
188
+ ## LLM Configuration
189
+
190
+ ### API Key Configuration
191
+
192
+ To use LLMs with EvoAgentX (e.g., OpenAI), you must set up your API key.
193
+
194
+ <details>
195
+ <summary>Option 1: Set API Key via Environment Variable</summary>
196
+
197
+ - Linux/macOS:
198
+ ```bash
199
+ export OPENAI_API_KEY=<your-openai-api-key>
200
+ ```
201
+
202
+ - Windows Command Prompt:
203
+ ```cmd
204
+ set OPENAI_API_KEY=<your-openai-api-key>
205
+ ```
206
+
207
+ - Windows PowerShell:
208
+ ```powershell
209
+ $env:OPENAI_API_KEY="<your-openai-api-key>" # " is required
210
+ ```
211
+
212
+ Once set, you can access the key in your Python code with:
213
+ ```python
214
+ import os
215
+ OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
216
+ ```
217
+ </details>
218
+
219
+ <details>
220
+ <summary>Option 2: Use .env File</summary>
221
+
222
+ - Create a .env file in your project root and add the following:
223
+ ```bash
224
+ OPENAI_API_KEY=<your-openai-api-key>
225
+ ```
226
+
227
+ Then load it in Python:
228
+ ```python
229
+ from dotenv import load_dotenv
230
+ import os
231
+
232
+ load_dotenv() # Loads environment variables from .env file
233
+ OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
234
+ ```
235
+ </details>
236
+ <!-- > 🔐 Tip: Don't forget to add `.env` to your `.gitignore` to avoid committing secrets. -->
237
+
238
+ ### Configure and Use the LLM
239
+ Once the API key is set, initialise the LLM with:
240
+
241
+ ```python
242
+ from evoagentx.models import OpenAILLMConfig, OpenAILLM
243
+
244
+ # Load the API key from environment
245
+ OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
246
+
247
+ # Define LLM configuration
248
+ openai_config = OpenAILLMConfig(
249
+ model="gpt-4o-mini", # Specify the model name
250
+ openai_key=OPENAI_API_KEY, # Pass the key directly
251
+ stream=True, # Enable streaming response
252
+ output_response=True # Print response to stdout
253
+ )
254
+
255
+ # Initialize the language model
256
+ llm = OpenAILLM(config=openai_config)
257
+
258
+ # Generate a response from the LLM
259
+ response = llm.generate(prompt="What is Agentic Workflow?")
260
+ ```
261
+ > 📖 More details on supported models and config options: [LLM module guide](./docs/modules/llm.md).
262
+
263
+
264
+ ## Automatic WorkFlow Generation
265
+ Once your API key and language model are configured, you can automatically generate and execute multi-agent workflows in EvoAgentX.
266
+
267
+ 🧩 Core Steps:
268
+ 1. Define a natural language goal
269
+ 2. Generate the workflow with `WorkFlowGenerator`
270
+ 3. Instantiate agents using `AgentManager`
271
+ 4. Execute the workflow via `WorkFlow`
272
+
273
+ 💡 Minimal Example:
274
+ ```python
275
+ from evoagentx.workflow import WorkFlowGenerator, WorkFlowGraph, WorkFlow
276
+ from evoagentx.agents import AgentManager
277
+
278
+ goal = "Generate html code for the Tetris game"
279
+ workflow_graph = WorkFlowGenerator(llm=llm).generate_workflow(goal)
280
+
281
+ agent_manager = AgentManager()
282
+ agent_manager.add_agents_from_workflow(workflow_graph, llm_config=openai_config)
283
+
284
+ workflow = WorkFlow(graph=workflow_graph, agent_manager=agent_manager, llm=llm)
285
+ output = workflow.execute()
286
+ print(output)
287
+ ```
288
+
289
+ You can also:
290
+ - 📊 Visualise the workflow: `workflow_graph.display()`
291
+ - 💾 Save/load workflows: `save_module()` / `from_file()`
292
+
293
+ > 📂 For a complete working example, check out the [`workflow_demo.py`](https://github.com/EvoAgentX/EvoAgentX/blob/main/examples/workflow_demo.py)
294
+
295
+ ## Tool-Enabled Workflows Generation:
296
+
297
+ In more advanced scenarios, your workflow agents may need to use external tools. EvoAgentX allows Automatic tool integration: Provide a list of toolkits to WorkFlowGenerator. The generator will consider these and include them in the agents if appropriate.
298
+
299
+ For instance, to enable an Arxiv toolkit:
300
+ ```python
301
+ from evoagentx.tools import ArxivToolkit
302
+
303
+ # Initialize a command-line toolkit for file operations
304
+ arxiv_toolkit = ArxivToolkit()
305
+
306
+ # Generate a workflow with the toolkit available to agents
307
+ wf_generator = WorkFlowGenerator(llm=llm, tools=[arxiv_toolkit])
308
+ workflow_graph = wf_generator.generate_workflow(goal="Find and summarize the latest research on AI in the field of finance on arXiv")
309
+
310
+ # Instantiate agents with access to the toolkit
311
+ agent_manager = AgentManager(tools=[arxiv_toolkit])
312
+ agent_manager.add_agents_from_workflow(workflow_graph, llm_config=openai_config)
313
+
314
+ workflow = WorkFlow(graph=workflow_graph, agent_manager=agent_manager, llm=llm)
315
+ output = workflow.execute()
316
+ print(output)
317
+ ```
318
+
319
+ In this setup, the workflow generator may assign the `ArxivToolkit` to relevant agents, enabling them to execute shell commands as part of the workflow (e.g. creating directories and files)
320
+
321
+ ## Human-in-the-Loop (HITL) Support:
322
+
323
+ In advanced scenarios, EvoAgentX supports integrating human-in-the-loop interactions within your agent workflows. This means you can pause an agent’s execution for manual approval or inject user-provided input at key steps, ensuring critical decisions are vetted by a human when needed.
324
+
325
+ All human interactions are managed through a central `HITLManager` instance. The HITL module includes specialized agents like `HITLInterceptorAgent` for approval gating and `HITLUserInputCollectorAgent` for collecting user data.
326
+
327
+ For instance, to require human approval before an email-sending agent executes its action:
328
+ ```python
329
+ from evoagentx.hitl import HITLManager, HITLInterceptorAgent, HITLInteractionType, HITLMode
330
+
331
+ hitl_manager = HITLManager()
332
+ hitl_manager.activate() # Enable HITL (disabled by default)
333
+
334
+ # Interceptor agent to approve/reject the DummyEmailSendAction of DataSendingAgent
335
+ interceptor = HITLInterceptorAgent(
336
+ target_agent_name="DataSendingAgent",
337
+ target_action_name="DummyEmailSendAction",
338
+ interaction_type=HITLInteractionType.APPROVE_REJECT,
339
+ mode=HITLMode.PRE_EXECUTION # ask before action runs
340
+ )
341
+ # Map the interceptor’s output field back to the workflow’s input field for continuity
342
+ hitl_manager.hitl_input_output_mapping = {"human_verified_data": "extracted_data"}
343
+
344
+ # Add the interceptor to the AgentManager and include HITL in the workflow execution
345
+ agent_manager.add_agent(interceptor)
346
+ workflow = WorkFlow(graph=workflow_graph, agent_manager=agent_manager, llm=llm, hitl_manager=hitl_manager)
347
+ ```
348
+ When this interceptor triggers, the workflow will pause and prompt in the console for `[a]pprove` or `[r]eject` before continuing. If approved, the flow proceeds using the human-verified data; if rejected, the action is skipped or handled accordingly.
349
+
350
+ > 📂 For a complete working example, check out the [`tutorial
351
+ /hitl.md`](https://github.com/EvoAgentX/EvoAgentX/blob/615b06d29264f47e58a6780bd24f0e73cbf7deee/docs/tutorial/hitl.md)
352
+
353
+ ## Demo Video
354
+
355
+
356
+ [![Watch on YouTube](https://img.shields.io/badge/-Watch%20on%20YouTube-red?logo=youtube&labelColor=grey)](https://www.youtube.com/watch?v=Wu0ZydYDqgg)
357
+ [![Watch on Bilibili](https://img.shields.io/badge/-Watch%20on%20Bilibili-00A1D6?logo=bilibili&labelColor=white)](https://www.bilibili.com/video/BV1mEJizyE7H/?vd_source=02f8f3a7c8865b3af6378d9680393f5a)
358
+
359
+ <div align="center">
360
+ <video src="https://github.com/user-attachments/assets/906a6086-e98d-4df3-84b0-808020ddd520.mp4" autoplay loop muted playsinline width="600">
361
+ Your browser does not support the video tag.
362
+ </video>
363
+ </div>
364
+
365
+ In this demo, we showcase the workflow generation and execution capabilities of EvoAgentX through two examples:
366
+
367
+ - Application 1: Intelligent Job Recommendation from Resume
368
+ - Application 2: Visual Analysis of A-Share Stocks
369
+
370
+
371
+ ### ✨ Final Results
372
+
373
+ <table>
374
+ <tr>
375
+ <td align="center">
376
+ <img src="./assets/demo_result_1.png" width="400"><br>
377
+ <strong>Application&nbsp;1:</strong><br>Job Recommendation
378
+ </td>
379
+ <td align="center">
380
+ <img src="./assets/demo_result_2.jpeg" width="400"><br>
381
+ <strong>Application&nbsp;2:</strong><br>Stock Visual Analysis
382
+ </td>
383
+ </tr>
384
+ </table>
385
+
386
+ ## Evolution Algorithms
387
+
388
+ We have integrated some existing agent/workflow evolution algorithms into EvoAgentX, including [TextGrad](https://www.nature.com/articles/s41586-025-08661-4), [MIPRO](https://arxiv.org/abs/2406.11695) and [AFlow](https://arxiv.org/abs/2410.10762).
389
+
390
+ To evaluate the performance, we use them to optimize the same agent system on three different tasks: multi-hop QA (HotPotQA), code generation (MBPP) and reasoning (MATH). We randomly sample 50 examples for validation and other 100 examples for testing.
391
+
392
+ > Tip: We have integrated these benchmark and evaluation code in EvoAgentX. Please refer to the [benchmark and evaluation tutorial](https://github.com/EvoAgentX/EvoAgentX/blob/main/docs/tutorial/benchmark_and_evaluation.md) for more details.
393
+
394
+ ### 📊 Results
395
+
396
+ | Method | HotPotQA<br>(F1%) | MBPP<br>(Pass@1 %) | MATH<br>(Solve Rate %) |
397
+ |----------|--------------------|---------------------|--------------------------|
398
+ | Original | 63.58 | 69.00 | 66.00 |
399
+ | TextGrad | 71.02 | 71.00 | 76.00 |
400
+ | AFlow | 65.09 | 79.00 | 71.00 |
401
+ | MIPRO | 69.16 | 68.00 | 72.30
402
+
403
+ Please refer to the `examples/optimization` folder for more details.
404
+
405
+ ## Applications
406
+
407
+ We use our framework to optimize existing multi-agent systems on the [GAIA](https://huggingface.co/spaces/gaia-benchmark/leaderboard) benchmark. We select [Open Deep Research](https://github.com/huggingface/smolagents/tree/main/examples/open_deep_research) and [OWL](https://github.com/camel-ai/owl), two representative multi-agent framework from the GAIA leaderboard that is open-source and runnable.
408
+
409
+ We apply EvoAgentX to optimize their prompts. The performance of the optimized agents on the GAIA benchmark validation set is shown in the figure below.
410
+
411
+ <table>
412
+ <tr>
413
+ <td align="center" width="50%">
414
+ <img src="./assets/open_deep_research_optimization_report.png" alt="Open Deep Research Optimization" width="100%"><br>
415
+ <strong>Open Deep Research</strong>
416
+ </td>
417
+ <td align="center" width="50%">
418
+ <img src="./assets/owl_optimization_result.png" alt="OWL Optimization" width="100%"><br>
419
+ <strong>OWL Agent</strong>
420
+ </td>
421
+ </tr>
422
+ </table>
423
+
424
+ > Full Optimization Reports: [Open Deep Research](https://github.com/eax6/smolagents) and [OWL](https://github.com/TedSIWEILIU/owl).
425
+
426
+ ## Tutorial and Use Cases
427
+
428
+ > 💡 **New to EvoAgentX?** Start with the [Quickstart Guide](./docs/quickstart.md) for a step-by-step introduction.
429
+
430
+
431
+ Explore how to effectively use EvoAgentX with the following resources:
432
+
433
+ | Cookbook | Colab Notebook | Description |
434
+ |:---|:---|:---|
435
+ | **[Build Your First Agent](./docs/tutorial/first_agent.md)** | **[Build Your First Agent](./docs/ColabNotebook/tutorial_notebooks/first_agent.ipynb)** | Quickly create and manage agents with multi-action capabilities. |
436
+ | **[Build Your First Workflow](./docs/tutorial/first_workflow.md)** | **[Build Your First Workflow](./docs/ColabNotebook/tutorial_notebooks/first_workflow.ipynb)** | Learn to build collaborative workflows with multiple agents. |
437
+ | **[Working with Tools](./docs/tutorial/tools.md)** | **[Working with Tools](./docs/ColabNotebook/tutorial_notebooks/tools.ipynb)** | Master EvoAgentX's powerful tool ecosystem for agent interactions |
438
+ | **[Automatic Workflow Generation](./docs/quickstart.md#automatic-workflow-generation-and-execution)** | **[Automatic Workflow Generation](./docs/ColabNotebook/tutorial_notebooks/quickstart.ipynb)** | Automatically generate workflows from natural language goals. |
439
+ | **[Benchmark and Evaluation Tutorial](./docs/tutorial/benchmark_and_evaluation.md)** | **[Benchmark and Evaluation Tutorial](./docs/ColabNotebook/tutorial_notebooks/benchmark_and_evaluation.ipynb)** | Evaluate agent performance using benchmark datasets. |
440
+ | **[TextGrad Optimizer Tutorial](./docs/tutorial/textgrad_optimizer.md)** | **[TextGrad Optimizer Tutorial](./docs/ColabNotebook/tutorial_notebooks/textgrad_optimizer.ipynb)** | Automatically optimise the prompts within multi-agent workflow with TextGrad. |
441
+ | **[AFlow Optimizer Tutorial](./docs/tutorial/aflow_optimizer.md)** | **[AFlow Optimizer Tutorial](./docs/ColabNotebook/tutorial_notebooks/aflow_optimizer.ipynb)** | Automatically optimise both the prompts and structure of multi-agent workflow with AFlow. |
442
+ | **[Human-In-The-Loop support](./docs/tutorial/hitl.md)** | | Enable HITL functionalities in your WorkFlow.
443
+ <!-- | **[SEW Optimizer Tutorial](./docs/tutorial/sew_optimizer.md)** | Create SEW (Self-Evolving Workflows) to enhance agent systems. | -->
444
+
445
+ 🛠️ Follow the tutorials to build and optimize your EvoAgentX workflows.
446
+
447
+ 🚀 We're actively working on expanding our library of use cases and optimization strategies. **More coming soon — stay tuned!**
448
+
449
+ ## 🎯 Roadmap
450
+ - [ ] **Modularize Evolution Algorithms**: Abstract optimization algorithms into plug-and-play modules that can be easily integrated into custom workflows.
451
+ - [ ] **Develop Task Templates and Agent Modules**: Build reusable templates for typical tasks and standardized agent components to streamline application development.
452
+ - [ ] **Integrate Self-Evolving Agent Algorithms**: Incorporate more recent and advanced agent self-evolution across multiple dimensions, including prompt tuning, workflow structures, and memory modules.
453
+ - [ ] **Enable Visual Workflow Editing Interface**: Provide a visual interface for workflow structure display and editing to improve usability and debugging.
454
+
455
+
456
+
457
+ ## 🙋 Support
458
+
459
+ ### Join the Community
460
+
461
+ 📢 Stay connected and be part of the **EvoAgentX** journey!
462
+ 🚩 Join our community to get the latest updates, share your ideas, and collaborate with AI enthusiasts worldwide.
463
+
464
+ - [Discord](https://discord.gg/XWBZUJFwKe) — Chat, discuss, and collaborate in real-time.
465
+ - [X (formerly Twitter)](https://x.com/EvoAgentX) — Follow us for news, updates, and insights.
466
+ - [WeChat](https://github.com/EvoAgentX/EvoAgentX/blob/main/assets/wechat_info.md) — Connect with our Chinese community.
467
+
468
+ ### Add the meeting to your calendar
469
+
470
+ 📅 Click the link below to add the EvoAgentX Weekly Meeting (Sundays, 16:30–17:30 GMT+8) to your calendar:
471
+
472
+ 👉 [Add to your Google Calendar](https://calendar.google.com/calendar/u/0/r/eventedit?text=EvoAgentX+周会(腾讯会议)&dates=20250629T083000Z/20250629T093000Z&details=会议链接:https://meeting.tencent.com/dm/5UuNxo7Detz0&location=Online&recur=RRULE:FREQ=WEEKLY;BYDAY=SU;UNTIL=20270523T093000Z&ctz=Asia/Shanghai)
473
+
474
+ 👉 [Add to your Tencent Meeting](https://meeting.tencent.com/dm/5UuNxo7Detz0)
475
+
476
+ 👉 [Download the EvoAgentX_Weekly_Meeting.ics file](./EvoAgentX_Weekly_Meeting.ics)
477
+
478
+ ### Contact Information
479
+
480
+ If you have any questions or feedback about this project, please feel free to contact us. We highly appreciate your suggestions!
481
+
482
+ - **Email:** evoagentx.ai@gmail.com
483
+
484
+ We will respond to all questions within 2-3 business days.
485
+
486
+ ### Community Call
487
+ - [Bilibili](https://space.bilibili.com/3493105294641286/favlist?fid=3584589186&ftype=create&spm_id_from=333.788.0.0)
488
+ - [Youtube](https://studio.youtube.com/playlist/PL_kuPS05qA1hyU6cLX--bJ93Km2-md8AA/edit)
489
+ ## 🙌 Contributing to EvoAgentX
490
+ Thanks go to these awesome contributors
491
+
492
+ <a href="https://github.com/EvoAgentX/EvoAgentX/graphs/contributors">
493
+ <img src="https://contrib.rocks/image?repo=EvoAgentX/EvoAgentX" />
494
+ </a>
495
+
496
+ We appreciate your interest in contributing to our open-source initiative. We provide a document of [contributing guidelines](https://github.com/EvoAgentX/EvoAgentX/blob/main/CONTRIBUTING.md) which outlines the steps for contributing to EvoAgentX. Please refer to this guide to ensure smooth collaboration and successful contributions. 🤝🚀
497
+
498
+ [![Star History Chart](https://api.star-history.com/svg?repos=EvoAgentX/EvoAgentX&type=Date)](https://www.star-history.com/#EvoAgentX/EvoAgentX&Date)
499
+
500
+ ## 📖 Citation
501
+
502
+ Please consider citing our work if you find EvoAgentX helpful:
503
+
504
+ 📄 [EvoAgentX](https://arxiv.org/abs/2507.03616)
505
+ 📄 [Survey Paper](https://arxiv.org/abs/2508.07407)
506
+
507
+ ```bibtex
508
+ @article{wang2025evoagentx,
509
+ title={EvoAgentX: An Automated Framework for Evolving Agentic Workflows},
510
+ author={Wang, Yingxu and Liu, Siwei and Fang, Jinyuan and Meng, Zaiqiao},
511
+ journal={arXiv preprint arXiv:2507.03616},
512
+ year={2025}
513
+ }
514
+ @article{fang202survey,
515
+ title={A Comprehensive Survey of Self-Evolving AI Agents: A New Paradigm Bridging Foundation Models and Lifelong Agentic Systems},
516
+ author={Jinyuan Fang and Yanwen Peng and Xi Zhang and Yingxu Wang and Xinhao Yi and Guibin Zhang and Yi Xu and Bin Wu and Siwei Liu and Zihao Li and Zhaochun Ren and Nikos Aletras and Xi Wang and Han Zhou and Zaiqiao Meng},
517
+ year={2025},
518
+ journal={arXiv preprint arXiv:2508.07407},
519
+ url={https://arxiv.org/abs/2508.07407},
520
+ }
521
+ ```
522
+
523
+ ## 📚 Acknowledgements
524
+ This project builds upon several outstanding open-source projects: [AFlow](https://github.com/FoundationAgents/MetaGPT/tree/main/metagpt/ext/aflow), [TextGrad](https://github.com/zou-group/textgrad), [DSPy](https://github.com/stanfordnlp/dspy), [LiveCodeBench](https://github.com/LiveCodeBench/LiveCodeBench), and more. We would like to thank the developers and maintainers of these frameworks for their valuable contributions to the open-source community.
525
+
526
+ ## 📄 License
527
+
528
+ Source code in this repository is made available under the [MIT License](./LICENSE).