versionhq 1.2.1.0__tar.gz → 1.2.1.2__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.1.0 → versionhq-1.2.1.2}/.gitignore +1 -0
  2. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/PKG-INFO +74 -64
  3. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/README.md +73 -63
  4. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/core/task.md +1 -1
  5. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/index.md +5 -5
  6. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/quickstart.md +33 -27
  7. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/pyproject.toml +1 -1
  8. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/requirements.txt +2 -0
  9. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/__init__.py +9 -9
  10. versionhq-1.2.1.2/src/versionhq/_utils/logger.py +97 -0
  11. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/agent/inhouse_agents.py +7 -0
  12. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/agent/model.py +2 -2
  13. {versionhq-1.2.1.0/src/versionhq/team → versionhq-1.2.1.2/src/versionhq/agent_network}/model.py +88 -68
  14. {versionhq-1.2.1.0/src/versionhq/graph → versionhq-1.2.1.2/src/versionhq/clients/workflow}/__init__.py +0 -0
  15. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/clients/workflow/model.py +10 -10
  16. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/knowledge/source.py +2 -2
  17. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/knowledge/source_docling.py +1 -1
  18. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/memory/model.py +1 -1
  19. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/task/formation.py +10 -10
  20. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/task/model.py +9 -8
  21. {versionhq-1.2.1.0/src/versionhq/team → versionhq-1.2.1.2/src/versionhq/task_graph}/__init__.py +0 -0
  22. {versionhq-1.2.1.0/src/versionhq/graph → versionhq-1.2.1.2/src/versionhq/task_graph}/model.py +1 -21
  23. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq.egg-info/PKG-INFO +74 -64
  24. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq.egg-info/SOURCES.txt +10 -11
  25. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/agent/agent_test.py +0 -1
  26. versionhq-1.2.1.0/tests/team/team_test.py → versionhq-1.2.1.2/tests/agent_network/agent_network_test.py +55 -55
  27. {versionhq-1.2.1.0/tests/graph → versionhq-1.2.1.2/tests/cli}/__init__.py +0 -0
  28. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/doc_test.py +31 -0
  29. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/formation_test.py +2 -7
  30. {versionhq-1.2.1.0/tests/team → versionhq-1.2.1.2/tests/task_graph}/__init__.py +0 -0
  31. versionhq-1.2.1.0/tests/tool/__init__.py → versionhq-1.2.1.2/tests/task_graph/task_graph_test.py +0 -0
  32. versionhq-1.2.1.2/tests/tool/__init__.py +0 -0
  33. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/usecase_test.py +1 -1
  34. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/uv.lock +28 -28
  35. versionhq-1.2.1.0/src/versionhq/_utils/logger.py +0 -50
  36. versionhq-1.2.1.0/src/versionhq/team/team_planner.py +0 -92
  37. versionhq-1.2.1.0/tests/graph/graph_test.py +0 -6
  38. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/.github/workflows/deploy_docs.yml +0 -0
  39. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/.github/workflows/publish.yml +0 -0
  40. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/.github/workflows/publish_testpypi.yml +0 -0
  41. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/.github/workflows/run_tests.yml +0 -0
  42. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/.github/workflows/security_check.yml +0 -0
  43. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/.pre-commit-config.yaml +0 -0
  44. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/.python-version +0 -0
  45. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/LICENSE +0 -0
  46. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/SECURITY.md +0 -0
  47. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/db/preprocess.py +0 -0
  48. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/CNAME +0 -0
  49. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/_logos/favicon.ico +0 -0
  50. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/_logos/logo192.png +0 -0
  51. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/core/Agent.md +0 -0
  52. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/core/task/response-field.md +0 -0
  53. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/core/task/task-output.md +0 -0
  54. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/core/task-graph.md +0 -0
  55. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/core/tool.md +0 -0
  56. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/docs/stylesheets/main.css +0 -0
  57. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/mkdocs.yml +0 -0
  58. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/requirements-dev.txt +0 -0
  59. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/runtime.txt +0 -0
  60. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/setup.cfg +0 -0
  61. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/_utils/__init__.py +0 -0
  62. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/_utils/i18n.py +0 -0
  63. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/_utils/process_config.py +0 -0
  64. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/_utils/usage_metrics.py +0 -0
  65. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/_utils/vars.py +0 -0
  66. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
  67. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
  68. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/agent/__init__.py +0 -0
  69. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/agent/parser.py +0 -0
  70. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/agent/rpm_controller.py +0 -0
  71. {versionhq-1.2.1.0/src/versionhq/cli → versionhq-1.2.1.2/src/versionhq/agent_network}/__init__.py +0 -0
  72. {versionhq-1.2.1.0/src/versionhq/clients → versionhq-1.2.1.2/src/versionhq/cli}/__init__.py +0 -0
  73. {versionhq-1.2.1.0/src/versionhq/clients/product → versionhq-1.2.1.2/src/versionhq/clients}/__init__.py +0 -0
  74. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/clients/customer/__init__.py +0 -0
  75. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/clients/customer/model.py +0 -0
  76. {versionhq-1.2.1.0/src/versionhq/clients/workflow → versionhq-1.2.1.2/src/versionhq/clients/product}/__init__.py +0 -0
  77. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/clients/product/model.py +0 -0
  78. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/knowledge/__init__.py +0 -0
  79. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/knowledge/_utils.py +0 -0
  80. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/knowledge/embedding.py +0 -0
  81. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/knowledge/model.py +0 -0
  82. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/knowledge/storage.py +0 -0
  83. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/llm/__init__.py +0 -0
  84. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/llm/llm_vars.py +0 -0
  85. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/llm/model.py +0 -0
  86. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/memory/__init__.py +0 -0
  87. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/memory/contextual_memory.py +0 -0
  88. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/storage/__init__.py +0 -0
  89. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/storage/base.py +0 -0
  90. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
  91. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/storage/mem0_storage.py +0 -0
  92. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/storage/rag_storage.py +0 -0
  93. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/storage/task_output_storage.py +0 -0
  94. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/storage/utils.py +0 -0
  95. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/task/TEMPLATES/Description.py +0 -0
  96. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/task/__init__.py +0 -0
  97. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/task/evaluate.py +0 -0
  98. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/task/formatter.py +0 -0
  99. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/task/log_handler.py +0 -0
  100. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/task/structured_response.py +0 -0
  101. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/tool/__init__.py +0 -0
  102. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/tool/cache_handler.py +0 -0
  103. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/tool/composio_tool.py +0 -0
  104. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/tool/composio_tool_vars.py +0 -0
  105. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/tool/decorator.py +0 -0
  106. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/tool/model.py +0 -0
  107. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq/tool/tool_handler.py +0 -0
  108. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq.egg-info/dependency_links.txt +0 -0
  109. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq.egg-info/requires.txt +0 -0
  110. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/src/versionhq.egg-info/top_level.txt +0 -0
  111. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/__init__.py +0 -0
  112. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/agent/__init__.py +0 -0
  113. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/agent/doc_test.py +0 -0
  114. {versionhq-1.2.1.0/tests/team → versionhq-1.2.1.2/tests/agent_network}/Prompts/Demo_test.py +0 -0
  115. {versionhq-1.2.1.0/tests/cli → versionhq-1.2.1.2/tests/agent_network}/__init__.py +0 -0
  116. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/clients/customer_test.py +0 -0
  117. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/clients/product_test.py +0 -0
  118. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/clients/workflow_test.py +0 -0
  119. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/conftest.py +0 -0
  120. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/knowledge/__init__.py +0 -0
  121. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/knowledge/knowledge_test.py +0 -0
  122. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/knowledge/mock_report_compressed.pdf +0 -0
  123. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/llm/__init__.py +0 -0
  124. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/llm/llm_test.py +0 -0
  125. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/memory/__init__.py +0 -0
  126. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/memory/memory_test.py +0 -0
  127. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/task/__init__.py +0 -0
  128. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/task/doc_test.py +0 -0
  129. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/task/llm_connection_test.py +0 -0
  130. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/task/task_test.py +0 -0
  131. {versionhq-1.2.1.0/tests/graph → versionhq-1.2.1.2/tests/task_graph}/doc_test.py +0 -0
  132. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/tool/composio_test.py +0 -0
  133. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/tool/doc_test.py +0 -0
  134. {versionhq-1.2.1.0 → versionhq-1.2.1.2}/tests/tool/tool_test.py +0 -0
