versionhq 1.2.2.5__tar.gz → 1.2.2.7__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 (156) hide show
  1. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.env.sample +4 -0
  2. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.github/workflows/run_tests.yml +3 -0
  3. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/PKG-INFO +47 -49
  4. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/README.md +45 -48
  5. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/agent/config.md +5 -10
  6. versionhq-1.2.2.7/docs/core/llm/index.md +66 -0
  7. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/task/task-strc-response.md +12 -11
  8. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/index.md +1 -1
  9. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/pyproject.toml +2 -1
  10. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/__init__.py +1 -1
  11. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent/model.py +15 -41
  12. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/llm/llm_vars.py +32 -73
  13. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/llm/model.py +62 -45
  14. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task/model.py +3 -3
  15. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq.egg-info/PKG-INFO +47 -49
  16. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq.egg-info/SOURCES.txt +3 -2
  17. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq.egg-info/requires.txt +1 -0
  18. versionhq-1.2.2.7/tests/__init__.py +39 -0
  19. versionhq-1.2.2.7/tests/_sample/sample.csv +241 -0
  20. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/agent/agent_test.py +29 -39
  21. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/agent/doc_test.py +6 -23
  22. {versionhq-1.2.2.5/tests/cli → versionhq-1.2.2.7/tests/knowledge}/__init__.py +0 -0
  23. {versionhq-1.2.2.5/tests/knowledge → versionhq-1.2.2.7/tests/llm}/__init__.py +0 -0
  24. versionhq-1.2.2.7/tests/llm/llm_connection_test.py +66 -0
  25. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/llm/llm_test.py +8 -0
  26. {versionhq-1.2.2.5/tests/llm → versionhq-1.2.2.7/tests/memory}/__init__.py +0 -0
  27. {versionhq-1.2.2.5/tests/memory → versionhq-1.2.2.7/tests/task}/__init__.py +0 -0
  28. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/task/doc_test.py +14 -59
  29. {versionhq-1.2.2.5/tests/task → versionhq-1.2.2.7/tests/task_graph}/__init__.py +0 -0
  30. {versionhq-1.2.2.5/tests/task_graph → versionhq-1.2.2.7/tests/tool}/__init__.py +0 -0
  31. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/usecase_test.py +16 -10
  32. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/uv.lock +86 -34
  33. versionhq-1.2.2.5/docs/core/llm/index.md +0 -103
  34. versionhq-1.2.2.5/tests/task/llm_connection_test.py +0 -106
  35. versionhq-1.2.2.5/tests/tool/__init__.py +0 -0
  36. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.github/workflows/deploy_docs.yml +0 -0
  37. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.github/workflows/publish.yml +0 -0
  38. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.github/workflows/publish_testpypi.yml +0 -0
  39. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.github/workflows/security_check.yml +0 -0
  40. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.gitignore +0 -0
  41. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.pre-commit-config.yaml +0 -0
  42. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/.python-version +0 -0
  43. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/LICENSE +0 -0
  44. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/SECURITY.md +0 -0
  45. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/db/preprocess.py +0 -0
  46. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/CNAME +0 -0
  47. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/_logos/favicon.ico +0 -0
  48. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/_logos/logo192.png +0 -0
  49. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/agent/index.md +0 -0
  50. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/agent/task-handling.md +0 -0
  51. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/agent-network/config.md +0 -0
  52. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/agent-network/form.md +0 -0
  53. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/agent-network/index.md +0 -0
  54. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/agent-network/ref.md +0 -0
  55. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/task/evaluation.md +0 -0
  56. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/task/index.md +0 -0
  57. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/task/response-field.md +0 -0
  58. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/task/task-execution.md +0 -0
  59. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/task/task-output.md +0 -0
  60. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/task/task-ref.md +0 -0
  61. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/task-graph/index.md +0 -0
  62. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/core/tool.md +0 -0
  63. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/quickstart.md +0 -0
  64. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/stylesheets/main.css +0 -0
  65. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/docs/tags.md +0 -0
  66. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/mkdocs.yml +0 -0
  67. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/requirements-dev.txt +0 -0
  68. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/requirements.txt +0 -0
  69. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/runtime.txt +0 -0
  70. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/setup.cfg +0 -0
  71. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/_utils/__init__.py +0 -0
  72. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/_utils/i18n.py +0 -0
  73. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/_utils/llm_as_a_judge.py +0 -0
  74. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/_utils/logger.py +0 -0
  75. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/_utils/process_config.py +0 -0
  76. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/_utils/usage_metrics.py +0 -0
  77. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/_utils/vars.py +0 -0
  78. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
  79. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
  80. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent/__init__.py +0 -0
  81. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent/inhouse_agents.py +0 -0
  82. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent/parser.py +0 -0
  83. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent/rpm_controller.py +0 -0
  84. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent_network/__init__.py +0 -0
  85. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent_network/formation.py +0 -0
  86. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/agent_network/model.py +0 -0
  87. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/cli/__init__.py +0 -0
  88. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/clients/__init__.py +0 -0
  89. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/clients/customer/__init__.py +0 -0
  90. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/clients/customer/model.py +0 -0
  91. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/clients/product/__init__.py +0 -0
  92. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/clients/product/model.py +0 -0
  93. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/clients/workflow/__init__.py +0 -0
  94. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/clients/workflow/model.py +0 -0
  95. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/knowledge/__init__.py +0 -0
  96. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/knowledge/_utils.py +0 -0
  97. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/knowledge/embedding.py +0 -0
  98. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/knowledge/model.py +0 -0
  99. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/knowledge/source.py +0 -0
  100. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/knowledge/source_docling.py +0 -0
  101. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/knowledge/storage.py +0 -0
  102. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/llm/__init__.py +0 -0
  103. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/memory/__init__.py +0 -0
  104. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/memory/contextual_memory.py +0 -0
  105. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/memory/model.py +0 -0
  106. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/storage/__init__.py +0 -0
  107. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/storage/base.py +0 -0
  108. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
  109. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/storage/mem0_storage.py +0 -0
  110. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/storage/rag_storage.py +0 -0
  111. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/storage/task_output_storage.py +0 -0
  112. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/storage/utils.py +0 -0
  113. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task/TEMPLATES/Description.py +0 -0
  114. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task/__init__.py +0 -0
  115. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task/evaluation.py +0 -0
  116. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task/formatter.py +0 -0
  117. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task/structured_response.py +0 -0
  118. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task_graph/__init__.py +0 -0
  119. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task_graph/colors.py +0 -0
  120. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task_graph/draft.py +0 -0
  121. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/task_graph/model.py +0 -0
  122. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/tool/__init__.py +0 -0
  123. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/tool/cache_handler.py +0 -0
  124. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/tool/composio_tool.py +0 -0
  125. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/tool/composio_tool_vars.py +0 -0
  126. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/tool/decorator.py +0 -0
  127. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/tool/model.py +0 -0
  128. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/tool/rag_tool.py +0 -0
  129. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq/tool/tool_handler.py +0 -0
  130. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq.egg-info/dependency_links.txt +0 -0
  131. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/src/versionhq.egg-info/top_level.txt +0 -0
  132. {versionhq-1.2.2.5/tests → versionhq-1.2.2.7/tests/_sample}/sample.json +0 -0
  133. {versionhq-1.2.2.5/tests → versionhq-1.2.2.7/tests/agent}/__init__.py +0 -0
  134. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/agent_network/Prompts/Demo_test.py +0 -0
  135. {versionhq-1.2.2.5/tests/agent → versionhq-1.2.2.7/tests/agent_network}/__init__.py +0 -0
  136. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/agent_network/agent_network_test.py +0 -0
  137. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/agent_network/doc_test.py +0 -0
  138. {versionhq-1.2.2.5/tests/agent_network → versionhq-1.2.2.7/tests/cli}/__init__.py +0 -0
  139. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/clients/customer_test.py +0 -0
  140. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/clients/product_test.py +0 -0
  141. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/clients/workflow_test.py +0 -0
  142. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/conftest.py +0 -0
  143. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/doc_test.py +0 -0
  144. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/formation_test.py +0 -0
  145. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/knowledge/knowledge_test.py +0 -0
  146. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/knowledge/mock_report_compressed.pdf +0 -0
  147. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/memory/memory_test.py +0 -0
  148. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/task/doc_taskoutput_test.py +0 -0
  149. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/task/eval_test.py +0 -0
  150. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/task/task_test.py +0 -0
  151. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/task_graph/doc_test.py +0 -0
  152. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/task_graph/task_graph_test.py +0 -0
  153. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/tool/composio_test.py +0 -0
  154. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/tool/doc_test.py +0 -0
  155. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/tool/rag_tool_test.py +0 -0
  156. {versionhq-1.2.2.5 → versionhq-1.2.2.7}/tests/tool/tool_test.py +0 -0
