versionhq 1.2.0.3__tar.gz → 1.2.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 (134) hide show
  1. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/PKG-INFO +23 -12
  2. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/README.md +20 -7
  3. versionhq-1.2.1.0/docs/core/task/response-field.md +211 -0
  4. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/core/task/task-output.md +1 -1
  5. versionhq-1.2.1.0/docs/core/task-graph.md +83 -0
  6. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/core/task.md +28 -10
  7. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/index.md +24 -5
  8. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/mkdocs.yml +1 -0
  9. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/pyproject.toml +3 -7
  10. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/__init__.py +2 -2
  11. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/_utils/logger.py +1 -1
  12. {versionhq-1.2.0.3/src/versionhq/llm → versionhq-1.2.1.0/src/versionhq/graph}/__init__.py +0 -0
  13. {versionhq-1.2.0.3/src/versionhq/network → versionhq-1.2.1.0/src/versionhq/graph}/model.py +175 -117
  14. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/knowledge/source.py +1 -1
  15. {versionhq-1.2.0.3/src/versionhq/network → versionhq-1.2.1.0/src/versionhq/memory}/__init__.py +0 -0
  16. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/task/formation.py +2 -2
  17. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/task/model.py +8 -9
  18. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/team/model.py +38 -60
  19. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq.egg-info/PKG-INFO +23 -12
  20. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq.egg-info/SOURCES.txt +6 -5
  21. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq.egg-info/requires.txt +2 -6
  22. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/formation_test.py +1 -1
  23. {versionhq-1.2.0.3/tests/network → versionhq-1.2.1.0/tests/graph}/doc_test.py +10 -4
  24. versionhq-1.2.1.0/tests/graph/graph_test.py +6 -0
  25. {versionhq-1.2.0.3/tests/llm → versionhq-1.2.1.0/tests/knowledge}/__init__.py +0 -0
  26. {versionhq-1.2.0.3/tests/memory → versionhq-1.2.1.0/tests/llm}/__init__.py +0 -0
  27. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/task/doc_test.py +1 -1
  28. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/team/team_test.py +3 -3
  29. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/uv.lock +35 -35
  30. versionhq-1.2.0.3/docs/core/task/response-field.md +0 -14
  31. versionhq-1.2.0.3/tests/network/network_test.py +0 -0
  32. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/.github/workflows/deploy_docs.yml +0 -0
  33. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/.github/workflows/publish.yml +0 -0
  34. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/.github/workflows/publish_testpypi.yml +0 -0
  35. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/.github/workflows/run_tests.yml +0 -0
  36. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/.github/workflows/security_check.yml +0 -0
  37. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/.gitignore +0 -0
  38. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/.pre-commit-config.yaml +0 -0
  39. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/.python-version +0 -0
  40. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/LICENSE +0 -0
  41. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/SECURITY.md +0 -0
  42. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/db/preprocess.py +0 -0
  43. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/CNAME +0 -0
  44. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/_logos/favicon.ico +0 -0
  45. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/_logos/logo192.png +0 -0
  46. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/core/Agent.md +0 -0
  47. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/core/tool.md +0 -0
  48. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/quickstart.md +0 -0
  49. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/docs/stylesheets/main.css +0 -0
  50. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/requirements-dev.txt +0 -0
  51. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/requirements.txt +0 -0
  52. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/runtime.txt +0 -0
  53. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/setup.cfg +0 -0
  54. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/_utils/__init__.py +0 -0
  55. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/_utils/i18n.py +0 -0
  56. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/_utils/process_config.py +0 -0
  57. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/_utils/usage_metrics.py +0 -0
  58. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/_utils/vars.py +0 -0
  59. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
  60. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
  61. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/agent/__init__.py +0 -0
  62. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/agent/inhouse_agents.py +0 -0
  63. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/agent/model.py +0 -0
  64. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/agent/parser.py +0 -0
  65. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/agent/rpm_controller.py +0 -0
  66. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/cli/__init__.py +0 -0
  67. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/clients/__init__.py +0 -0
  68. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/clients/customer/__init__.py +0 -0
  69. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/clients/customer/model.py +0 -0
  70. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/clients/product/__init__.py +0 -0
  71. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/clients/product/model.py +0 -0
  72. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/clients/workflow/__init__.py +0 -0
  73. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/clients/workflow/model.py +0 -0
  74. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/knowledge/__init__.py +0 -0
  75. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/knowledge/_utils.py +0 -0
  76. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/knowledge/embedding.py +0 -0
  77. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/knowledge/model.py +0 -0
  78. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/knowledge/source_docling.py +0 -0
  79. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/knowledge/storage.py +0 -0
  80. {versionhq-1.2.0.3/src/versionhq/memory → versionhq-1.2.1.0/src/versionhq/llm}/__init__.py +0 -0
  81. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/llm/llm_vars.py +0 -0
  82. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/llm/model.py +0 -0
  83. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/memory/contextual_memory.py +0 -0
  84. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/memory/model.py +0 -0
  85. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/storage/__init__.py +0 -0
  86. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/storage/base.py +0 -0
  87. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
  88. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/storage/mem0_storage.py +0 -0
  89. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/storage/rag_storage.py +0 -0
  90. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/storage/task_output_storage.py +0 -0
  91. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/storage/utils.py +0 -0
  92. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/task/TEMPLATES/Description.py +0 -0
  93. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/task/__init__.py +0 -0
  94. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/task/evaluate.py +0 -0
  95. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/task/formatter.py +0 -0
  96. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/task/log_handler.py +0 -0
  97. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/task/structured_response.py +0 -0
  98. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/team/__init__.py +0 -0
  99. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/team/team_planner.py +0 -0
  100. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/tool/__init__.py +0 -0
  101. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/tool/cache_handler.py +0 -0
  102. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/tool/composio_tool.py +0 -0
  103. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/tool/composio_tool_vars.py +0 -0
  104. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/tool/decorator.py +0 -0
  105. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/tool/model.py +0 -0
  106. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq/tool/tool_handler.py +0 -0
  107. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq.egg-info/dependency_links.txt +0 -0
  108. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/src/versionhq.egg-info/top_level.txt +0 -0
  109. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/__init__.py +0 -0
  110. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/agent/__init__.py +0 -0
  111. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/agent/agent_test.py +0 -0
  112. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/agent/doc_test.py +0 -0
  113. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/cli/__init__.py +0 -0
  114. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/clients/customer_test.py +0 -0
  115. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/clients/product_test.py +0 -0
  116. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/clients/workflow_test.py +0 -0
  117. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/conftest.py +0 -0
  118. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/doc_test.py +0 -0
  119. {versionhq-1.2.0.3/tests/knowledge → versionhq-1.2.1.0/tests/graph}/__init__.py +0 -0
  120. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/knowledge/knowledge_test.py +0 -0
  121. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/knowledge/mock_report_compressed.pdf +0 -0
  122. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/llm/llm_test.py +0 -0
  123. {versionhq-1.2.0.3/tests/network → versionhq-1.2.1.0/tests/memory}/__init__.py +0 -0
  124. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/memory/memory_test.py +0 -0
  125. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/task/__init__.py +0 -0
  126. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/task/llm_connection_test.py +0 -0
  127. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/task/task_test.py +0 -0
  128. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/team/Prompts/Demo_test.py +0 -0
  129. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/team/__init__.py +0 -0
  130. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/tool/__init__.py +0 -0
  131. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/tool/composio_test.py +0 -0
  132. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/tool/doc_test.py +0 -0
  133. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/tool/tool_test.py +0 -0
  134. {versionhq-1.2.0.3 → versionhq-1.2.1.0}/tests/usecase_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.0.3