@@ -24,6 +24,7 @@ temp/*
24
24
  assets/*
25
25
  memo.txt
26
26
  site/
27
+ _logs/
27
28
 
28
29
  __pycache__
29
30
  .ruff_cache/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.1.0
3
+ Version: 1.2.1.2
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
@@ -117,10 +117,10 @@ A Python framework for agentic orchestration that handles complex task automatio
117
117
  - [Supervising](#supervising)
118
118
  - [Technologies Used](#technologies-used)
119
119
  - [Project Structure](#project-structure)
120
- - [Setting Up a Project](#setting-up-a-project)
121
- - [1. Installing package manager](#1-installing-package-manager)
122
- - [2. Installing dependencies](#2-installing-dependencies)
123
- - [3. Adding env secrets to .env file](#3-adding-env-secrets-to-env-file)
120
+ - [Setting Up Your Project](#setting-up-your-project)
121
+ - [Installing package manager](#installing-package-manager)
122
+ - [Installing dependencies](#installing-dependencies)
123
+ - [Adding env secrets to .env file](#adding-env-secrets-to-env-file)
124
124
  - [Contributing](#contributing)
125
125
  - [Steps](#steps)
126
126
  - [Package Management with uv](#package-management-with-uv)
@@ -256,7 +256,7 @@ agent.update(
256
256
  res = network.launch()
257
257
  ```
258
258
 
259
- This will form a network with multiple agents on `Formation` and return `TaskOutput` object with output in JSON, plane text, Pydantic model format with evaluation.
259
+ This will form a network with multiple agents on `Formation` and return `TaskOutput` object with output in JSON, plane text, Pydantic model format with evaluation.
260
260
 
261
261
 
262
262
  ### Executing tasks
@@ -266,81 +266,87 @@ You can simply build an agent using `Agent` model and execute the task using `Ta
266
266
  By default, agents prioritize JSON over plane text outputs.
267
267
 
268
268
 
269
- ```python
270
- import versionhq as vhq
271
- from pydantic import BaseModel
269
+ ```python
270
+ import versionhq as vhq
271
+ from pydantic import BaseModel
272
272
 
273
- class CustomOutput(BaseModel):
274
- test1: str
275
- test2: list[str]
273
+ class CustomOutput(BaseModel):
274
+ test1: str
275
+ test2: list[str]
276
276
 
277
- def dummy_func(message: str, test1: str, test2: list[str]) -> str:
278
- return f"""{message}: {test1}, {", ".join(test2)}"""
277
+ def dummy_func(message: str, test1: str, test2: list[str]) -> str:
278
+ return f"""{message}: {test1}, {", ".join(test2)}"""
279
279
 
280
- task = vhq.Task(
281
- description="Amazing task",
282
- pydantic_output=CustomOutput,
283
- callback=dummy_func,
284
- callback_kwargs=dict(message="Hi! Here is the result: ")
285
- )
280
+ task = vhq.Task(
281
+ description="Amazing task",
282
+ pydantic_output=CustomOutput,
283
+ callback=dummy_func,
284
+ callback_kwargs=dict(message="Hi! Here is the result: ")
285
+ )
286
286
 
287
- res = task.execute(context="amazing context to consider.")
288
- print(res)
289
- ```
287
+ res = task.execute(context="amazing context to consider.")
288
+ print(res)
289
+ ```
290
290
 
291
291
 
292
292
  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).
293
293
 
294
- ```python
295
- res == TaskOutput(
296
- task_id=UUID('<TASK UUID>'),
297
- raw='{\"test1\":\"random str\", \"test2\":[\"str item 1\", \"str item 2\", \"str item 3\"]}',
298
- json_dict={'test1': 'random str', 'test2': ['str item 1', 'str item 2', 'str item 3']},
299
- pydantic=<class '__main__.CustomOutput'>,
300
- tool_output=None,
301
- callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3', # returned a plain text summary
302
- evaluation=None
303
- )
304
- ```
294
+ ```python
295
+ res == TaskOutput(
296
+ task_id=UUID('<TASK UUID>'),
297
+ raw='{\"test1\":\"random str\", \"test2\":[\"str item 1\", \"str item 2\", \"str item 3\"]}',
298
+ json_dict={'test1': 'random str', 'test2': ['str item 1', 'str item 2', 'str item 3']},
299
+ pydantic=<class '__main__.CustomOutput'>,
300
+ tool_output=None,
301
+ callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3', # returned a plain text summary
302
+ evaluation=None
303
+ )
304
+ ```
305
305
 
306
306
  ### Supervising
307
307
 
308
- ```python
309
- import versionhq as vhq
308
+ To create an agent network with one or more manager agents, designate members using the `is_manager` tag.
310
309
 
311
- agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
312
- agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
310
+ ```python
311
+ import versionhq as vhq
313
312
 
314
- task_1 = vhq.Task(
315
- description="Analyze the client's business model.",
316
- response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
317
- allow_delegation=True
318
- )
313
+ agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
314
+ agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
319
315
 
320
- task_2 = vhq.Task(
321
- description="Define the cohort.",
322
- response_fields=[ResponseField(title="test1", data_type=int, required=True),],
323
- allow_delegation=False
324
- )
316
+ task_1 = vhq.Task(
317
+ description="Analyze the client's business model.",
318
+ response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
319
+ allow_delegation=True
320
+ )
325
321
 
326
- team = vhq.Team(
327
- members=[
328
- vhq.Member(agent=agent_a, is_manager=False, task=task_1),
329
- vhq.Member(agent=agent_b, is_manager=True, task=task_2),
330
- ],
331
- )
332
- res = team.launch()
333
- ```
322
+ task_2 = vhq.Task(
323
+ description="Define a cohort.",
324
+ response_fields=[vhq.ResponseField(title="test1", data_type=int, required=True),],
325
+ allow_delegation=False
326
+ )
327
+
328
+ network =vhq.AgentNetwork(
329
+ members=[
330
+ vhq.Member(agent=agent_a, is_manager=False, tasks=[task_1]),
331
+ vhq.Member(agent=agent_b, is_manager=True, tasks=[task_2]), # Agent B as a manager
332
+ ],
333
+ )
334
+ res = network.launch()
335
+
336
+ assert isinstance(res, vhq.NetworkOutput)
337
+ assert not [item for item in task_1.processed_agents if "vhq-Delegated-Agent" == item]
338
+ assert [item for item in task_1.processed_agents if "agent b" == item]
339
+ ```
334
340
 
335
341
  This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
336
342
 
337
- Tasks can be delegated to a team manager, peers in the team, or completely new agent.
343
+ Tasks can be delegated to a manager, peers within the agent network, or a completely new agent.
338
344
 
339
345
  <hr />
340
346
 
341
347
  ## Technologies Used
342
348
 
343
- **Graph Theory (Analysis and Visualization)**
349
+ **Task Graph**
344
350
 
345
351
  * [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
346
352
  * [Matplotlib](https://matplotlib.org/stable/index.html): Visualization library
@@ -401,16 +407,19 @@ src/
401
407
  │ └── ...
402
408
 
403
409
  └── uploads/ [.gitignore] # Local directory to store uploaded files such as graphviz diagrams generatd by `Network` class
404
- |
410
+
411
+ └── _logs/ [.gitignore] # Local directory to store error/warning logs for debugging
412
+
413
+
405
414
  pyproject.toml # Project config
406
415
 
407
416
  ```
408
417
 
409
418
  <hr />
410
419
 
411
- ## Setting Up a Project
420
+ ## Setting Up Your Project
412
421
 
413
- ### 1. Installing package manager
422
+ ### Installing package manager
414
423
 
415
424
  For MacOS:
416
425
 
@@ -424,7 +433,7 @@ pyproject.toml # Project config
424
433
  ```
425
434
 
426
435
 
427
- ### 2. Installing dependencies
436
+ ### Installing dependencies
428
437
 
429
438
  ```
430
439
  uv venv
@@ -457,7 +466,7 @@ pyproject.toml # Project config
457
466
 
458
467
  - `torch`/`Docling` related errors: Set up default Python version either `3.11.x` or `3.12.x` (same as AssertionError)
459
468
 
460
- ### 3. Adding env secrets to .env file
469
+ ### Adding env secrets to .env file
461
470
 
462
471
  Create `.env` file in the project root and add following:
463
472
 
@@ -470,6 +479,7 @@ Create `.env` file in the project root and add following:
470
479
  [OTHER_LLM_INTERFACE_PROVIDER_OF_YOUR_CHOICE]_API_KEY=your-api-key
471
480
  ```
472
481
 
482
+
473
483
  <hr />
474
484
 
475
485
  ## Contributing
@@ -574,7 +584,7 @@ Common issues and solutions:
574
584
 
575
585
  * Issues related to dependencies: `rm -rf uv.lock`, `uv cache clean`, `uv venv`, and run `uv pip install -r requirements.txt -v`.
576
586
 
577
- * Issues related to the AI agents or RAG system: Check the `output.log` file for detailed error messages and stack traces.
587
+ * Issues related to agents and other systems: Check `_logs` directory for detailed error messages and stack traces.
578
588
 
579
589
  * Issues related to `Python quit unexpectedly`: Check [this stackoverflow article](https://stackoverflow.com/questions/59888499/macos-catalina-python-quit-unexpectedly-error).
580
590
 
@@ -36,10 +36,10 @@ A Python framework for agentic orchestration that handles complex task automatio
36
36
  - [Supervising](#supervising)
37
37
  - [Technologies Used](#technologies-used)
38
38
  - [Project Structure](#project-structure)
39
- - [Setting Up a Project](#setting-up-a-project)
40
- - [1. Installing package manager](#1-installing-package-manager)
41
- - [2. Installing dependencies](#2-installing-dependencies)
42
- - [3. Adding env secrets to .env file](#3-adding-env-secrets-to-env-file)
39
+ - [Setting Up Your Project](#setting-up-your-project)
40
+ - [Installing package manager](#installing-package-manager)
41
+ - [Installing dependencies](#installing-dependencies)
42
+ - [Adding env secrets to .env file](#adding-env-secrets-to-env-file)
43
43
  - [Contributing](#contributing)
44
44
  - [Steps](#steps)
45
45
  - [Package Management with uv](#package-management-with-uv)
@@ -175,7 +175,7 @@ agent.update(
175
175
  res = network.launch()
176
176
  ```
177
177
 
178
- This will form a network with multiple agents on `Formation` and return `TaskOutput` object with output in JSON, plane text, Pydantic model format with evaluation.
178
+ This will form a network with multiple agents on `Formation` and return `TaskOutput` object with output in JSON, plane text, Pydantic model format with evaluation.
179
179
 
180
180
 
181
181
  ### Executing tasks
@@ -185,81 +185,87 @@ You can simply build an agent using `Agent` model and execute the task using `Ta
185
185
  By default, agents prioritize JSON over plane text outputs.
186
186
 
187
187
 
188
- ```python
189
- import versionhq as vhq
190
- from pydantic import BaseModel
188
+ ```python
189
+ import versionhq as vhq
190
+ from pydantic import BaseModel
191
191
 
192
- class CustomOutput(BaseModel):
193
- test1: str
194
- test2: list[str]
192
+ class CustomOutput(BaseModel):
193
+ test1: str
194
+ test2: list[str]
195
195
 
196
- def dummy_func(message: str, test1: str, test2: list[str]) -> str:
197
- return f"""{message}: {test1}, {", ".join(test2)}"""
196
+ def dummy_func(message: str, test1: str, test2: list[str]) -> str:
197
+ return f"""{message}: {test1}, {", ".join(test2)}"""
198
198
 
199
- task = vhq.Task(
200
- description="Amazing task",
201
- pydantic_output=CustomOutput,
202
- callback=dummy_func,
203
- callback_kwargs=dict(message="Hi! Here is the result: ")
204
- )
199
+ task = vhq.Task(
200
+ description="Amazing task",
201
+ pydantic_output=CustomOutput,
202
+ callback=dummy_func,
203
+ callback_kwargs=dict(message="Hi! Here is the result: ")
204
+ )
205
205
 
206
- res = task.execute(context="amazing context to consider.")
207
- print(res)
208
- ```
206
+ res = task.execute(context="amazing context to consider.")
207
+ print(res)
208
+ ```
209
209
 
210
210
 
211
211
  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).
212
212
 
213
- ```python
214
- res == TaskOutput(
215
- task_id=UUID('<TASK UUID>'),
216
- raw='{\"test1\":\"random str\", \"test2\":[\"str item 1\", \"str item 2\", \"str item 3\"]}',
217
- json_dict={'test1': 'random str', 'test2': ['str item 1', 'str item 2', 'str item 3']},
218
- pydantic=<class '__main__.CustomOutput'>,
219
- tool_output=None,
220
- callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3', # returned a plain text summary
221
- evaluation=None
222
- )
223
- ```
213
+ ```python
214
+ res == TaskOutput(
215
+ task_id=UUID('<TASK UUID>'),
216
+ raw='{\"test1\":\"random str\", \"test2\":[\"str item 1\", \"str item 2\", \"str item 3\"]}',
217
+ json_dict={'test1': 'random str', 'test2': ['str item 1', 'str item 2', 'str item 3']},
218
+ pydantic=<class '__main__.CustomOutput'>,
219
+ tool_output=None,
220
+ callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3', # returned a plain text summary
221
+ evaluation=None
222
+ )
223
+ ```
224
224
 
225
225
  ### Supervising
226
226
 
227
- ```python
228
- import versionhq as vhq
227
+ To create an agent network with one or more manager agents, designate members using the `is_manager` tag.
229
228
 
230
- agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
231
- agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
229
+ ```python
230
+ import versionhq as vhq
232
231
 
233
- task_1 = vhq.Task(
234
- description="Analyze the client's business model.",
235
- response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
236
- allow_delegation=True
237
- )
232
+ agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
233
+ agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
238
234
 
239
- task_2 = vhq.Task(
240
- description="Define the cohort.",
241
- response_fields=[ResponseField(title="test1", data_type=int, required=True),],
242
- allow_delegation=False
243
- )
235
+ task_1 = vhq.Task(
236
+ description="Analyze the client's business model.",
237
+ response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
238
+ allow_delegation=True
239
+ )
244
240
 
245
- team = vhq.Team(
246
- members=[
247
- vhq.Member(agent=agent_a, is_manager=False, task=task_1),
248
- vhq.Member(agent=agent_b, is_manager=True, task=task_2),
249
- ],
250
- )
251
- res = team.launch()
252
- ```
241
+ task_2 = vhq.Task(
242
+ description="Define a cohort.",
243
+ response_fields=[vhq.ResponseField(title="test1", data_type=int, required=True),],
244
+ allow_delegation=False
245
+ )
246
+
247
+ network =vhq.AgentNetwork(
248
+ members=[
249
+ vhq.Member(agent=agent_a, is_manager=False, tasks=[task_1]),
250
+ vhq.Member(agent=agent_b, is_manager=True, tasks=[task_2]), # Agent B as a manager
251
+ ],
252
+ )
253
+ res = network.launch()
254
+
255
+ assert isinstance(res, vhq.NetworkOutput)
256
+ assert not [item for item in task_1.processed_agents if "vhq-Delegated-Agent" == item]
257
+ assert [item for item in task_1.processed_agents if "agent b" == item]
258
+ ```
253
259
 
254
260
  This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
255
261
 
256
- Tasks can be delegated to a team manager, peers in the team, or completely new agent.
262
+ Tasks can be delegated to a manager, peers within the agent network, or a completely new agent.
257
263
 
258
264
  <hr />
259
265
 
260
266
  ## Technologies Used
261
267
 
262
- **Graph Theory (Analysis and Visualization)**
268
+ **Task Graph**
263
269
 
264
270
  * [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
265
271
  * [Matplotlib](https://matplotlib.org/stable/index.html): Visualization library
@@ -320,16 +326,19 @@ src/
320
326
  │ └── ...
321
327
 
322
328
  └── uploads/ [.gitignore] # Local directory to store uploaded files such as graphviz diagrams generatd by `Network` class
323
- |
329
+
330
+ └── _logs/ [.gitignore] # Local directory to store error/warning logs for debugging
331
+
332
+
324
333
  pyproject.toml # Project config
325
334
 
326
335
  ```
327
336
 
328
337
  <hr />
329
338
 
330
- ## Setting Up a Project
339
+ ## Setting Up Your Project
331
340
 
332
- ### 1. Installing package manager
341
+ ### Installing package manager
333
342
 
334
343
  For MacOS:
335
344
 
@@ -343,7 +352,7 @@ pyproject.toml # Project config
343
352
  ```
344
353
 
345
354
 
346
- ### 2. Installing dependencies
355
+ ### Installing dependencies
347
356
 
348
357
  ```
349
358
  uv venv
@@ -376,7 +385,7 @@ pyproject.toml # Project config
376
385
 
377
386
  - `torch`/`Docling` related errors: Set up default Python version either `3.11.x` or `3.12.x` (same as AssertionError)
378
387
 
379
- ### 3. Adding env secrets to .env file
388
+ ### Adding env secrets to .env file
380
389
 
381
390
  Create `.env` file in the project root and add following:
382
391
 
@@ -389,6 +398,7 @@ Create `.env` file in the project root and add following:
389
398
  [OTHER_LLM_INTERFACE_PROVIDER_OF_YOUR_CHOICE]_API_KEY=your-api-key
390
399
  ```
391
400
 
401
+
392
402
  <hr />
393
403
 
394
404
  ## Contributing
@@ -493,7 +503,7 @@ Common issues and solutions:
493
503
 
494
504
  * Issues related to dependencies: `rm -rf uv.lock`, `uv cache clean`, `uv venv`, and run `uv pip install -r requirements.txt -v`.
495
505
 
496
- * Issues related to the AI agents or RAG system: Check the `output.log` file for detailed error messages and stack traces.
506
+ * Issues related to agents and other systems: Check `_logs` directory for detailed error messages and stack traces.
497
507
 
498
508
  * Issues related to `Python quit unexpectedly`: Check [this stackoverflow article](https://stackoverflow.com/questions/59888499/macos-catalina-python-quit-unexpectedly-error).
499
509
 
@@ -9,7 +9,7 @@ tags:
9
9
 
10
10
  <class>`class` versionhq.task.model.<bold>Task<bold></class>
11
11
 
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.
12
+ A class to store and manage information for individual tasks, including their assignment to agents or agent networks, and dependencies via a node-based system that tracks conditions and status.
13
13
 
14
14
  Ref. Node / Edge / TaskGraph class
15
15
 
@@ -35,7 +35,7 @@ A Python framework for agentic orchestration that handles complex task automatio
35
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.
36
36
 
37
37
 
38
- ### Agent Network
38
+ ### Agent Network
39
39
 
40
40
  Agents adapt their formation based on task complexity.
41
41
 
@@ -139,7 +139,7 @@ agent.update(
139
139
 
140
140
  ## Project Set Up
141
141
 
142
- ### 1. Package manager
142
+ **Installing package manager**
143
143
 
144
144
  For MacOS:
145
145
 
@@ -152,7 +152,7 @@ agent.update(
152
152
  sudo apt-get install uv
153
153
  ```
154
154
 
155
- ### 2. Dependencies
155
+ **Installing dependencies**
156
156
 
157
157
  ```
158
158
  uv venv
@@ -186,7 +186,7 @@ agent.update(
186
186
 
187
187
  - `torch`/`Docling` related errors: Set up default Python version either `3.11.x` or `3.12.x` (same as AssertionError)
188
188
 
189
- ### 3. Local .env
189
+ **Setting up a local env file**
190
190
 
191
191
  Create `.env` file in the project root and add following:
192
192
 
@@ -216,7 +216,7 @@ Common issues and solutions:
216
216
 
217
217
  * Issues related to dependencies: `rm -rf uv.lock`, `uv cache clean`, `uv venv`, and run `uv pip install -r requirements.txt -v`.
218
218
 
219
- * Issues related to the AI agents or RAG system: Check the `output.log` file for detailed error messages and stack traces.
219
+ * Issues related to agents and other systems: Check `_logs` directory for detailed error messages and stack traces.
220
220
 
221
221
  * Issues related to `Python quit unexpectedly`: Check [this stackoverflow article](https://stackoverflow.com/questions/59888499/macos-catalina-python-quit-unexpectedly-error).
222
222
 
@@ -84,33 +84,39 @@ This will return a `TaskOutput` object that stores response in plane text, JSON,
84
84
 
85
85
  ## Supervising
86
86
 
87
- ```python
88
- import versionhq as vhq
89
-
90
- agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
91
- agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
92
-
93
- task_1 = vhq.Task(
94
- description="Analyze the client's business model.",
95
- response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
96
- allow_delegation=True
97
- )
98
-
99
- task_2 = vhq.Task(
100
- description="Define the cohort.",
101
- response_fields=[vhq.ResponseField(title="test1", data_type=int, required=True),],
102
- allow_delegation=False
103
- )
104
-
105
- team =vhq.Team(
106
- members=[
107
- vhq.Member(agent=agent_a, is_manager=False, task=task_1),
108
- vhq.Member(agent=agent_b, is_manager=True, task=task_2),
109
- ],
110
- )
111
- res = team.launch()
112
- ```
87
+ To create an agent network with one or more manager agents, designate members using the `is_manager` tag.
88
+
89
+ ```python
90
+ import versionhq as vhq
91
+
92
+ agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
93
+ agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
94
+
95
+ task_1 = vhq.Task(
96
+ description="Analyze the client's business model.",
97
+ response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
98
+ allow_delegation=True
99
+ )
100
+
101
+ task_2 = vhq.Task(
102
+ description="Define a cohort.",
103
+ response_fields=[vhq.ResponseField(title="test1", data_type=int, required=True),],
104
+ allow_delegation=False
105
+ )
106
+
107
+ network =vhq.AgentNetwork(
108
+ members=[
109
+ vhq.Member(agent=agent_a, is_manager=False, tasks=[task_1]),
110
+ vhq.Member(agent=agent_b, is_manager=True, tasks=[task_2]), # Agent B as a manager
111
+ ],
112
+ )
113
+ res = network.launch()
114
+
115
+ assert isinstance(res, vhq.NetworkOutput)
116
+ assert not [item for item in task_1.processed_agents if "vhq-Delegated-Agent" == item]
117
+ assert [item for item in task_1.processed_agents if "agent b" == item]
118
+ ```
113
119
 
114
120
  This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
115
121
 
116
- Tasks can be delegated to a team manager, peers in the team, or completely new agent.
122
+ Tasks can be delegated to a manager, peers within the agent network, or a completely new agent.
@@ -15,7 +15,7 @@ exclude = ["test*", "__pycache__", "*.egg-info"]
15
15
 
16
16
  [project]
17
17
  name = "versionhq"
18
- version = "1.2.1.0"
18
+ version = "1.2.1.2"
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"
@@ -19,3 +19,5 @@ chromadb>=0.6.3
19
19
  wheel>=0.45.1
20
20
  envoy>=0.0.3
21
21
  composio-core==0.7.0
22
+ networkx>=3.4.2
23
+ matplotlib>=3.10.0
@@ -8,6 +8,7 @@ from dotenv import load_dotenv
8
8
  load_dotenv(override=True)
9
9
 
10
10
  from versionhq.agent.model import Agent
11
+ from versionhq.agent_network.model import AgentNetwork, NetworkOutput, Formation, Member, TaskHandlingProcess
11
12
  from versionhq.llm.model import LLM
12
13
  from versionhq.llm.llm_vars import LLM_CONTEXT_WINDOW_SIZES, PARAMS, PROVIDERS, MODELS
13
14
  from versionhq.clients.customer.model import Customer
@@ -16,10 +17,9 @@ from versionhq.clients.workflow.model import MessagingWorkflow, MessagingCompone
16
17
  from versionhq.knowledge.model import Knowledge, KnowledgeStorage
17
18
  from versionhq.knowledge.source import PDFKnowledgeSource, CSVKnowledgeSource, JSONKnowledgeSource, TextFileKnowledgeSource, ExcelKnowledgeSource, StringKnowledgeSource
18
19
  from versionhq.knowledge.source_docling import DoclingSource
19
- from versionhq.graph.model import TaskStatus, TaskGraph, Node, Edge, DependencyType
20
+ from versionhq.task_graph.model import TaskStatus, TaskGraph, Node, Edge, DependencyType
20
21
  from versionhq.task.model import Task, TaskOutput, ResponseField, TaskExecutionType
21
22
  from versionhq.task.evaluate import Evaluation, EvaluationItem
22
- from versionhq.team.model import Team, TeamOutput, Formation, Member, TaskHandlingProcess
23
23
  from versionhq.tool.model import Tool, ToolSet
24
24
  from versionhq.tool.cache_handler import CacheHandler
25
25
  from versionhq.tool.tool_handler import ToolHandler
@@ -30,10 +30,16 @@ 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.1.0"
33
+ __version__ = "1.2.1.2"
34
34
  __all__ = [
35
35
  "Agent",
36
36
 
37
+ "AgentNetwork",
38
+ "NetworkOutput",
39
+ "Formation",
40
+ "Member",
41
+ "TaskHandlingProcess",
42
+
37
43
  "LLM",
38
44
  "LLM_CONTEXT_WINDOW_SIZES",
39
45
  "PARAMS",
@@ -70,12 +76,6 @@ __all__ = [
70
76
  "Evaluation",
71
77
  "EvaluationItem",
72
78
 
73
- "Team",
74
- "TeamOutput",
75
- "Formation",
76
- "Member",
77
- "TaskHandlingProcess",
78
-
79
79
  "Tool",
80
80
  "ToolSet",
81
81
  "CacheHandler",