@@ -16,3 +16,7 @@ COMPOSIO_API_KEY=
16
16
  COMPOSIO_CLI_KEY=
17
17
 
18
18
  MEM0_API_KEY=
19
+
20
+ AWS_ACCESS_KEY_ID=
21
+ AWS_SECRET_ACCESS_KEY=
22
+ AWS_REGION_NAME=
@@ -17,6 +17,9 @@ env:
17
17
  DEFAULT_REDIRECT_URL: ${{ secrets.DEFAULT_REDIRECT_URL }}
18
18
  DEFAULT_USER_ID: ${{ secrets.DEFAULT_USER_ID }}
19
19
  MEM0_API_KEY: ${{ secrets.MEM0_API_KEY }}
20
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
21
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22
+ AWS_REGION_NAME: ${{ secrets.AWS_REGION_NAME }}
20
23
 
21
24
  jobs:
22
25
  run_test:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.2.5
3
+ Version: 1.2.2.7
4
4
  Summary: An agentic orchestration framework for building agent networks that handle task automation.
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -66,6 +66,7 @@ Requires-Dist: envoy>=0.0.3
66
66
  Requires-Dist: composio-core==0.7.0
67
67
  Requires-Dist: networkx>=3.4.2
68
68
  Requires-Dist: matplotlib>=3.10.0