3
+ Version: 1.2.1.0
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
@@ -64,6 +64,8 @@ Requires-Dist: chromadb>=0.6.3
64
64
  Requires-Dist: wheel>=0.45.1
65
65
  Requires-Dist: envoy>=0.0.3
66
66
  Requires-Dist: composio-core==0.7.0
67
+ Requires-Dist: networkx>=3.4.2
68
+ Requires-Dist: matplotlib>=3.10.0
67
69
  Provides-Extra: docling
68
70
  Requires-Dist: docling>=2.17.0; extra == "docling"
69
71
  Provides-Extra: mem0ai
@@ -76,17 +78,13 @@ Provides-Extra: numpy
76
78
  Requires-Dist: numpy>=1.26.4; extra == "numpy"
77
79
  Provides-Extra: pygraphviz
78
80
  Requires-Dist: pygraphviz>=1.14; extra == "pygraphviz"
79
- Provides-Extra: networkx
80
- Requires-Dist: networkx>=3.4.2; extra == "networkx"
81
- Provides-Extra: matplotlib
82
- Requires-Dist: matplotlib>=3.10.0; extra == "matplotlib"
83
81
 
84
82
  # Overview
85
83
 
86
- [![DL](https://img.shields.io/badge/Download-15K+-red)](https://clickpy.clickhouse.com/dashboard/versionhq)
84
+ [![DL](https://img.shields.io/badge/Download-17K+-red)](https://clickpy.clickhouse.com/dashboard/versionhq)
87
85
  ![MIT license](https://img.shields.io/badge/License-MIT-green)
88
86
  [![Publisher](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml/badge.svg)](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
89
- ![PyPI](https://img.shields.io/badge/PyPI-v1.2.0+-blue)
87
+ ![PyPI](https://img.shields.io/badge/PyPI-v1.2.1+-blue)
90
88
  ![python ver](https://img.shields.io/badge/Python-3.11/3.12-purple)
91
89
  ![pyenv ver](https://img.shields.io/badge/pyenv-2.5.0-orange)
92
90
 
@@ -108,9 +106,10 @@ A Python framework for agentic orchestration that handles complex task automatio
108
106
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
109
107
 
110
108
  - [Key Features](#key-features)
111
- - [Agent formation](#agent-formation)
109
+ - [Agent Network](#agent-network)
112
110
  - [Graph Theory Concept](#graph-theory-concept)
113
- - [Agent optimization](#agent-optimization)
111
+ - [Task Graph](#task-graph)
112
+ - [Optimization](#optimization)
114
113
  - [Quick Start](#quick-start)
115
114
  - [Package installation](#package-installation)
116
115
  - [Forming a agent network](#forming-a-agent-network)
@@ -141,14 +140,14 @@ A Python framework for agentic orchestration that handles complex task automatio
141
140
  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.
142
141
 
143
142
 
144
- ### Agent formation
143
+ ### Agent Network
145
144
 
146
145
  Agents adapt their formation based on task complexity.
147
146
 
148
147
  You can specify a desired formation or allow the agents to determine it autonomously (default).
149
148
 
150
149
 
151
- | | **Solo Agent** | **Supervising** | **Network** | **Random** |
150
+ | | **Solo Agent** | **Supervising** | **Squad** | **Random** |
152
151
  | :--- | :--- | :--- | :--- | :--- |
153
152
  | **Formation** | <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1738818211/pj_m_agents/rbgxttfoeqqis1ettlfz.png" alt="solo" width="200"> | <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1738818211/pj_m_agents/zhungor3elxzer5dum10.png" alt="solo" width="200"> | <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1738818211/pj_m_agents/dnusl7iy7kiwkxwlpmg8.png" alt="solo" width="200"> | <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1738818211/pj_m_agents/sndpczatfzbrosxz9ama.png" alt="solo" width="200"> |
154
153
  | **Usage** | <ul><li>A single agent with tools, knowledge, and memory.</li><li>When self-learning mode is on - it will turn into **Random** formation.</li></ul> | <ul><li>Leader agent gives directions, while sharing its knowledge and memory.</li><li>Subordinates can be solo agents or networks.</li></ul> | <ul><li>Share tasks, knowledge, and memory among network members.</li></ul> | <ul><li>A single agent handles tasks, asking help from other agents without sharing its memory or knowledge.</li></ul> |
@@ -194,7 +193,19 @@ task_graph.visualize()
194
193
 
195
194
  <hr />
196
195
 
197
- ### Agent optimization
196
+ ### Task Graph
197
+
198
+ A `TaskGraph` represents tasks as `nodes` and their execution dependencies as `edges`, automating rule-based execution.
199
+
200
+ `Agent Networks` can handle `TaskGraph` objects by optimizing their formations.
201
+
202
+ The following example demonstrates a simple concept of a `supervising` agent network handling a task graph with three tasks and one critical edge.
203
+
204
+ <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1739337639/pj_m_home/zfg4ccw1m1ww1tpnb0pa.png">
205
+
206
+ <hr />
207
+
208
+ ### Optimization
198
209
 
199
210
  Agents are model-agnostic and can handle multiple tasks, leveraging their own and their peers' knowledge sources, memories, and tools.
200
211
 
@@ -1,9 +1,9 @@
1
1
  # Overview
2
2
 
3
- [![DL](https://img.shields.io/badge/Download-15K+-red)](https://clickpy.clickhouse.com/dashboard/versionhq)
3
+ [![DL](https://img.shields.io/badge/Download-17K+-red)](https://clickpy.clickhouse.com/dashboard/versionhq)
4
4
  ![MIT license](https://img.shields.io/badge/License-MIT-green)
5
5
  [![Publisher](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml/badge.svg)](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
6
- ![PyPI](https://img.shields.io/badge/PyPI-v1.2.0+-blue)
6
+ ![PyPI](https://img.shields.io/badge/PyPI-v1.2.1+-blue)
7
7
  ![python ver](https://img.shields.io/badge/Python-3.11/3.12-purple)
8
8
  ![pyenv ver](https://img.shields.io/badge/pyenv-2.5.0-orange)
9
9
 
@@ -25,9 +25,10 @@ A Python framework for agentic orchestration that handles complex task automatio
25
25
  <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
26
26
 
27
27
  - [Key Features](#key-features)
28
- - [Agent formation](#agent-formation)
28
+ - [Agent Network](#agent-network)
29
29
  - [Graph Theory Concept](#graph-theory-concept)
30
- - [Agent optimization](#agent-optimization)
30
+ - [Task Graph](#task-graph)
31
+ - [Optimization](#optimization)
31
32
  - [Quick Start](#quick-start)
32
33
  - [Package installation](#package-installation)
33
34
  - [Forming a agent network](#forming-a-agent-network)
@@ -58,14 +59,14 @@ A Python framework for agentic orchestration that handles complex task automatio
58
59
  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
60
 
60
61
 
61
- ### Agent formation
62
+ ### Agent Network
62
63
 
63
64
  Agents adapt their formation based on task complexity.
64
65
 
65
66
  You can specify a desired formation or allow the agents to determine it autonomously (default).
66
67
 
67
68
 
68
- | | **Solo Agent** | **Supervising** | **Network** | **Random** |
69
+ | | **Solo Agent** | **Supervising** | **Squad** | **Random** |
69
70
  | :--- | :--- | :--- | :--- | :--- |
70
71
  | **Formation** | <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1738818211/pj_m_agents/rbgxttfoeqqis1ettlfz.png" alt="solo" width="200"> | <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1738818211/pj_m_agents/zhungor3elxzer5dum10.png" alt="solo" width="200"> | <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1738818211/pj_m_agents/dnusl7iy7kiwkxwlpmg8.png" alt="solo" width="200"> | <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1738818211/pj_m_agents/sndpczatfzbrosxz9ama.png" alt="solo" width="200"> |
71
72
  | **Usage** | <ul><li>A single agent with tools, knowledge, and memory.</li><li>When self-learning mode is on - it will turn into **Random** formation.</li></ul> | <ul><li>Leader agent gives directions, while sharing its knowledge and memory.</li><li>Subordinates can be solo agents or networks.</li></ul> | <ul><li>Share tasks, knowledge, and memory among network members.</li></ul> | <ul><li>A single agent handles tasks, asking help from other agents without sharing its memory or knowledge.</li></ul> |
@@ -111,7 +112,19 @@ task_graph.visualize()
111
112
 
112
113
  <hr />
113
114
 
114
- ### Agent optimization
115
+ ### Task Graph
116
+
117
+ A `TaskGraph` represents tasks as `nodes` and their execution dependencies as `edges`, automating rule-based execution.
118
+
119
+ `Agent Networks` can handle `TaskGraph` objects by optimizing their formations.
120
+
121
+ The following example demonstrates a simple concept of a `supervising` agent network handling a task graph with three tasks and one critical edge.
122
+
123
+ <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1739337639/pj_m_home/zfg4ccw1m1ww1tpnb0pa.png">
124
+
125
+ <hr />
126
+
127
+ ### Optimization
115
128
 
116
129
  Agents are model-agnostic and can handle multiple tasks, leveraging their own and their peers' knowledge sources, memories, and tools.
117
130
 
@@ -0,0 +1,211 @@
1
+ ---
2
+ tags:
3
+ - HTML5
4
+ - JavaScript
5
+ - CSS
6
+ ---
7
+
8
+ # ResponseField
9
+
10
+ <class>`class` versionhq.task.model.<bold>ResponseField<bold></class>
11
+
12
+ A class to store response formats to create JSON response schema.
13
+
14
+ <hr/>
15
+
16
+ ## Core Usage
17
+
18
+ `[var]`<bold>`title: str = None`</bold>
19
+
20
+ `[var]`<bold>`data_type: Type = None`</bold>
21
+
22
+ Define a response format with field titles and data types.
23
+
24
+
25
+ ```python
26
+ import versionhq as vhq
27
+
28
+ response_field = vhq.ResponseField(
29
+ title="summary",
30
+ data_type=str,
31
+ nullable=False, # default = False. Explicitly mentioned.
32
+ )
33
+
34
+ ## Agent output:
35
+ # "summary": <AGENT_RESPONSE_IN_STRING>
36
+ ```
37
+
38
+ ### Object
39
+
40
+ `[var]`<bold>`properties: List[InstanceOf[ResponseField]] = None`</bold>
41
+
42
+ To format an object, add `ResponseField` objects to the `properties` fields.
43
+
44
+ Missing properties for dict will trigger an error.
45
+
46
+ ```python
47
+ import versionhq as vhq
48
+
49
+ response_field = vhq.ResponseField(
50
+ title="dict-summary",
51
+ data_type=dict,
52
+ nullable=False,
53
+ properties=[
54
+ vhq.ResponseField(title="summary-1", data_type=str),
55
+ vhq.ResponseField(title="summary-2", data_type=int),
56
+ ]
57
+ )
58
+
59
+ ## Agent output:
60
+ # dict-summary: {
61
+ # "summary-1": <AGENT_RESPONSE_1_IN_STRING>,
62
+ # "summary-2": <AGENT_RESPONSE_2_IN_INTEGER>,
63
+ # }
64
+ ```
65
+
66
+ <hr />
67
+
68
+ ### List
69
+
70
+ `[var]`<bold>`items: Optional[Type] = None`</bold>
71
+
72
+ To format a list, add data types of the list items to the `items` field.
73
+
74
+ Missing items for list will trigger an error.
75
+
76
+ ```python
77
+ import versionhq as vhq
78
+
79
+ response_field = vhq.ResponseField(
80
+ title="list-summary",
81
+ data_type=list,
82
+ nullable=False,
83
+ items=str
84
+ )
85
+
86
+ ## Agent output:
87
+ # list-summary: [
88
+ # <AGENT_RESPONSE_1_IN_STRING>,
89
+ # <AGENT_RESPONSE_2_IN_STRING>,
90
+ # ...
91
+ # ]
92
+ ```
93
+
94
+ <hr />
95
+
96
+ ## Nesting
97
+
98
+ Agents can handle **one layer** of nested items usign `properties` and `items` fields.
99
+
100
+ We highly recommend to use `gemini-x` or `gpt-x` to get stable results.
101
+
102
+ ### List with Object
103
+
104
+ ```python
105
+ import versionhq as vhq
106
+
107
+ list_with_objects = vhq.ResponseField(
108
+ title="parent",
109
+ data_type=list,
110
+ items=dict,
111
+ properties=[
112
+ vhq.ResponseField(title="nest-1", data_type=str),
113
+ vhq.ResponseField(title="nest-2", data_type=float),
114
+ ]
115
+ )
116
+
117
+ # Agent output
118
+ # parent: [
119
+ # { "nest-1": <AGENT_RESOPONSE_IN_STRING>},
120
+ # { "nest-2": <AGENT_RESOPONSE_IN_NUMBER>},
121
+ # ]
122
+ ```
123
+
124
+ <hr />
125
+
126
+ ### List with List
127
+
128
+ ```python
129
+ import versionhq as vhq
130
+
131
+ list_with_list = vhq.ResponseField(
132
+ title="parent",
133
+ data_type=list,
134
+ items=list
135
+ )
136
+
137
+ # Agent output
138
+ # parent: [
139
+ # [<AGENT_RESOPONSE_IN_STRING>, ...],
140
+ # [<AGENT_RESOPONSE_IN_STRING>, ...]
141
+ # ...
142
+ # ]
143
+ ```
144
+
145
+ <hr />
146
+
147
+ ### Object with List
148
+
149
+ ```python
150
+ import versionhq as vhq
151
+
152
+ dict_with_list = vhq.ResponseField(
153
+ title="parent",
154
+ data_type=dict,
155
+ properties=[
156
+ vhq.ResponseField(title="nest-1", data_type=list, items=str),
157
+ vhq.ResponseField(title="nest-2", data_type=list, items=int),
158
+ ]
159
+ )
160
+
161
+ # Agent output
162
+ # parent: {
163
+ # nest-1: [<AGENT_RESOPONSE_IN_STRING>, ...],
164
+ # nest-2: [<AGENT_RESOPONSE_IN_INTEGER>, ...]
165
+ # }
166
+ ```
167
+
168
+ <hr />
169
+
170
+ ### Object with Object
171
+
172
+ ```python
173
+ import versionhq as vhq
174
+
175
+ dict_with_dict = vhq.ResponseField(
176
+ title="parent",
177
+ data_type=dict,
178
+ properties=[
179
+ vhq.ResponseField(title="nest-1", data_type=dict, properties=[
180
+ vhq.ResponseField(title="nest-1-1", data_type=str)
181
+ ]),
182
+ vhq.ResponseField(title="nest-2", data_type=list, items=int),
183
+ ]
184
+ )
185
+
186
+ # Agent output
187
+ # parent: {
188
+ # nest-1: { nest-1-1: <AGENT_RESOPONSE_IN_STRING>, },
189
+ # nest-2: [<AGENT_RESOPONSE_IN_INTEGER>, ...]
190
+ # }
191
+ ```
192
+
193
+ ### Config
194
+
195
+ `[var]`<bold>`config: Optional[Dict[str, Any]] = {}`</bold>
196
+
197
+ You can add other configs you want to pass to the LLM.
198
+
199
+ ```python
200
+ import versionhq as vhq
201
+
202
+ response_field = vhq.ResponseField(
203
+ title="summary-with-config",
204
+ data_type=str,
205
+ nullable=False,
206
+ config=dict(required=False, )
207
+ )
208
+
209
+ # Agent output:
210
+ # summary-with-config: <AGENT_RESPONSE_IN_STRING>
211
+ ```
@@ -7,7 +7,7 @@ tags:
7
7
 
8
8
  # TaskOutput
9
9
 
10
- <class>`class` versionhq.tasks.model.<bold>TaskOutput<bold></class>
10
+ <class>`class` versionhq.task.model.<bold>TaskOutput<bold></class>
11
11
 
12
12
  A class to store and manage output from the `Task` object.
13
13
 
@@ -0,0 +1,83 @@
1
+ ---
2
+ tags:
3
+ - HTML5
4
+ - JavaScript
5
+ - CSS
6
+ ---
7
+
8
+ # TaskGraph
9
+
10
+ <class>`class` versionhq.graph.model.<bold>TaskGraph<bold></class>
11
+
12
+ A `TaskGraph` represents tasks as `nodes` and their execution dependencies as `edges`, automating rule-based execution.
13
+
14
+ `Agent Networks` can handle `TaskGraph` objects by optimizing their formations.
15
+
16
+ The following example demonstrates a simple concept of a `supervising` agent network handling a task graph with three tasks and one critical edge.
17
+
18
+ <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1739337639/pj_m_home/zfg4ccw1m1ww1tpnb0pa.png">
19
+
20
+
21
+ ## Core Usage
22
+
23
+ `TaskGraph` needs at least two `nodes` and one `edges` to connect the nodes to function.
24
+
25
+ You can define nodes and edges mannually by creating nodes from tasks, and defining edges.
26
+
27
+
28
+ ### Generating TaskGraph
29
+
30
+ ```python
31
+ import versionhq as vhq
32
+
33
+ task_graph = vhq.TaskGraph(directed=False, should_reform=True)
34
+
35
+ task_a = vhq.Task(description="Research Topic")
36
+ task_b = vhq.Task(description="Outline Post")
37
+ task_c = vhq.Task(description="Write First Draft")
38
+
39
+ node_a = task_graph.add_task(task=task_a)
40
+ node_b = task_graph.add_task(task=task_b)
41
+ node_c = task_graph.add_task(task=task_c)
42
+
43
+ task_graph.add_dependency(
44
+ node_a.identifier, node_b.identifier,
45
+ type=vhq.DependencyType.FINISH_TO_START, weight=5, description="B depends on A"
46
+ )
47
+ task_graph.add_dependency(
48
+ node_a.identifier, node_c.identifier,
49
+ type=vhq.DependencyType.FINISH_TO_FINISH, lag=1, required=False, weight=3
50
+ )
51
+
52
+ critical_path, duration, paths = task_graph.find_critical_path()
53
+
54
+ import uuid
55
+ assert isinstance(task_graph, vhq.TaskGraph)
56
+ assert [type(k) == uuid.uuid4 and isinstance(v, vhq.Node) and isinstance(v.task, vhq.Task) for k, v in task_graph.nodes.items()]
57
+ assert [type(k) == uuid.uuid4 and isinstance(v, vhq.Edge) for k, v in task_graph.edges.items()]
58
+ assert critical_path and duration and paths
59
+ ```
60
+
61
+
62
+ ### Activating TaskGraph
63
+
64
+ Calling `.activate()` begins execution of the graph's nodes, respecting dependencies [`dependency-met`] and prioritizing the critical path.
65
+
66
+
67
+ **[NOTES]**
68
+
69
+ - If all nodes are already complete, outputs are returned without further execution.
70
+
71
+ - If no critical path is found, execution begins with any dependency-met start nodes.
72
+
73
+
74
+ ```python
75
+ import versionhq as vhq
76
+
77
+ # Inherting the `task_graph` object in the previous code snippet,
78
+
79
+ last_task_output, outputs = task_graph.activate()
80
+
81
+ assert isinstance(last_task_output, vhq.TaskOutput)
82
+ assert [k in task_graph.nodes.keys() and v and isinstance(v, vhq.TaskOutput) for k, v in outputs.items()]
83
+ ```
@@ -7,7 +7,7 @@ tags:
7
7
 
8
8
  # Task
9
9
 
10
- <class>`class` versionhq.tasks.model.<bold>Task<bold></class>
10
+ <class>`class` versionhq.task.model.<bold>Task<bold></class>
11
11
 
12
12
  A class to store and manage information for individual tasks, including their assignment to agents or teams, and dependencies via a node-based system that tracks conditions and status.
13
13
 
@@ -72,7 +72,7 @@ from pydantic import BaseModel
72
72
  from typing import Any
73
73
 
74
74
 
75
- # 1. Define Pydantic class using description (optional), annotation and field name.
75
+ # 1. Define Pydantic class with a description (optional), annotations and field names.
76
76
  class Demo(BaseModel):
77
77
  """
78
78
  A demo pydantic class to validate the outcome with various nested data types.
@@ -89,7 +89,7 @@ class Demo(BaseModel):
89
89
  demo_nest_4: dict[str, dict[str, Any]]
90
90
  # error_1: list[list[dict[str, list[str]]]] # <- Trigger 400 error due to 2+ layers of nested child.
91
91
  # error_2: InstanceOf[AnotherPydanticClass] # <- Trigger 400 error due to non-typing annotation.
92
- # error_3: list[InstanceOf[AnotherPydanticClass]] # <- Same as above
92
+ # error_3: list[InstanceOf[AnotherPydanticClass]] # <- Trigger 400 error due to non-typing annotation as a nested child.
93
93
 
94
94
  # 2. Define a task
95
95
  task = vhq.Task(
@@ -132,21 +132,40 @@ import versionhq as vhq
132
132
 
133
133
  # 1. Define a list of ResponseField objects.
134
134
  demo_response_fields = [
135
+ # no nesting
135
136
  vhq.ResponseField(title="demo_1", data_type=int),
136
137
  vhq.ResponseField(title="demo_2", data_type=float),
137
138
  vhq.ResponseField(title="demo_3", data_type=str),
138
139
  vhq.ResponseField(title="demo_4", data_type=bool),
139
140
  vhq.ResponseField(title="demo_5", data_type=list, items=str),
140
- vhq.ResponseField(title="demo_6", data_type=dict, properties=[vhq.ResponseField(title="demo-item", data_type=str)]),
141
- vhq.ResponseField(title="demo_nest_1", data_type=list, items=str, properties=([
142
- vhq.ResponseField(title="nest1", data_type=dict, properties=[vhq.ResponseField(title="nest11", data_type=str)])
143
- ])), # you can specify field title of nested items
141
+ vhq.ResponseField(
142
+ title="demo_6",
143
+ data_type=dict,
144
+ properties=[vhq.ResponseField(title="demo-item", data_type=str)]
145
+ ),
146
+ # nesting
147
+ vhq.ResponseField(
148
+ title="demo_nest_1",
149
+ data_type=list,
150
+ items=dict,
151
+ properties=([
152
+ vhq.ResponseField(
153
+ title="nest1",
154
+ data_type=dict,
155
+ properties=[vhq.ResponseField(title="nest11", data_type=str)]
156
+ )
157
+ ])
158
+ ),
144
159
  vhq.ResponseField(title="demo_nest_2", data_type=list, items=list),
145
160
  vhq.ResponseField(title="demo_nest_3", data_type=dict, properties=[
146
161
  vhq.ResponseField(title="nest1", data_type=list, items=str)
147
162
  ]),
148
163
  vhq.ResponseField(title="demo_nest_4", data_type=dict, properties=[
149
- vhq.ResponseField(title="nest1", data_type=dict, properties=[vhq.ResponseField(title="nest12", data_type=str)])
164
+ vhq.ResponseField(
165
+ title="nest1",
166
+ data_type=dict,
167
+ properties=[vhq.ResponseField(title="nest12", data_type=str)]
168
+ )
150
169
  ])
151
170
  ]
152
171
 
@@ -227,7 +246,7 @@ res = main_task.execute(context=sub_res.raw) # [Optional] Adding sub_task's resp
227
246
  assert [item for item in res.callback_output.main1 if isinstance(item, Sub)]
228
247
  ```
229
248
 
230
- To skip these manual setups, refer to Node/Graph pages.
249
+ To automate these manual setups, refer to <a href="/core/agent-network">AgentNetwork</a> class.
231
250
 
232
251
 
233
252
  <!-- ### Context
@@ -239,7 +258,6 @@ To skip these manual setups, refer to Node/Graph pages.
239
258
  ### Execution rules
240
259
  EXECUTION type
241
260
  allow_delegation: bool = Field(default=False, description="ask other agents for help and run the task instead")
242
-
243
261
  callback: Optional[Callable] = Field(default=None, description="callback to be executed after the task is completed.")
244
262
  callback_kwargs: Optional[Dict[str, Any]] = Field(default_factory=dict, description="kwargs for the callback when the callback is callable")
245
263
 
@@ -7,14 +7,13 @@ tags:
7
7
 
8
8
  # Overview
9
9
 
10
- [![DL](https://img.shields.io/badge/Download-15K+-red)](https://clickpy.clickhouse.com/dashboard/versionhq)
10
+ [![DL](https://img.shields.io/badge/Download-17K+-red)](https://clickpy.clickhouse.com/dashboard/versionhq)
11
11
  ![MIT license](https://img.shields.io/badge/License-MIT-green)
12
12
  [![Publisher](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml/badge.svg)](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
13
- ![PyPI](https://img.shields.io/badge/PyPI-v1.2.0+-blue)
13
+ ![PyPI](https://img.shields.io/badge/PyPI-v1.2.1+-blue)
14
14
  ![python ver](https://img.shields.io/badge/Python-3.11/3.12-purple)
15
15
  ![pyenv ver](https://img.shields.io/badge/pyenv-2.5.0-orange)
16
16
 
17
-
18
17
  A Python framework for agentic orchestration that handles complex task automation.
19
18
 
20
19
  **Visit:**
@@ -36,7 +35,7 @@ A Python framework for agentic orchestration that handles complex task automatio
36
35
  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.
37
36
 
38
37
 
39
- ### Agent formation
38
+ ### Agent Network
40
39
 
41
40
  Agents adapt their formation based on task complexity.
42
41
 
@@ -84,12 +83,32 @@ task_graph.add_dependency(
84
83
  type=vhq.DependencyType.FINISH_TO_FINISH, lag=1, required=False, weight=3
85
84
  )
86
85
 
86
+ # To viaualize:
87
87
  task_graph.visualize()
88
+
89
+ # To start to execute nodes
90
+ latest_output, outputs = task_graph.activate()
91
+
92
+ assert
88
93
  ```
89
94
 
90
95
  <hr />
91
96
 
92
- ### Agent optimization
97
+ ### Task Graph
98
+
99
+ A `TaskGraph` represents tasks as `nodes` and their execution dependencies as `edges`, automating rule-based execution.
100
+
101
+ `Agent Networks` can handle `TaskGraph` objects by optimizing their formations.
102
+
103
+ The following example demonstrates a simple concept of a `supervising` agent network handling a task graph with three tasks and one critical edge.
104
+
105
+ <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1739337639/pj_m_home/zfg4ccw1m1ww1tpnb0pa.png">
106
+
107
+ * Ref: <a href="/core/task-graph">TaskGraph</a> class
108
+
109
+ <hr />
110
+
111
+ ### Optimization
93
112
 
94
113
  Agents are model-agnostic and can handle multiple tasks, leveraging their own and their peers' knowledge sources, memories, and tools.
95
114
 
@@ -110,6 +110,7 @@ nav:
110
110
  - Quick Start: 'quickstart.md'
111
111
  - Core Components:
112
112
  - Agent: 'core/agent.md'
113
+ - Task Graph: 'core/task-graph.md'
113
114
  - Task:
114
115
  - Overview: 'core/task.md'
115
116
  - ResponseField: 'core/task/response-field.md'
@@ -15,7 +15,7 @@ exclude = ["test*", "__pycache__", "*.egg-info"]
15
15
 
16
16
  [project]
17
17
  name = "versionhq"
18
- version = "1.2.0.3"
18
+ version = "1.2.1.0"
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"
@@ -44,6 +44,8 @@ dependencies = [
44
44
  "wheel>=0.45.1",
45
45
  "envoy>=0.0.3",
46
46
  "composio-core==0.7.0",
47
+ "networkx>=3.4.2",
48
+ "matplotlib>=3.10.0",
47
49
  ]
48
50
  classifiers = [
49
51
  "Programming Language :: Python",
@@ -83,12 +85,6 @@ numpy = [
83
85
  pygraphviz = [
84
86
  "pygraphviz>=1.14",
85
87
  ]
86
- networkx = [
87
- "networkx>=3.4.2",
88
- ]
89
- matplotlib = [
90
- "matplotlib>=3.10.0",
91
- ]
92
88
 
93
89
  [tool.uv]
94
90
  dev-dependencies = [
@@ -16,7 +16,7 @@ from versionhq.clients.workflow.model import MessagingWorkflow, MessagingCompone
16
16
  from versionhq.knowledge.model import Knowledge, KnowledgeStorage
17
17
  from versionhq.knowledge.source import PDFKnowledgeSource, CSVKnowledgeSource, JSONKnowledgeSource, TextFileKnowledgeSource, ExcelKnowledgeSource, StringKnowledgeSource
18
18
  from versionhq.knowledge.source_docling import DoclingSource
19
- from versionhq.network.model import TaskStatus, TaskGraph, Node, Edge, DependencyType
19
+ from versionhq.graph.model import TaskStatus, TaskGraph, Node, Edge, DependencyType
20
20
  from versionhq.task.model import Task, TaskOutput, ResponseField, TaskExecutionType
21
21
  from versionhq.task.evaluate import Evaluation, EvaluationItem
22
22
  from versionhq.team.model import Team, TeamOutput, Formation, Member, TaskHandlingProcess
@@ -30,7 +30,7 @@ from versionhq.memory.model import ShortTermMemory,LongTermMemory, UserMemory, M
30
30
  from versionhq.task.formation import form_agent_network
31
31
 
32
32
 
33
- __version__ = "1.2.0.3"
33
+ __version__ = "1.2.1.0"
34
34
  __all__ = [
35
35
  "Agent",
36
36
 
@@ -38,7 +38,7 @@ class Printer:
38
38
  class Logger(BaseModel):
39
39
  """
40
40
  Control CLI messages.
41
- Color: red = error, yellow = warning, blue = info (from vhq), green = info (from third party)
41
+ Color: red = error, yellow = warning, blue = info (from vhq), green = info (from third parties)
42
42
  """
43
43
 
44
44
  verbose: bool = Field(default=True)