versionhq 1.2.1.5__tar.gz → 1.2.1.6__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.6/.env.sample +18 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/.gitignore +5 -4
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/PKG-INFO +8 -16
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/README.md +7 -15
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/mkdocs.yml +9 -9
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/pyproject.toml +1 -1
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/__init__.py +4 -2
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task/formation.py +1 -1
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task/model.py +5 -5
- versionhq-1.2.1.6/src/versionhq/task_graph/colors.py +28 -0
- versionhq-1.2.1.6/src/versionhq/task_graph/draft.py +101 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task_graph/model.py +155 -141
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq.egg-info/PKG-INFO +8 -16
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq.egg-info/SOURCES.txt +3 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/task_graph/doc_test.py +10 -7
- versionhq-1.2.1.6/tests/task_graph/task_graph_test.py +18 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/uv.lock +99 -99
- versionhq-1.2.1.5/tests/task_graph/task_graph_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/.github/workflows/deploy_docs.yml +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/.github/workflows/publish.yml +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/.github/workflows/publish_testpypi.yml +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/.github/workflows/run_tests.yml +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/.github/workflows/security_check.yml +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/.pre-commit-config.yaml +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/.python-version +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/LICENSE +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/SECURITY.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/db/preprocess.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/CNAME +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/_logos/favicon.ico +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/_logos/logo192.png +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/core/Agent.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/core/task/evaluation.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/core/task/response-field.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/core/task/task-output.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/core/task-graph.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/core/task.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/core/tool.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/index.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/quickstart.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/stylesheets/main.css +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/docs/tags.md +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/requirements-dev.txt +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/requirements.txt +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/runtime.txt +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/setup.cfg +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/_utils/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/_utils/i18n.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/_utils/logger.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/_utils/process_config.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/_utils/usage_metrics.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/_utils/vars.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent/inhouse_agents.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent/parser.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent/rpm_controller.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent_network/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/agent_network/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/cli/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/clients/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/clients/customer/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/clients/customer/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/clients/product/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/clients/product/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/clients/workflow/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/clients/workflow/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/knowledge/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/knowledge/_utils.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/knowledge/embedding.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/knowledge/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/knowledge/source.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/knowledge/source_docling.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/knowledge/storage.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/llm/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/llm/llm_vars.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/llm/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/memory/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/memory/contextual_memory.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/memory/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/storage/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/storage/base.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/storage/mem0_storage.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/storage/rag_storage.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/storage/task_output_storage.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/storage/utils.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task/TEMPLATES/Description.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task/evaluate.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task/formatter.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task/log_handler.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task/structured_response.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/task_graph/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/tool/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/tool/cache_handler.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/tool/composio_tool.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/tool/composio_tool_vars.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/tool/decorator.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/tool/model.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq/tool/tool_handler.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq.egg-info/dependency_links.txt +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq.egg-info/requires.txt +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/src/versionhq.egg-info/top_level.txt +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/agent/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/agent/agent_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/agent/doc_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/agent_network/Prompts/Demo_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/agent_network/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/agent_network/agent_network_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/cli/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/clients/customer_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/clients/product_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/clients/workflow_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/conftest.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/doc_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/formation_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/knowledge/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/knowledge/knowledge_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/knowledge/mock_report_compressed.pdf +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/llm/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/llm/llm_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/memory/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/memory/memory_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/task/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/task/doc_taskoutput_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/task/doc_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/task/llm_connection_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/task/task_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/task_graph/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/tool/__init__.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/tool/composio_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/tool/doc_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/tool/tool_test.py +0 -0
- {versionhq-1.2.1.5 → versionhq-1.2.1.6}/tests/usecase_test.py +0 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
DEFAULT_MODEL_NAME=
|
2
|
+
|
3
|
+
LITELLM_API_KEY=
|
4
|
+
LITELLM_API_BASE=
|
5
|
+
|
6
|
+
OPENAI_API_KEY=
|
7
|
+
GEMINI_API_KEY=
|
8
|
+
OPENROUTER_API_KEY=
|
9
|
+
ANTHROPIC_API_KEY=
|
10
|
+
HUGGINGFACE_API_BASE=
|
11
|
+
HUGGINGFACE_API_KEY=
|
12
|
+
|
13
|
+
UPSTAGE_API_KEY=
|
14
|
+
|
15
|
+
COMPOSIO_API_KEY=
|
16
|
+
COMPOSIO_CLI_KEY=
|
17
|
+
|
18
|
+
MEM0_API_KEY=
|
@@ -4,8 +4,9 @@ destinations.py
|
|
4
4
|
train.py
|
5
5
|
|
6
6
|
_memo
|
7
|
+
memo.txt
|
7
8
|
_idea.py
|
8
|
-
|
9
|
+
site/
|
9
10
|
|
10
11
|
dist/
|
11
12
|
lib/
|
@@ -13,7 +14,7 @@ build/
|
|
13
14
|
.pypirc
|
14
15
|
*egg-info/
|
15
16
|
|
16
|
-
|
17
|
+
.diagrams/
|
17
18
|
sample_dataset/
|
18
19
|
chroma.sqlite3
|
19
20
|
|
@@ -24,8 +25,8 @@ temp/*
|
|
24
25
|
.vscode/*
|
25
26
|
assets/*
|
26
27
|
|
27
|
-
|
28
|
-
|
28
|
+
|
29
|
+
|
29
30
|
|
30
31
|
_logs/
|
31
32
|
.logs/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: versionhq
|
3
|
-
Version: 1.2.1.
|
3
|
+
Version: 1.2.1.6
|
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
|
@@ -89,7 +89,7 @@ Requires-Dist: pygraphviz>=1.14; extra == "pygraphviz"
|
|
89
89
|

|
90
90
|
|
91
91
|
|
92
|
-
Agentic orchestration framework for multi-agent networks and task
|
92
|
+
Agentic orchestration framework for multi-agent networks and task graphs for complex task automation.
|
93
93
|
|
94
94
|
**Visit:**
|
95
95
|
|
@@ -361,7 +361,7 @@ Tasks can be delegated to a manager, peers within the agent network, or a comple
|
|
361
361
|
|
362
362
|
**Workflow, Task Graph**
|
363
363
|
|
364
|
-
* [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
|
364
|
+
* [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks. Ref. [Gallary](https://networkx.org/documentation/latest/auto_examples/index.html)
|
365
365
|
* [Matplotlib](https://matplotlib.org/stable/index.html): For graph visualization.
|
366
366
|
* [Graphviz](https://graphviz.org/about/): For graph visualization.
|
367
367
|
|
@@ -397,7 +397,7 @@ Tasks can be delegated to a manager, peers within the agent network, or a comple
|
|
397
397
|
.github
|
398
398
|
└── workflows/ # Github actions
|
399
399
|
│
|
400
|
-
docs/ # Documentation
|
400
|
+
docs/ # Documentation
|
401
401
|
mkdocs.yml # MkDocs config
|
402
402
|
│
|
403
403
|
src/
|
@@ -413,12 +413,13 @@ src/
|
|
413
413
|
│ └── llm/
|
414
414
|
│ └── ...
|
415
415
|
│
|
416
|
-
└──
|
416
|
+
└── .diagrams/ [.gitignore] # Local directory to store graph diagrams
|
417
417
|
│
|
418
|
-
└── .logs/
|
418
|
+
└── .logs/ [.gitignore] # Local directory to store error/warning logs for debugging
|
419
419
|
│
|
420
420
|
│
|
421
421
|
pyproject.toml # Project config
|
422
|
+
.env.sample # sample .env file
|
422
423
|
|
423
424
|
```
|
424
425
|
|
@@ -475,16 +476,7 @@ pyproject.toml # Project config
|
|
475
476
|
|
476
477
|
### Adding env secrets to .env file
|
477
478
|
|
478
|
-
Create `.env` file in the project root and add following
|
479
|
-
|
480
|
-
```
|
481
|
-
OPENAI_API_KEY=your-openai-api-key
|
482
|
-
GEMINI_API_KEY=your-gemini-api-key
|
483
|
-
LITELLM_API_KEY=your-litellm-api-key
|
484
|
-
COMPOSIO_API_KEY=your-composio-api-key
|
485
|
-
COMPOSIO_CLI_KEY=your-composio-cli-key
|
486
|
-
[OTHER_LLM_INTERFACE_PROVIDER_OF_YOUR_CHOICE]_API_KEY=your-api-key
|
487
|
-
```
|
479
|
+
Create `.env` file in the project root and add secret vars following `.env.sample` file.
|
488
480
|
|
489
481
|
|
490
482
|
<hr />
|
@@ -8,7 +8,7 @@
|
|
8
8
|

|
9
9
|
|
10
10
|
|
11
|
-
Agentic orchestration framework for multi-agent networks and task
|
11
|
+
Agentic orchestration framework for multi-agent networks and task graphs for complex task automation.
|
12
12
|
|
13
13
|
**Visit:**
|
14
14
|
|
@@ -280,7 +280,7 @@ Tasks can be delegated to a manager, peers within the agent network, or a comple
|
|
280
280
|
|
281
281
|
**Workflow, Task Graph**
|
282
282
|
|
283
|
-
* [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
|
283
|
+
* [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks. Ref. [Gallary](https://networkx.org/documentation/latest/auto_examples/index.html)
|
284
284
|
* [Matplotlib](https://matplotlib.org/stable/index.html): For graph visualization.
|
285
285
|
* [Graphviz](https://graphviz.org/about/): For graph visualization.
|
286
286
|
|
@@ -316,7 +316,7 @@ Tasks can be delegated to a manager, peers within the agent network, or a comple
|
|
316
316
|
.github
|
317
317
|
└── workflows/ # Github actions
|
318
318
|
│
|
319
|
-
docs/ # Documentation
|
319
|
+
docs/ # Documentation
|
320
320
|
mkdocs.yml # MkDocs config
|
321
321
|
│
|
322
322
|
src/
|
@@ -332,12 +332,13 @@ src/
|
|
332
332
|
│ └── llm/
|
333
333
|
│ └── ...
|
334
334
|
│
|
335
|
-
└──
|
335
|
+
└── .diagrams/ [.gitignore] # Local directory to store graph diagrams
|
336
336
|
│
|
337
|
-
└── .logs/
|
337
|
+
└── .logs/ [.gitignore] # Local directory to store error/warning logs for debugging
|
338
338
|
│
|
339
339
|
│
|
340
340
|
pyproject.toml # Project config
|
341
|
+
.env.sample # sample .env file
|
341
342
|
|
342
343
|
```
|
343
344
|
|
@@ -394,16 +395,7 @@ pyproject.toml # Project config
|
|
394
395
|
|
395
396
|
### Adding env secrets to .env file
|
396
397
|
|
397
|
-
Create `.env` file in the project root and add following
|
398
|
-
|
399
|
-
```
|
400
|
-
OPENAI_API_KEY=your-openai-api-key
|
401
|
-
GEMINI_API_KEY=your-gemini-api-key
|
402
|
-
LITELLM_API_KEY=your-litellm-api-key
|
403
|
-
COMPOSIO_API_KEY=your-composio-api-key
|
404
|
-
COMPOSIO_CLI_KEY=your-composio-cli-key
|
405
|
-
[OTHER_LLM_INTERFACE_PROVIDER_OF_YOUR_CHOICE]_API_KEY=your-api-key
|
406
|
-
```
|
398
|
+
Create `.env` file in the project root and add secret vars following `.env.sample` file.
|
407
399
|
|
408
400
|
|
409
401
|
<hr />
|
@@ -109,15 +109,15 @@ nav:
|
|
109
109
|
- Home: 'index.md'
|
110
110
|
- Quick Start: 'quickstart.md'
|
111
111
|
- Core Components:
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
112
|
+
- Agent: 'core/agent.md'
|
113
|
+
- Task Graph: 'core/task-graph.md'
|
114
|
+
- Task:
|
115
|
+
- Task: 'core/task.md'
|
116
|
+
- ResponseField: 'core/task/response-field.md'
|
117
|
+
- TaskOutput: 'core/task/task-output.md'
|
118
|
+
- Evaluation: 'core/task/evaluation.md'
|
119
|
+
- Tool: 'core/tool.md'
|
120
|
+
# - Compoio Tools: 'core/composio-tool.md'
|
121
121
|
- Tags: 'tags.md'
|
122
122
|
- Examples:
|
123
123
|
- Playground: https://versi0n.io
|
@@ -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.6"
|
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"
|
@@ -28,9 +28,10 @@ from versionhq.memory.contextual_memory import ContextualMemory
|
|
28
28
|
from versionhq.memory.model import ShortTermMemory,LongTermMemory, UserMemory, MemoryItem
|
29
29
|
|
30
30
|
from versionhq.task.formation import form_agent_network
|
31
|
+
from versionhq.task_graph.draft import workflow
|
31
32
|
|
32
33
|
|
33
|
-
__version__ = "1.2.1.
|
34
|
+
__version__ = "1.2.1.6"
|
34
35
|
__all__ = [
|
35
36
|
"Agent",
|
36
37
|
|
@@ -88,5 +89,6 @@ __all__ = [
|
|
88
89
|
"UserMemory",
|
89
90
|
"MemoryItem",
|
90
91
|
|
91
|
-
"form_agent_network"
|
92
|
+
"form_agent_network",
|
93
|
+
"workflow",
|
92
94
|
]
|
@@ -39,7 +39,7 @@ def form_agent_network(
|
|
39
39
|
pass
|
40
40
|
|
41
41
|
case str():
|
42
|
-
matched = [item for item in Formation.
|
42
|
+
matched = [item for item in Formation.s_ if item == formation.upper()]
|
43
43
|
if matched:
|
44
44
|
formation = getattr(Formation, matched[0])
|
45
45
|
else:
|
@@ -4,6 +4,7 @@ import datetime
|
|
4
4
|
import uuid
|
5
5
|
import inspect
|
6
6
|
import enum
|
7
|
+
from textwrap import dedent
|
7
8
|
from concurrent.futures import Future
|
8
9
|
from hashlib import md5
|
9
10
|
from typing import Any, Dict, List, Set, Optional, Callable, Type
|
@@ -288,7 +289,7 @@ class Task(BaseModel):
|
|
288
289
|
should_evaluate: bool = Field(default=False, description="True to run the evaluation flow")
|
289
290
|
eval_criteria: Optional[List[str]] = Field(default_factory=list, description="criteria to evaluate the outcome. i.e., fit to the brand tone")
|
290
291
|
|
291
|
-
# recording
|
292
|
+
# recording !# REFINEME - eval_callbacks
|
292
293
|
processed_agents: Set[str] = Field(default_factory=set, description="store roles of the agents that executed the task")
|
293
294
|
tool_errors: int = 0
|
294
295
|
delegations: int = 0
|
@@ -364,7 +365,7 @@ Ref. Output image: {output_formats_to_follow}
|
|
364
365
|
else:
|
365
366
|
output_prompt = "Return your response as a valid JSON serializable string, enclosed in double quotes. Do not use single quotes, trailing commas, or other non-standard JSON syntax."
|
366
367
|
|
367
|
-
return output_prompt
|
368
|
+
return dedent(output_prompt)
|
368
369
|
|
369
370
|
|
370
371
|
def _draft_context_prompt(self, context: Any) -> str:
|
@@ -374,7 +375,7 @@ Ref. Output image: {output_formats_to_follow}
|
|
374
375
|
|
375
376
|
context_to_add = None
|
376
377
|
if not context:
|
377
|
-
Logger().log(level="error", color="red", message="Missing a context to add to the prompt. We'll return ''.")
|
378
|
+
# Logger().log(level="error", color="red", message="Missing a context to add to the prompt. We'll return ''.")
|
378
379
|
return context_to_add
|
379
380
|
|
380
381
|
match context:
|
@@ -403,7 +404,7 @@ Ref. Output image: {output_formats_to_follow}
|
|
403
404
|
case _:
|
404
405
|
pass
|
405
406
|
|
406
|
-
return context_to_add
|
407
|
+
return dedent(context_to_add)
|
407
408
|
|
408
409
|
|
409
410
|
def _prompt(self, model_provider: str = None, context: Optional[Any] = None) -> str:
|
@@ -593,7 +594,6 @@ Ref. Output image: {output_formats_to_follow}
|
|
593
594
|
return self._execute_async(agent=agent, context=context)
|
594
595
|
|
595
596
|
|
596
|
-
|
597
597
|
def _execute_sync(self, agent, context: Optional[Any] = None) -> TaskOutput:
|
598
598
|
"""Executes the task synchronously."""
|
599
599
|
return self._execute_core(agent, context)
|
@@ -0,0 +1,28 @@
|
|
1
|
+
white = "#fafafa"
|
2
|
+
black = "#191b1b"
|
3
|
+
darkgrey = "#363636"
|
4
|
+
grey = "#414141"
|
5
|
+
primary = "#B9005B"
|
6
|
+
orange = "#ffb713"
|
7
|
+
lightgreen = "#b8fff5"
|
8
|
+
green = "#00d1b2"
|
9
|
+
darkgreen = "#169d87"
|
10
|
+
darkergreen = "#026b5d"
|
11
|
+
|
12
|
+
|
13
|
+
# $black: #191b1b;
|
14
|
+
# $true-white: #ffffff;
|
15
|
+
# $white: #fafafa;
|
16
|
+
# $grey: #414141;
|
17
|
+
# $light-grey: #f9f9f9;
|
18
|
+
# $border-color: #dedede;
|
19
|
+
# $primary: #B9005B;
|
20
|
+
# $primary-hovered: #9D034F;
|
21
|
+
# $gradient-main: linear-gradient(to right $black $primary);
|
22
|
+
# $linkedin-blue: #0077B5;
|
23
|
+
# $bulma-primary: #00d1b2;
|
24
|
+
# $bluma-primary-dark: #169d87;
|
25
|
+
# $bulma-grey-light: hsl(0 0%, 71%);
|
26
|
+
# $bulma-grey: hsl(0, 0%, 48%);
|
27
|
+
# $bulma-dark: hsl(0, 0%, 21%); //#363636
|
28
|
+
# $bulma-white-ter: #F5F5F5;
|
@@ -0,0 +1,101 @@
|
|
1
|
+
import sys
|
2
|
+
from typing import Type, Any
|
3
|
+
from pydantic import BaseModel
|
4
|
+
from pydantic._internal._model_construction import ModelMetaclass
|
5
|
+
from textwrap import dedent
|
6
|
+
if 'pydantic.main' not in sys.modules:
|
7
|
+
import pydantic.main
|
8
|
+
|
9
|
+
sys.modules['pydantic.main'].ModelMetaclass = ModelMetaclass
|
10
|
+
|
11
|
+
from versionhq.agent.model import Agent
|
12
|
+
from versionhq.task.model import ResponseField
|
13
|
+
from versionhq.task_graph.model import TaskGraph, Task, DependencyType, Node, TaskStatus
|
14
|
+
from versionhq._utils.logger import Logger
|
15
|
+
|
16
|
+
|
17
|
+
def workflow(final_output: Type[BaseModel], context: Any = None, human: bool = True) -> TaskGraph | None:
|
18
|
+
"""
|
19
|
+
Generate a TaskGraph object to generate the givne final_output most resource-efficiently.
|
20
|
+
"""
|
21
|
+
|
22
|
+
if not final_output or not isinstance(final_output, ModelMetaclass):
|
23
|
+
Logger().log(level="error", message="Missing an expected output in Pydantic model.", color="red")
|
24
|
+
return None
|
25
|
+
|
26
|
+
final_output_prompt = ", ".join([k for k in final_output.model_fields.keys()])
|
27
|
+
|
28
|
+
if not final_output_prompt:
|
29
|
+
Logger().log(level="error", message="Expected output is in invalid format.", color="red")
|
30
|
+
return None
|
31
|
+
|
32
|
+
context_prompt = f'We are designing a resource-efficient workflow using graph algorithm concepts to achieve the following goal: {final_output_prompt}.'
|
33
|
+
|
34
|
+
dep_type_prompt = ", ".join([k for k in DependencyType._member_map_.keys()])
|
35
|
+
|
36
|
+
graph_expert = Agent(
|
37
|
+
role="vhq-G Expert",
|
38
|
+
goal="design the most resource-efficient workflow graph to achieve the given goal",
|
39
|
+
knowledge_sources=[
|
40
|
+
"https://en.wikipedia.org/wiki/Graph_theory",
|
41
|
+
# "https://www.geeksforgeeks.org/graph-data-structure-and-algorithms/?ref=lbp",
|
42
|
+
"https://www.geeksforgeeks.org/graph-and-its-representations/",
|
43
|
+
", ".join([k for k in DependencyType._member_map_.keys()]),
|
44
|
+
],
|
45
|
+
llm="gemini-2.0",
|
46
|
+
use_memory=True,
|
47
|
+
maxit=1,
|
48
|
+
max_retry_limit=1,
|
49
|
+
)
|
50
|
+
|
51
|
+
task = Task(
|
52
|
+
description=f"Design a resource-efficient workflow to achieve the following goal: {final_output_prompt}. The workflow should consist of a list of tasks, each with the following information:\nname: A concise name of the task\ndescription: A concise description of the task.\nconnections: A list of target tasks that this task connects to.\ndependency_types: The type of dependency between this task and each of its connected task. Use the following dependency types: {dep_type_prompt}.\n\nPrioritize minimizing resource consumption (computation, memory, and data transfer) when defining tasks, connections, and dependencies. Consider how data is passed between tasks and aim to reduce unnecessary data duplication or transfer. Explain any design choices made to optimize resource usage.",
|
53
|
+
response_fields=[
|
54
|
+
ResponseField(title="tasks", data_type=list, items=dict, properties=[
|
55
|
+
ResponseField(title="name", data_type=str),
|
56
|
+
ResponseField(title="description", data_type=str),
|
57
|
+
ResponseField(title="connections", data_type=list, items=str),
|
58
|
+
ResponseField(title="dependency_types", data_type=list, items=str),
|
59
|
+
]
|
60
|
+
)
|
61
|
+
]
|
62
|
+
)
|
63
|
+
res = task.execute(agent=graph_expert, context=[context_prompt, context])
|
64
|
+
|
65
|
+
if not res:
|
66
|
+
return None
|
67
|
+
|
68
|
+
task_items = res.json_dict["tasks"]
|
69
|
+
tasks = [Task(name=item["name"], description=item["description"]) for item in task_items]
|
70
|
+
nodes = [Node(task=task) for task in tasks]
|
71
|
+
task_graph = TaskGraph(
|
72
|
+
nodes={node.identifier: node for node in nodes},
|
73
|
+
concl=final_output,
|
74
|
+
should_reform=True,
|
75
|
+
)
|
76
|
+
|
77
|
+
for res in task_items:
|
78
|
+
if res["connections"]:
|
79
|
+
dependency_types = [DependencyType[dt] if DependencyType[dt] else DependencyType.FINISH_TO_START for dt in res["dependency_types"]]
|
80
|
+
|
81
|
+
for i, target_task_name in enumerate(res["connections"]):
|
82
|
+
source = [v for k, v in task_graph.nodes.items() if v.task.name == res["name"]][0]
|
83
|
+
target = [v for k, v in task_graph.nodes.items() if v.task.name == target_task_name][0]
|
84
|
+
dependency_type = dependency_types[i]
|
85
|
+
task_graph.add_dependency(source_node_identifier=source.identifier, target_node_identifier=target.identifier, dependency_type=dependency_type)
|
86
|
+
|
87
|
+
## test purpose
|
88
|
+
# task_graph.visualize()
|
89
|
+
|
90
|
+
# if human:
|
91
|
+
# print('Proceed? Y/n:')
|
92
|
+
# x = input()
|
93
|
+
|
94
|
+
# if x.lower() == "y":
|
95
|
+
# print("ok. generating agent network")
|
96
|
+
|
97
|
+
# else:
|
98
|
+
# request = input("request?")
|
99
|
+
# print('ok. regenerating the graph based on your input: ', request)
|
100
|
+
|
101
|
+
return task_graph
|