69
+ Requires-Dist: boto3>=1.37.1
69
70
  Provides-Extra: docling
70
71
  Requires-Dist: docling>=2.17.0; extra == "docling"
71
72
  Provides-Extra: mem0ai
@@ -98,10 +99,10 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
98
99
 
99
100
  **Visit:**
100
101
 
101
- - [Playground](https://versi0n.io/playground)
102
+ - [Playground](https://versi0n.io/)
102
103
  - [Docs](https://docs.versi0n.io)
103
- - [Github Repository](https://github.com/versionHQ/multi-agent-system)
104
- - [PyPI](https://pypi.org/project/versionhq/)
104
+ - [Github](https://github.com/versionHQ/)
105
+ - [Python SDK](https://pypi.org/project/versionhq/)
105
106
 
106
107
  <hr />
107
108
 
@@ -116,9 +117,10 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
116
117
  - [Optimization](#optimization)
117
118
  - [Quick Start](#quick-start)
118
119
  - [Package installation](#package-installation)
119
- - [Forming a agent network](#forming-a-agent-network)
120
- - [Executing tasks](#executing-tasks)
121
- - [Supervising](#supervising)
120
+ - [Launching an agent](#launching-an-agent)
121
+ - [Automating workflows](#automating-workflows)
122
+ - [Executing a single task](#executing-a-single-task)
123
+ - [Supervising agents](#supervising-agents)
122
124
  - [Technologies Used](#technologies-used)
123
125
  - [Project Structure](#project-structure)
124
126
  - [Setting Up Your Project](#setting-up-your-project)
@@ -141,7 +143,7 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
141
143
 
142
144
  `versionhq` is a Python framework for agent networks that handle complex task automation without human interaction.
143
145
 
144
- Agents are model-agnostic, and will improve task output, while oprimizing token cost and job latency, by sharing their memory, knowledge base, and RAG tools with other agents in the network.
146
+ Agents are model-agnostic, and will improve task output, while optimizing token cost and job latency, by sharing their memory, knowledge base, and RAG tools with other agents in the network.
145
147
 
146
148
 
147
149
  ### Agent Network
@@ -246,33 +248,45 @@ agent.update(
246
248
 
247
249
  ### Package installation
248
250
 
249
- ```
250
- pip install versionhq
251
- ```
251
+ ```
252
+ pip install versionhq
253
+ ```
252
254
 
253
255
  (Python 3.11 / 3.12)
254
256
 
255
- ### Forming a agent network
256
257
 
257
- ```python
258
- import versionhq as vhq
258
+ ### Launching an agent
259
259
 
260
- network = work(
261
- task="YOUR AMAZING TASK OVERVIEW",
262
- expected_outcome="YOUR OUTCOME EXPECTATION",
263
- )
264
- res, tg = network.launch()
265
- ```
266
260
 
267
- This will form a agent network with multiple agents on `Formation` and return response in `TaskOutput` object and `TaskGraph` that connects multiple tasks as nodes.
261
+ ```python
262
+ import versionhq as vhq
268
263
 
264
+ agent = vhq.Agent(role="Marketer")
265
+ res = agent.start()
266
+
267
+ assert isinstance(res, vhq.TaskOutput) # contains agent's response in text, JSON, Pydantic formats with usage recordes and eval scores.
268
+ ```
269
269
 
270
- ### Executing tasks
271
270
 
272
- You can simply build an agent using `Agent` model and execute the task using `Task` class.
271
+ ### Automating workflows
273
272
 
274
- By default, agents prioritize JSON over plane text outputs.
273
+ ```python
274
+ import versionhq as vhq
275
275
 
276
+ network = vhq.form_agent_network(
277
+ task="draft a promo plan",
278
+ expected_outcome="marketing plan, budget, KPI targets",
279
+ )
280
+ res, tg = network.launch()
281
+
282
+ assert isinstance(res, vhq.TaskOutput) # the latest output from the workflow
283
+ assert isinstance(tg, vhq.TaskGraph) # contains task nodes and edges that connect the nodes with dep-met conditions
284
+ ```
285
+
286
+
287
+ ### Executing a single task
288
+
289
+ You can simply build and execute a task using `Task` class.
276
290
 
277
291
  ```python
278
292
  import versionhq as vhq
@@ -292,34 +306,20 @@ task = vhq.Task(
292
306
  callback_kwargs=dict(message="Hi! Here is the result: ")
293
307
  )
294
308
 
295
- res = task.execute(context="context to consider")
296
-
309
+ res = task.execute(context="testing a task function")
297
310
  assert isinstance(res, vhq.TaskOutput)
298
311
  ```
299
312
 
300
- This will return a `TaskOutput` object that stores response in plane text, JSON, and Pydantic model: `CustomOutput` formats with a callback result, tool output (if given), and evaluation results (if given).
301
313
 
302
- ```python
303
- res == vhq.TaskOutput(
304
- task_id=UUID('<TASK UUID>'),
305
- raw='{\"test1\":\"random str\", \"test2\":[\"str item 1\", \"str item 2\", \"str item 3\"]}',
306
- json_dict={'test1': 'random str', 'test2': ['str item 1', 'str item 2', 'str item 3']},
307
- pydantic=<class '__main__.CustomOutput'>,
308
- tool_output=None,
309
- callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3', # returned a plain text summary
310
- evaluation=None
311
- )
312
- ```
313
-
314
- ### Supervising
314
+ ### Supervising agents
315
315
 
316
316
  To create an agent network with one or more manager agents, designate members using the `is_manager` tag.
317
317
 
318
318
  ```python
319
319
  import versionhq as vhq
320
320
 
321
- agent_a = vhq.Agent(role="agent a", llm="llm-of-your-choice")
322
- agent_b = vhq.Agent(role="agent b", llm="llm-of-your-choice")
321
+ agent_a = vhq.Agent(role="Member", llm="gpt-4o")
322
+ agent_b = vhq.Agent(role="Leader", llm="gemini-2.0")
323
323
 
324
324
  task_1 = vhq.Task(
325
325
  description="Analyze the client's business model.",
@@ -341,11 +341,9 @@ network =vhq.AgentNetwork(
341
341
  )
342
342
  res, tg = network.launch()
343
343
 
344
- assert isinstance(res, vhq.TaskOutput)
345
- assert agent_b.key in task_1.processed_agents
346
- assert agent_b.key in task_2.processed_agents
347
-
348
- assert isinstance(tg, vhq.TaskGraph)
344
+ assert isinstance(res, vhq.NetworkOutput)
345
+ assert not [item for item in task_1.processed_agents if "vhq-Delegated-Agent" == item]
346
+ assert [item for item in task_1.processed_agents if "agent b" == item]
349
347
  ```
350
348
 
351
349
  This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
@@ -509,7 +507,7 @@ Create `.env` file in the project root and add secret vars following `.env.sampl
509
507
 
510
508
  * Test functions within the files must begin with `test_`.
511
509
 
512
- * Pytest priorities are `1. playground demo > 2. docs use cases > 3. other features`
510
+ * Pytest priorities are `1. playground > 2. docs use cases > 3. other features`
513
511
 
514
512
 
515
513
  4. Update `docs` accordingly.
@@ -597,4 +595,4 @@ Common issues and solutions:
597
595
  ## Frequently Asked Questions (FAQ)
598
596
  **Q. Where can I see if the agent is working?**
599
597
 
600
- A. Visit [playground](https://versi0n.io/playground).
598
+ A. Visit [playground](https://versi0n.io).
@@ -12,10 +12,10 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
12
12
 
13
13
  **Visit:**
14
14
 
15
- - [Playground](https://versi0n.io/playground)
15
+ - [Playground](https://versi0n.io/)
16
16
  - [Docs](https://docs.versi0n.io)
17
- - [Github Repository](https://github.com/versionHQ/multi-agent-system)
18
- - [PyPI](https://pypi.org/project/versionhq/)
17
+ - [Github](https://github.com/versionHQ/)
18
+ - [Python SDK](https://pypi.org/project/versionhq/)
19
19
 
20
20
  <hr />
21
21
 
@@ -30,9 +30,10 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
30
30
  - [Optimization](#optimization)
31
31
  - [Quick Start](#quick-start)
32
32
  - [Package installation](#package-installation)
33
- - [Forming a agent network](#forming-a-agent-network)
34
- - [Executing tasks](#executing-tasks)
35
- - [Supervising](#supervising)
33
+ - [Launching an agent](#launching-an-agent)
34
+ - [Automating workflows](#automating-workflows)
35
+ - [Executing a single task](#executing-a-single-task)
36
+ - [Supervising agents](#supervising-agents)
36
37
  - [Technologies Used](#technologies-used)
37
38
  - [Project Structure](#project-structure)
38
39
  - [Setting Up Your Project](#setting-up-your-project)
@@ -55,7 +56,7 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
55
56
 
56
57
  `versionhq` is a Python framework for agent networks that handle complex task automation without human interaction.
57
58
 
58
- Agents are model-agnostic, and will improve task output, while oprimizing token cost and job latency, by sharing their memory, knowledge base, and RAG tools with other agents in the network.
59
+ Agents are model-agnostic, and will improve task output, while optimizing token cost and job latency, by sharing their memory, knowledge base, and RAG tools with other agents in the network.
59
60
 
60
61
 
61
62
  ### Agent Network
@@ -160,33 +161,45 @@ agent.update(
160
161
 
161
162
  ### Package installation
162
163
 
163
- ```
164
- pip install versionhq
165
- ```
164
+ ```
165
+ pip install versionhq
166
+ ```
166
167
 
167
168
  (Python 3.11 / 3.12)
168
169
 
169
- ### Forming a agent network
170
170
 
171
- ```python
172
- import versionhq as vhq
171
+ ### Launching an agent
173
172
 
174
- network = work(
175
- task="YOUR AMAZING TASK OVERVIEW",
176
- expected_outcome="YOUR OUTCOME EXPECTATION",
177
- )
178
- res, tg = network.launch()
179
- ```
180
173
 
181
- This will form a agent network with multiple agents on `Formation` and return response in `TaskOutput` object and `TaskGraph` that connects multiple tasks as nodes.
174
+ ```python
175
+ import versionhq as vhq
182
176
 
177
+ agent = vhq.Agent(role="Marketer")
178
+ res = agent.start()
179
+
180
+ assert isinstance(res, vhq.TaskOutput) # contains agent's response in text, JSON, Pydantic formats with usage recordes and eval scores.
181
+ ```
183
182
 
184
- ### Executing tasks
185
183
 
186
- You can simply build an agent using `Agent` model and execute the task using `Task` class.
184
+ ### Automating workflows
187
185
 
188
- By default, agents prioritize JSON over plane text outputs.
186
+ ```python
187
+ import versionhq as vhq
189
188
 
189
+ network = vhq.form_agent_network(
190
+ task="draft a promo plan",
191
+ expected_outcome="marketing plan, budget, KPI targets",
192
+ )
193
+ res, tg = network.launch()
194
+
195
+ assert isinstance(res, vhq.TaskOutput) # the latest output from the workflow
196
+ assert isinstance(tg, vhq.TaskGraph) # contains task nodes and edges that connect the nodes with dep-met conditions
197
+ ```
198
+
199
+
200
+ ### Executing a single task
201
+
202
+ You can simply build and execute a task using `Task` class.
190
203
 
191
204
  ```python
192
205
  import versionhq as vhq
@@ -206,34 +219,20 @@ task = vhq.Task(
206
219
  callback_kwargs=dict(message="Hi! Here is the result: ")
207
220
  )
208
221
 
209
- res = task.execute(context="context to consider")
210
-
222
+ res = task.execute(context="testing a task function")
211
223
  assert isinstance(res, vhq.TaskOutput)
212
224
  ```
213
225
 
214
- This will return a `TaskOutput` object that stores response in plane text, JSON, and Pydantic model: `CustomOutput` formats with a callback result, tool output (if given), and evaluation results (if given).
215
226
 
216
- ```python
217
- res == vhq.TaskOutput(
218
- task_id=UUID('<TASK UUID>'),
219
- raw='{\"test1\":\"random str\", \"test2\":[\"str item 1\", \"str item 2\", \"str item 3\"]}',
220
- json_dict={'test1': 'random str', 'test2': ['str item 1', 'str item 2', 'str item 3']},
221
- pydantic=<class '__main__.CustomOutput'>,
222
- tool_output=None,
223
- callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3', # returned a plain text summary
224
- evaluation=None
225
- )
226
- ```
227
-
228
- ### Supervising
227
+ ### Supervising agents
229
228
 
230
229
  To create an agent network with one or more manager agents, designate members using the `is_manager` tag.
231
230
 
232
231
  ```python
233
232
  import versionhq as vhq
234
233
 
235
- agent_a = vhq.Agent(role="agent a", llm="llm-of-your-choice")
236
- agent_b = vhq.Agent(role="agent b", llm="llm-of-your-choice")
234
+ agent_a = vhq.Agent(role="Member", llm="gpt-4o")
235
+ agent_b = vhq.Agent(role="Leader", llm="gemini-2.0")
237
236
 
238
237
  task_1 = vhq.Task(
239
238
  description="Analyze the client's business model.",
@@ -255,11 +254,9 @@ network =vhq.AgentNetwork(
255
254
  )
256
255
  res, tg = network.launch()
257
256
 
258
- assert isinstance(res, vhq.TaskOutput)
259
- assert agent_b.key in task_1.processed_agents
260
- assert agent_b.key in task_2.processed_agents
261
-
262
- assert isinstance(tg, vhq.TaskGraph)
257
+ assert isinstance(res, vhq.NetworkOutput)
258
+ assert not [item for item in task_1.processed_agents if "vhq-Delegated-Agent" == item]
259
+ assert [item for item in task_1.processed_agents if "agent b" == item]
263
260
  ```
264
261
 
265
262
  This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
@@ -423,7 +420,7 @@ Create `.env` file in the project root and add secret vars following `.env.sampl
423
420
 
424
421
  * Test functions within the files must begin with `test_`.
425
422
 
426
- * Pytest priorities are `1. playground demo > 2. docs use cases > 3. other features`
423
+ * Pytest priorities are `1. playground > 2. docs use cases > 3. other features`
427
424
 
428
425
 
429
426
  4. Update `docs` accordingly.
@@ -511,4 +508,4 @@ Common issues and solutions:
511
508
  ## Frequently Asked Questions (FAQ)
512
509
  **Q. Where can I see if the agent is working?**
513
510
 
514
- A. Visit [playground](https://versi0n.io/playground).
511
+ A. Visit [playground](https://versi0n.io).
@@ -11,11 +11,7 @@ By default, when the model provider name is provided, we will select the most co
11
11
  ```python
12
12
  import versionhq as vhq
13
13
 
14
- agent = vhq.Agent(
15
- role="Marketing Analyst",
16
- goal="Coping with price competition in saturated markets",
17
- llm="gemini-2.0"
18
- )
14
+ agent = vhq.Agent(role="Marketing Analyst", llm="gemini-2.0")
19
15
  ```
20
16
 
21
17
  <hr/>
@@ -34,7 +30,6 @@ import versionhq as vhq
34
30
 
35
31
  agent = vhq.Agent(
36
32
  role="Marketing Analyst",
37
- goal="Coping with increased price competition in saturated markets.",
38
33
  respect_context_window=False,
39
34
  max_execution_time=60,
40
35
  max_rpm=5,
@@ -48,10 +43,10 @@ agent = vhq.Agent(
48
43
  )
49
44
 
50
45
  assert isinstance(agent.llm, vhq.LLM)
51
- assert agent.llm.temperature == 1
52
- assert agent.llm.top_p == 0.1
53
- assert agent.llm.n == 1
54
- assert agent.llm.stop == "answer"
46
+ assert agent.llm.llm_config["temperature"] == 1
47
+ assert agent.llm.llm_config["top_p"] == 0.1
48
+ assert agent.llm.llm_config["n"] == 1
49
+ assert agent.llm.llm_config["stop"] == "answer"
55
50
  ```
56
51
 
57
52
  <hr>
@@ -0,0 +1,66 @@
1
+ ---
2
+ tags:
3
+ - Agent Network
4
+ ---
5
+
6
+ # LLM
7
+
8
+ <class>`class` versionhq.llm.model.<bold>LLM<bold></class>
9
+
10
+ A Pydantic class to store LLM objects and its task handling rules.
11
+
12
+ You can specify a model and integration platform from the list. Else, we'll use `gemini` or `gpt` via `LiteLLM` by default.
13
+
14
+
15
+ **List of available models**
16
+
17
+ ```python
18
+ "openai": [
19
+ "gpt-4",
20
+ "gpt-4o",
21
+ "gpt-4o-mini",
22
+ "o1-mini",
23
+ "o1-preview",
24
+ ],
25
+ "gemini": [
26
+ "gemini/gemini-1.5-flash",
27
+ "gemini/gemini-1.5-pro",
28
+ "gemini/gemini-2.0-flash-exp",
29
+ ],
30
+ "anthropic": [
31
+ "claude-3-7-sonnet-latest",
32
+ "claude-3-5-haiku-latest",
33
+ "claude-3-5-sonnet-latest",
34
+ "claude-3-opus-latest",
35
+ ],
36
+ "openrouter": [
37
+ "openrouter/deepseek/deepseek-r1",
38
+ "openrouter/qwen/qwen-2.5-72b-instruct",
39
+ "openrouter/google/gemini-2.0-flash-thinking-exp:free",
40
+ "openrouter/google/gemini-2.0-flash-thinking-exp-1219:free",
41
+ "openrouter/google/gemini-2.0-flash-001",
42
+ "openrouter/meta-llama/llama-3.3-70b-instruct",
43
+ "openrouter/mistralai/mistral-large-2411",
44
+ "openrouter/cohere/command-r-plus",
45
+ "openrouter/databricks/dbrx-instruct",
46
+ ],
47
+ "bedrock": [
48
+ "bedrock/converse/us.meta.llama3-3-70b-instruct-v1:0",
49
+ "bedrock/us.meta.llama3-2-1b-instruct-v1:0",
50
+ "bedrock/us.meta.llama3-2-3b-instruct-v1:0",
51
+ "bedrock/us.meta.llama3-2-11b-instruct-v1:0",
52
+ "bedrock/mistral.mistral-7b-instruct-v0:2",
53
+ "bedrock/mistral.mixtral-8x7b-instruct-v0:1",
54
+ "bedrock/mistral.mistral-large-2407-v1:0",
55
+ "bedrock/amazon.titan-text-lite-v1",
56
+ "bedrock/amazon.titan-text-express-v1",
57
+ "bedrock/amazon.titan-text-premier-v1:0",
58
+ "bedrock/cohere.command-r-plus-v1:0",
59
+ "bedrock/cohere.command-r-v1:0",
60
+ "bedrock/cohere.command-text-v14",
61
+ "bedrock/cohere.command-light-text-v14",
62
+ ],
63
+ "huggingface": [
64
+ "huggingface/qwen/qwen2.5-VL-72B-Instruct",
65
+ ]
66
+ ```
@@ -165,7 +165,7 @@ import versionhq as vhq
165
165
  from pydantic import BaseModel
166
166
  from typing import Any
167
167
 
168
- # 1. Define and execute a sub task with Pydantic output.
168
+ # 1. Defines a sub task
169
169
  class Sub(BaseModel):
170
170
  sub1: list[dict[str, Any]]
171
171
  sub2: dict[str, Any]
@@ -176,27 +176,28 @@ sub_task = vhq.Task(
176
176
  )
177
177
  sub_res = sub_task.execute()
178
178
 
179
- # 2. Define a main task, callback function to format the final response.
179
+ # 2. Defines a main task with callbacks
180
180
  class Main(BaseModel):
181
- main1: list[Any] # <= assume expecting to store Sub object in this field.
182
- # error_main1: list[InstanceOf[Sub]] # as this will trigger 400 error!
181
+ main1: list[Any] # <= assume expecting to store Sub object.
183
182
  main2: dict[str, Any]
184
183
 
185
- def format_response(sub: InstanceOf[Sub], main1: list[Any], main2: dict[str, Any]) -> Main:
186
- main1.append(sub)
184
+ def format_response(sub, main1, main2) -> Main:
185
+ if main1:
186
+ main1.append(sub)
187
187
  main = Main(main1=main1, main2=main2)
188
188
  return main
189
189
 
190
- # 3. Execute
190
+ # 3. Executes
191
191
  main_task = vhq.Task(
192
- description="generate random values that strictly follows the given format",
192
+ description="generate random values that strictly follows the given format.",
193
193
  pydantic_output=Main,
194
194
  callback=format_response,
195
- callback_kwargs=dict(sub=Sub(sub1=sub_res.pydantic.sub1, sub2=sub_res.pydantic.sub2)),
195
+ callback_kwargs=dict(sub=sub_res.json_dict),
196
196
  )
197
- res = main_task.execute(context=sub_res.raw) # [Optional] Adding sub_task as a context.
197
+ res = main_task.execute(context=sub_res.raw) # [Optional] Adding sub_task's response as context.
198
198
 
199
- assert [item for item in res.callback_output.main1 if isinstance(item, Sub)]
199
+ assert res.callback_output.main1 is not None
200
+ assert res.callback_output.main2 is not None
200
201
  ```
201
202
 
202
203
  To automate these manual setups, refer to <a href="/core/agent-network">AgentNetwork</a> class.
@@ -25,7 +25,7 @@ A Python framework for agentic orchestration that handles complex task automatio
25
25
 
26
26
  `versionhq` is a Python framework for agent networks that handle complex task automation without human interaction.
27
27
 
28
- Agents are model-agnostic, and will improve task output, while oprimizing token cost and job latency, by sharing their memory, knowledge base, and RAG tools with other agents in the network.
28
+ Agents are model-agnostic, and will improve task output, while optimizing token cost and job latency, by sharing their memory, knowledge base, and RAG tools with other agents in the network.
29
29
 
30
30
 
31
31
  ### Agent Network
@@ -15,7 +15,7 @@ exclude = ["test*", "__pycache__", "*.egg-info"]
15
15
 
16
16
  [project]
17
17
  name = "versionhq"
18
- version = "1.2.2.5"
18
+ version = "1.2.2.7"
19
19
  authors = [{ name = "Kuriko Iwai", email = "kuriko@versi0n.io" }]
20
20
  description = "An agentic orchestration framework for building agent networks that handle task automation."
21
21
  readme = "README.md"
@@ -46,6 +46,7 @@ dependencies = [
46
46
  "composio-core==0.7.0",
47
47
  "networkx>=3.4.2",
48
48
  "matplotlib>=3.10.0",
49
+ "boto3>=1.37.1",
49
50
  ]
50
51
  classifiers = [
51
52
  "Programming Language :: Python",
@@ -32,7 +32,7 @@ from versionhq.agent_network.formation import form_agent_network
32
32
  from versionhq.task_graph.draft import workflow
33
33
 
34
34
 
35
- __version__ = "1.2.2.5"
35
+ __version__ = "1.2.2.7"
36
36
  __all__ = [
37
37
  "Agent",
38
38
 
@@ -68,10 +68,10 @@ class Agent(BaseModel):
68
68
  # llm settings cascaded to the LLM model
69
69
  llm: str | InstanceOf[LLM] | Dict[str, Any] = Field(default=None)
70
70
  func_calling_llm: str | InstanceOf[LLM] | Dict[str, Any] = Field(default=None)
71
- respect_context_window: bool = Field(default=True,description="keep messages under the context window size")
71
+ respect_context_window: bool = Field(default=True, description="keep messages under the context window size")
72
72
  max_execution_time: Optional[int] = Field(default=None, description="max. task execution time in seconds")
73
73
  max_rpm: Optional[int] = Field(default=None, description="max. number of requests per minute")
74
- llm_config: Optional[Dict[str, Any]] = Field(default=None, description="other llm config cascaded to the LLM model")
74
+ llm_config: Optional[Dict[str, Any]] = Field(default=None, description="other llm config cascaded to the LLM class")
75
75
 
76
76
  # # cache, error, ops handling
77
77
  # formatting_errors: int = Field(default=0, description="number of formatting errors.")
@@ -276,8 +276,8 @@ class Agent(BaseModel):
276
276
  return self._set_llm_params(llm=llm, config=self.llm_config)
277
277
 
278
278
  case str():
279
- llm_obj = LLM(model=llm)
280
- return self._set_llm_params(llm=llm_obj, config=self.llm_config)
279
+ llm = LLM(model=llm)
280
+ return self._set_llm_params(llm=llm, config=self.llm_config)
281
281
 
282
282
  case dict():
283
283
  model_name = llm.pop("model_name", llm.pop("deployment_name", str(llm)))
@@ -287,53 +287,21 @@ class Agent(BaseModel):
287
287
 
288
288
  case _:
289
289
  model_name = (getattr(self.llm, "model_name") or getattr(self.llm, "deployment_name") or str(self.llm))
290
- llm_obj = LLM(model=model_name if model_name else DEFAULT_MODEL_NAME)
290
+ llm = LLM(model=model_name if model_name else DEFAULT_MODEL_NAME)
291
291
  llm_params = {
292
- "max_tokens": (getattr(llm, "max_tokens") or 3000),
293
292
  "timeout": getattr(llm, "timeout", self.max_execution_time),
294
293
  "callbacks": getattr(llm, "callbacks", None),
295
- "temperature": getattr(llm, "temperature", None),
296
- "logprobs": getattr(llm, "logprobs", None),
297
- "api_key": getattr(llm, "api_key", os.environ.get("LITELLM_API_KEY", None)),
294
+ "llm_config": getattr(llm, "llm_config", None),
298
295
  "base_url": getattr(llm, "base_url", None),
299
296
  }
300
297
  config = llm_params.update(self.llm_config) if self.llm_config else llm_params
301
- return self._set_llm_params(llm=llm_obj, config=config)
298
+ return self._set_llm_params(llm=llm, config=config)
302
299
 
303
300
 
304
301
  def _set_llm_params(self, llm: LLM, config: Dict[str, Any] = None) -> LLM:
305
302
  """
306
303
  Add valid params to the LLM object.
307
304
  """
308
-
309
- import litellm
310
- from versionhq.llm.llm_vars import PARAMS
311
-
312
- valid_config = {k: v for k, v in config.items() if v} if config else {}
313
-
314
- if valid_config:
315
- valid_keys = list()
316
- try:
317
- valid_keys = litellm.get_supported_openai_params(model=llm.model, custom_llm_provider=self.endpoint_provider, request_type="chat_completion")
318
- if not valid_keys:
319
- valid_keys = PARAMS.get("common")
320
- except:
321
- valid_keys = PARAMS.get("common")
322
-
323
- valid_keys += PARAMS.get("litellm")
324
-
325
- for key in valid_keys:
326
- if key in valid_config and valid_config[key]:
327
- val = valid_config[key]
328
- if [key == k for k, v in LLM.model_fields.items()]:
329
- setattr(llm, key, val)
330
- else:
331
- llm.other_valid_config.update({ key: val})
332
-
333
-
334
- llm.timeout = self.max_execution_time if llm.timeout is None else llm.timeout
335
- # llm.max_tokens = self.max_tokens if self.max_tokens else llm.max_tokens
336
-
337
305
  if llm.provider is None:
338
306
  provider_name = llm.model.split("/")[0]
339
307
  valid_provider = provider_name if provider_name in PROVIDERS else None
@@ -346,6 +314,12 @@ class Agent(BaseModel):
346
314
  if self.respect_context_window == False:
347
315
  llm.context_window_size = DEFAULT_CONTEXT_WINDOW_SIZE
348
316
 
317
+ llm.timeout = self.max_execution_time if llm.timeout is None else llm.timeout
318
+
319
+ if config:
320
+ llm.llm_config = {k: v for k, v in config.items() if v or v == False}
321
+ llm.setup_config()
322
+
349
323
  return llm
350
324
 
351
325
 
@@ -494,7 +468,7 @@ class Agent(BaseModel):
494
468
  Defines and executes a task when it is not given and returns TaskOutput object.
495
469
  """
496
470
 
497
- if not self.role or not self.goal:
471
+ if not self.role:
498
472
  return None
499
473
 
500
474
  from versionhq.task.model import Task
@@ -504,7 +478,7 @@ class Agent(BaseModel):
504
478
  steps: list[str]
505
479
 
506
480
  task = Task(
507
- description=f"Generate a simple result in a sentence to achieve the goal: {self.goal}. If needed, list up necessary steps in concise manner.",
481
+ description=f"Generate a simple result in a sentence to achieve the goal: {self.goal if self.goal else self.role}. If needed, list up necessary steps in concise manner.",
508
482
  pydantic_output=Output,
509
483
  tool_res_as_final=tool_res_as_final,
510
484
  )