versionhq 1.2.0.4__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.
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/PKG-INFO +21 -8
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/README.md +20 -7
- versionhq-1.2.1.0/docs/core/task/response-field.md +211 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/core/task/task-output.md +1 -1
- versionhq-1.2.1.0/docs/core/task-graph.md +83 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/core/task.md +28 -10
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/index.md +24 -5
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/mkdocs.yml +1 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/pyproject.toml +1 -1
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/__init__.py +2 -2
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/_utils/logger.py +1 -1
- {versionhq-1.2.0.4/src/versionhq/llm → versionhq-1.2.1.0/src/versionhq/graph}/__init__.py +0 -0
- {versionhq-1.2.0.4/src/versionhq/network → versionhq-1.2.1.0/src/versionhq/graph}/model.py +174 -82
- {versionhq-1.2.0.4/src/versionhq/network → versionhq-1.2.1.0/src/versionhq/memory}/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/task/formation.py +2 -2
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/task/model.py +8 -9
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/team/model.py +38 -60
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq.egg-info/PKG-INFO +21 -8
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq.egg-info/SOURCES.txt +6 -5
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/formation_test.py +1 -1
- {versionhq-1.2.0.4/tests/network → versionhq-1.2.1.0/tests/graph}/doc_test.py +10 -4
- versionhq-1.2.1.0/tests/graph/graph_test.py +6 -0
- {versionhq-1.2.0.4/tests/llm → versionhq-1.2.1.0/tests/knowledge}/__init__.py +0 -0
- {versionhq-1.2.0.4/tests/memory → versionhq-1.2.1.0/tests/llm}/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/task/doc_test.py +1 -1
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/team/team_test.py +3 -3
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/uv.lock +1 -1
- versionhq-1.2.0.4/docs/core/task/response-field.md +0 -14
- versionhq-1.2.0.4/tests/network/network_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/.github/workflows/deploy_docs.yml +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/.github/workflows/publish.yml +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/.github/workflows/publish_testpypi.yml +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/.github/workflows/run_tests.yml +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/.github/workflows/security_check.yml +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/.gitignore +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/.pre-commit-config.yaml +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/.python-version +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/LICENSE +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/SECURITY.md +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/db/preprocess.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/CNAME +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/_logos/favicon.ico +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/_logos/logo192.png +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/core/Agent.md +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/core/tool.md +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/quickstart.md +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/docs/stylesheets/main.css +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/requirements-dev.txt +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/requirements.txt +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/runtime.txt +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/setup.cfg +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/_utils/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/_utils/i18n.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/_utils/process_config.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/_utils/usage_metrics.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/_utils/vars.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/agent/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/agent/inhouse_agents.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/agent/model.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/agent/parser.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/agent/rpm_controller.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/cli/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/clients/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/clients/customer/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/clients/customer/model.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/clients/product/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/clients/product/model.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/clients/workflow/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/clients/workflow/model.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/knowledge/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/knowledge/_utils.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/knowledge/embedding.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/knowledge/model.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/knowledge/source.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/knowledge/source_docling.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/knowledge/storage.py +0 -0
- {versionhq-1.2.0.4/src/versionhq/memory → versionhq-1.2.1.0/src/versionhq/llm}/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/llm/llm_vars.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/llm/model.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/memory/contextual_memory.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/memory/model.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/storage/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/storage/base.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/storage/mem0_storage.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/storage/rag_storage.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/storage/task_output_storage.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/storage/utils.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/task/TEMPLATES/Description.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/task/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/task/evaluate.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/task/formatter.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/task/log_handler.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/task/structured_response.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/team/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/team/team_planner.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/tool/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/tool/cache_handler.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/tool/composio_tool.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/tool/composio_tool_vars.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/tool/decorator.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/tool/model.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq/tool/tool_handler.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq.egg-info/dependency_links.txt +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq.egg-info/requires.txt +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/src/versionhq.egg-info/top_level.txt +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/agent/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/agent/agent_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/agent/doc_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/cli/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/clients/customer_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/clients/product_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/clients/workflow_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/conftest.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/doc_test.py +0 -0
- {versionhq-1.2.0.4/tests/knowledge → versionhq-1.2.1.0/tests/graph}/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/knowledge/knowledge_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/knowledge/mock_report_compressed.pdf +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/llm/llm_test.py +0 -0
- {versionhq-1.2.0.4/tests/network → versionhq-1.2.1.0/tests/memory}/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/memory/memory_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/task/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/task/llm_connection_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/task/task_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/team/Prompts/Demo_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/team/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/tool/__init__.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/tool/composio_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/tool/doc_test.py +0 -0
- {versionhq-1.2.0.4 → versionhq-1.2.1.0}/tests/tool/tool_test.py +0 -0
- {versionhq-1.2.0.4 → 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
|
+
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
|
@@ -81,10 +81,10 @@ Requires-Dist: pygraphviz>=1.14; extra == "pygraphviz"
|
|
81
81
|
|
82
82
|
# Overview
|
83
83
|
|
84
|
-
[](https://clickpy.clickhouse.com/dashboard/versionhq)
|
85
85
|

|
86
86
|
[](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
|
87
|
-

|
88
88
|

|
89
89
|

|
90
90
|
|
@@ -106,9 +106,10 @@ A Python framework for agentic orchestration that handles complex task automatio
|
|
106
106
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
107
107
|
|
108
108
|
- [Key Features](#key-features)
|
109
|
-
- [Agent
|
109
|
+
- [Agent Network](#agent-network)
|
110
110
|
- [Graph Theory Concept](#graph-theory-concept)
|
111
|
-
- [
|
111
|
+
- [Task Graph](#task-graph)
|
112
|
+
- [Optimization](#optimization)
|
112
113
|
- [Quick Start](#quick-start)
|
113
114
|
- [Package installation](#package-installation)
|
114
115
|
- [Forming a agent network](#forming-a-agent-network)
|
@@ -139,14 +140,14 @@ A Python framework for agentic orchestration that handles complex task automatio
|
|
139
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.
|
140
141
|
|
141
142
|
|
142
|
-
### Agent
|
143
|
+
### Agent Network
|
143
144
|
|
144
145
|
Agents adapt their formation based on task complexity.
|
145
146
|
|
146
147
|
You can specify a desired formation or allow the agents to determine it autonomously (default).
|
147
148
|
|
148
149
|
|
149
|
-
| | **Solo Agent** | **Supervising** | **
|
150
|
+
| | **Solo Agent** | **Supervising** | **Squad** | **Random** |
|
150
151
|
| :--- | :--- | :--- | :--- | :--- |
|
151
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"> |
|
152
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> |
|
@@ -192,7 +193,19 @@ task_graph.visualize()
|
|
192
193
|
|
193
194
|
<hr />
|
194
195
|
|
195
|
-
###
|
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
|
196
209
|
|
197
210
|
Agents are model-agnostic and can handle multiple tasks, leveraging their own and their peers' knowledge sources, memories, and tools.
|
198
211
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# Overview
|
2
2
|
|
3
|
-
[](https://clickpy.clickhouse.com/dashboard/versionhq)
|
4
4
|

|
5
5
|
[](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
|
6
|
-

|
7
7
|

|
8
8
|

|
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
|
28
|
+
- [Agent Network](#agent-network)
|
29
29
|
- [Graph Theory Concept](#graph-theory-concept)
|
30
|
-
- [
|
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
|
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** | **
|
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
|
-
###
|
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
|
+
```
|
@@ -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.
|
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
|
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]] # <-
|
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(
|
141
|
-
|
142
|
-
|
143
|
-
|
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(
|
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
|
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
|
-
[](https://clickpy.clickhouse.com/dashboard/versionhq)
|
11
11
|

|
12
12
|
[](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
|
13
|
-

|
14
14
|

|
15
15
|

|
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
|
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
|
-
###
|
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
|
|
@@ -15,7 +15,7 @@ exclude = ["test*", "__pycache__", "*.egg-info"]
|
|
15
15
|
|
16
16
|
[project]
|
17
17
|
name = "versionhq"
|
18
|
-
version = "1.2.0
|
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"
|
@@ -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.
|
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
|
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
|
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)
|
File without changes
|