versionhq 1.2.1.0__tar.gz → 1.2.1.1__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.1.0 → versionhq-1.2.1.1}/PKG-INFO +34 -25
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/README.md +33 -24
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/core/task.md +1 -1
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/index.md +4 -4
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/quickstart.md +33 -27
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/pyproject.toml +1 -1
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/__init__.py +9 -9
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/agent/inhouse_agents.py +7 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/agent/model.py +2 -2
- {versionhq-1.2.1.0/src/versionhq/team → versionhq-1.2.1.1/src/versionhq/agent_network}/model.py +88 -68
- {versionhq-1.2.1.0/src/versionhq/graph → versionhq-1.2.1.1/src/versionhq/clients/workflow}/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/clients/workflow/model.py +10 -10
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/knowledge/source.py +2 -2
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/knowledge/source_docling.py +1 -1
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/memory/model.py +1 -1
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/task/formation.py +10 -10
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/task/model.py +7 -7
- {versionhq-1.2.1.0/src/versionhq/team → versionhq-1.2.1.1/src/versionhq/task_graph}/__init__.py +0 -0
- {versionhq-1.2.1.0/src/versionhq/graph → versionhq-1.2.1.1/src/versionhq/task_graph}/model.py +1 -21
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq.egg-info/PKG-INFO +34 -25
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq.egg-info/SOURCES.txt +10 -11
- versionhq-1.2.1.0/tests/team/team_test.py → versionhq-1.2.1.1/tests/agent_network/agent_network_test.py +55 -55
- {versionhq-1.2.1.0/tests/graph → versionhq-1.2.1.1/tests/cli}/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/doc_test.py +31 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/formation_test.py +2 -7
- {versionhq-1.2.1.0/tests/team → versionhq-1.2.1.1/tests/task_graph}/__init__.py +0 -0
- versionhq-1.2.1.0/tests/tool/__init__.py → versionhq-1.2.1.1/tests/task_graph/task_graph_test.py +0 -0
- versionhq-1.2.1.1/tests/tool/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/usecase_test.py +1 -1
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/uv.lock +1 -1
- versionhq-1.2.1.0/src/versionhq/team/team_planner.py +0 -92
- versionhq-1.2.1.0/tests/graph/graph_test.py +0 -6
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/.github/workflows/deploy_docs.yml +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/.github/workflows/publish.yml +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/.github/workflows/publish_testpypi.yml +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/.github/workflows/run_tests.yml +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/.github/workflows/security_check.yml +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/.gitignore +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/.pre-commit-config.yaml +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/.python-version +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/LICENSE +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/SECURITY.md +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/db/preprocess.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/CNAME +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/_logos/favicon.ico +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/_logos/logo192.png +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/core/Agent.md +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/core/task/response-field.md +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/core/task/task-output.md +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/core/task-graph.md +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/core/tool.md +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/docs/stylesheets/main.css +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/mkdocs.yml +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/requirements-dev.txt +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/requirements.txt +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/runtime.txt +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/setup.cfg +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/_utils/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/_utils/i18n.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/_utils/logger.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/_utils/process_config.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/_utils/usage_metrics.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/_utils/vars.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/agent/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/agent/parser.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/agent/rpm_controller.py +0 -0
- {versionhq-1.2.1.0/src/versionhq/cli → versionhq-1.2.1.1/src/versionhq/agent_network}/__init__.py +0 -0
- {versionhq-1.2.1.0/src/versionhq/clients → versionhq-1.2.1.1/src/versionhq/cli}/__init__.py +0 -0
- {versionhq-1.2.1.0/src/versionhq/clients/product → versionhq-1.2.1.1/src/versionhq/clients}/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/clients/customer/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/clients/customer/model.py +0 -0
- {versionhq-1.2.1.0/src/versionhq/clients/workflow → versionhq-1.2.1.1/src/versionhq/clients/product}/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/clients/product/model.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/knowledge/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/knowledge/_utils.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/knowledge/embedding.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/knowledge/model.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/knowledge/storage.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/llm/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/llm/llm_vars.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/llm/model.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/memory/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/memory/contextual_memory.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/storage/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/storage/base.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/storage/mem0_storage.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/storage/rag_storage.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/storage/task_output_storage.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/storage/utils.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/task/TEMPLATES/Description.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/task/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/task/evaluate.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/task/formatter.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/task/log_handler.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/task/structured_response.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/tool/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/tool/cache_handler.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/tool/composio_tool.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/tool/composio_tool_vars.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/tool/decorator.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/tool/model.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq/tool/tool_handler.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq.egg-info/dependency_links.txt +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq.egg-info/requires.txt +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/src/versionhq.egg-info/top_level.txt +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/agent/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/agent/agent_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/agent/doc_test.py +0 -0
- {versionhq-1.2.1.0/tests/team → versionhq-1.2.1.1/tests/agent_network}/Prompts/Demo_test.py +0 -0
- {versionhq-1.2.1.0/tests/cli → versionhq-1.2.1.1/tests/agent_network}/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/clients/customer_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/clients/product_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/clients/workflow_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/conftest.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/knowledge/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/knowledge/knowledge_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/knowledge/mock_report_compressed.pdf +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/llm/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/llm/llm_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/memory/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/memory/memory_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/task/__init__.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/task/doc_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/task/llm_connection_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/task/task_test.py +0 -0
- {versionhq-1.2.1.0/tests/graph → versionhq-1.2.1.1/tests/task_graph}/doc_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/tool/composio_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/tool/doc_test.py +0 -0
- {versionhq-1.2.1.0 → versionhq-1.2.1.1}/tests/tool/tool_test.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: versionhq
|
3
|
-
Version: 1.2.1.
|
3
|
+
Version: 1.2.1.1
|
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
|
@@ -115,6 +115,7 @@ A Python framework for agentic orchestration that handles complex task automatio
|
|
115
115
|
- [Forming a agent network](#forming-a-agent-network)
|
116
116
|
- [Executing tasks](#executing-tasks)
|
117
117
|
- [Supervising](#supervising)
|
118
|
+
- [Supervising](#supervising-1)
|
118
119
|
- [Technologies Used](#technologies-used)
|
119
120
|
- [Project Structure](#project-structure)
|
120
121
|
- [Setting Up a Project](#setting-up-a-project)
|
@@ -305,42 +306,50 @@ This will return a `TaskOutput` object that stores response in plane text, JSON,
|
|
305
306
|
|
306
307
|
### Supervising
|
307
308
|
|
308
|
-
|
309
|
-
import versionhq as vhq
|
309
|
+
## Supervising
|
310
310
|
|
311
|
-
|
312
|
-
agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
|
311
|
+
To create an agent network with one or more manager agents, designate members using the `is_manager` tag.
|
313
312
|
|
314
|
-
|
315
|
-
|
316
|
-
response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
|
317
|
-
allow_delegation=True
|
318
|
-
)
|
313
|
+
```python
|
314
|
+
import versionhq as vhq
|
319
315
|
|
320
|
-
|
321
|
-
|
322
|
-
response_fields=[ResponseField(title="test1", data_type=int, required=True),],
|
323
|
-
allow_delegation=False
|
324
|
-
)
|
316
|
+
agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
|
317
|
+
agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
|
325
318
|
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
319
|
+
task_1 = vhq.Task(
|
320
|
+
description="Analyze the client's business model.",
|
321
|
+
response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
|
322
|
+
allow_delegation=True
|
323
|
+
)
|
324
|
+
|
325
|
+
task_2 = vhq.Task(
|
326
|
+
description="Define a cohort.",
|
327
|
+
response_fields=[vhq.ResponseField(title="test1", data_type=int, required=True),],
|
328
|
+
allow_delegation=False
|
329
|
+
)
|
330
|
+
|
331
|
+
network =vhq.AgentNetwork(
|
332
|
+
members=[
|
333
|
+
vhq.Member(agent=agent_a, is_manager=False, tasks=[task_1]),
|
334
|
+
vhq.Member(agent=agent_b, is_manager=True, tasks=[task_2]), # Agent B as a manager
|
335
|
+
],
|
336
|
+
)
|
337
|
+
res = network.launch()
|
338
|
+
|
339
|
+
assert isinstance(res, vhq.NetworkOutput)
|
340
|
+
assert not [item for item in task_1.processed_agents if "vhq-Delegated-Agent" == item]
|
341
|
+
assert [item for item in task_1.processed_agents if "agent b" == item]
|
342
|
+
```
|
334
343
|
|
335
344
|
This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
|
336
345
|
|
337
|
-
Tasks can be delegated to a
|
346
|
+
Tasks can be delegated to a manager, peers within the agent network, or a completely new agent.
|
338
347
|
|
339
348
|
<hr />
|
340
349
|
|
341
350
|
## Technologies Used
|
342
351
|
|
343
|
-
**Graph
|
352
|
+
**Task Graph**
|
344
353
|
|
345
354
|
* [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
|
346
355
|
* [Matplotlib](https://matplotlib.org/stable/index.html): Visualization library
|
@@ -34,6 +34,7 @@ A Python framework for agentic orchestration that handles complex task automatio
|
|
34
34
|
- [Forming a agent network](#forming-a-agent-network)
|
35
35
|
- [Executing tasks](#executing-tasks)
|
36
36
|
- [Supervising](#supervising)
|
37
|
+
- [Supervising](#supervising-1)
|
37
38
|
- [Technologies Used](#technologies-used)
|
38
39
|
- [Project Structure](#project-structure)
|
39
40
|
- [Setting Up a Project](#setting-up-a-project)
|
@@ -224,42 +225,50 @@ This will return a `TaskOutput` object that stores response in plane text, JSON,
|
|
224
225
|
|
225
226
|
### Supervising
|
226
227
|
|
227
|
-
|
228
|
-
import versionhq as vhq
|
228
|
+
## Supervising
|
229
229
|
|
230
|
-
|
231
|
-
agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
|
230
|
+
To create an agent network with one or more manager agents, designate members using the `is_manager` tag.
|
232
231
|
|
233
|
-
|
234
|
-
|
235
|
-
response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
|
236
|
-
allow_delegation=True
|
237
|
-
)
|
232
|
+
```python
|
233
|
+
import versionhq as vhq
|
238
234
|
|
239
|
-
|
240
|
-
|
241
|
-
response_fields=[ResponseField(title="test1", data_type=int, required=True),],
|
242
|
-
allow_delegation=False
|
243
|
-
)
|
235
|
+
agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
|
236
|
+
agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
|
244
237
|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
238
|
+
task_1 = vhq.Task(
|
239
|
+
description="Analyze the client's business model.",
|
240
|
+
response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
|
241
|
+
allow_delegation=True
|
242
|
+
)
|
243
|
+
|
244
|
+
task_2 = vhq.Task(
|
245
|
+
description="Define a cohort.",
|
246
|
+
response_fields=[vhq.ResponseField(title="test1", data_type=int, required=True),],
|
247
|
+
allow_delegation=False
|
248
|
+
)
|
249
|
+
|
250
|
+
network =vhq.AgentNetwork(
|
251
|
+
members=[
|
252
|
+
vhq.Member(agent=agent_a, is_manager=False, tasks=[task_1]),
|
253
|
+
vhq.Member(agent=agent_b, is_manager=True, tasks=[task_2]), # Agent B as a manager
|
254
|
+
],
|
255
|
+
)
|
256
|
+
res = network.launch()
|
257
|
+
|
258
|
+
assert isinstance(res, vhq.NetworkOutput)
|
259
|
+
assert not [item for item in task_1.processed_agents if "vhq-Delegated-Agent" == item]
|
260
|
+
assert [item for item in task_1.processed_agents if "agent b" == item]
|
261
|
+
```
|
253
262
|
|
254
263
|
This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
|
255
264
|
|
256
|
-
Tasks can be delegated to a
|
265
|
+
Tasks can be delegated to a manager, peers within the agent network, or a completely new agent.
|
257
266
|
|
258
267
|
<hr />
|
259
268
|
|
260
269
|
## Technologies Used
|
261
270
|
|
262
|
-
**Graph
|
271
|
+
**Task Graph**
|
263
272
|
|
264
273
|
* [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
|
265
274
|
* [Matplotlib](https://matplotlib.org/stable/index.html): Visualization library
|
@@ -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
|
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
|
-
###
|
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
|
-
|
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
|
-
|
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
|
-
|
189
|
+
**Setting up a local env file**
|
190
190
|
|
191
191
|
Create `.env` file in the project root and add following:
|
192
192
|
|
@@ -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
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
)
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
)
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
],
|
110
|
-
|
111
|
-
|
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
|
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.
|
18
|
+
version = "1.2.1.1"
|
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"
|
@@ -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.
|
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.
|
33
|
+
__version__ = "1.2.1.1"
|
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",
|
@@ -39,3 +39,10 @@ vhq_formation_planner = Agent(
|
|
39
39
|
"Random is a formation where a single agent handles tasks, asking help from other agents without sharing its memory or knowledge. Typical usecase is that an email agent drafts promo message for the given audience, asking insights on tones from other email agents which oversee other customer clusters, or an agent calls the external, third party agent to deploy the campaign. ",
|
40
40
|
]
|
41
41
|
)
|
42
|
+
|
43
|
+
|
44
|
+
vhq_agent_creator = Agent(
|
45
|
+
role="vhq-Agent Creator",
|
46
|
+
goal="build an agent that can handle the given task",
|
47
|
+
llm="gemini/gemini-2.0-flash-exp",
|
48
|
+
)
|
@@ -95,7 +95,7 @@ class Agent(BaseModel):
|
|
95
95
|
user_prompt_template: Optional[str] = Field(default=None, description="user prompt template")
|
96
96
|
|
97
97
|
# task execution rules
|
98
|
-
|
98
|
+
network: Optional[List[Any]] = Field(default=None, description="store a list of agent networks that the agent belong as a member")
|
99
99
|
allow_delegation: bool = Field(default=False,description="if the agent can delegate the task to another agent or ask some help")
|
100
100
|
max_retry_limit: int = Field(default=2 ,description="max. number of retry for the task execution when an error occurs")
|
101
101
|
maxit: Optional[int] = Field(default=25,description="max. number of total optimization loops conducted when an error occurs")
|
@@ -553,7 +553,7 @@ class Agent(BaseModel):
|
|
553
553
|
|
554
554
|
|
555
555
|
## comment out for now
|
556
|
-
# if self.
|
556
|
+
# if self.network and self.network._train:
|
557
557
|
# task_prompt = self._training_handler(task_prompt=task_prompt)
|
558
558
|
# else:
|
559
559
|
# task_prompt = self._use_trained_data(task_prompt=task_prompt)
|