versionhq 1.2.1.2__tar.gz → 1.2.1.3__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 (135) hide show
  1. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/.github/workflows/deploy_docs.yml +2 -2
  2. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/.gitignore +6 -3
  3. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/PKG-INFO +23 -16
  4. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/README.md +22 -15
  5. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/core/Agent.md +2 -4
  6. versionhq-1.2.1.3/docs/core/task/evaluation.md +8 -0
  7. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/core/task/response-field.md +14 -8
  8. versionhq-1.2.1.3/docs/core/task/task-output.md +79 -0
  9. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/core/task-graph.md +2 -4
  10. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/core/task.md +76 -25
  11. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/core/tool.md +2 -4
  12. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/index.md +45 -51
  13. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/quickstart.md +0 -7
  14. versionhq-1.2.1.3/docs/tags.md +4 -0
  15. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/mkdocs.yml +7 -3
  16. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/pyproject.toml +2 -2
  17. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/__init__.py +1 -1
  18. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent/model.py +7 -8
  19. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/memory/contextual_memory.py +2 -5
  20. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task/formation.py +14 -3
  21. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task/model.py +66 -107
  22. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq.egg-info/PKG-INFO +23 -16
  23. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq.egg-info/SOURCES.txt +3 -0
  24. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/agent/doc_test.py +1 -1
  25. versionhq-1.2.1.3/tests/task/doc_taskoutput_test.py +36 -0
  26. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/task/doc_test.py +32 -4
  27. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/task/task_test.py +73 -108
  28. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/uv.lock +22 -22
  29. versionhq-1.2.1.2/docs/core/task/task-output.md +0 -14
  30. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/.github/workflows/publish.yml +0 -0
  31. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/.github/workflows/publish_testpypi.yml +0 -0
  32. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/.github/workflows/run_tests.yml +0 -0
  33. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/.github/workflows/security_check.yml +0 -0
  34. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/.pre-commit-config.yaml +0 -0
  35. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/.python-version +0 -0
  36. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/LICENSE +0 -0
  37. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/SECURITY.md +0 -0
  38. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/db/preprocess.py +0 -0
  39. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/CNAME +0 -0
  40. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/_logos/favicon.ico +0 -0
  41. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/_logos/logo192.png +0 -0
  42. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/docs/stylesheets/main.css +0 -0
  43. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/requirements-dev.txt +0 -0
  44. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/requirements.txt +0 -0
  45. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/runtime.txt +0 -0
  46. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/setup.cfg +0 -0
  47. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/_utils/__init__.py +0 -0
  48. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/_utils/i18n.py +0 -0
  49. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/_utils/logger.py +0 -0
  50. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/_utils/process_config.py +0 -0
  51. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/_utils/usage_metrics.py +0 -0
  52. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/_utils/vars.py +0 -0
  53. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
  54. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
  55. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent/__init__.py +0 -0
  56. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent/inhouse_agents.py +0 -0
  57. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent/parser.py +0 -0
  58. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent/rpm_controller.py +0 -0
  59. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent_network/__init__.py +0 -0
  60. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/agent_network/model.py +0 -0
  61. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/cli/__init__.py +0 -0
  62. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/clients/__init__.py +0 -0
  63. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/clients/customer/__init__.py +0 -0
  64. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/clients/customer/model.py +0 -0
  65. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/clients/product/__init__.py +0 -0
  66. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/clients/product/model.py +0 -0
  67. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/clients/workflow/__init__.py +0 -0
  68. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/clients/workflow/model.py +0 -0
  69. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/knowledge/__init__.py +0 -0
  70. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/knowledge/_utils.py +0 -0
  71. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/knowledge/embedding.py +0 -0
  72. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/knowledge/model.py +0 -0
  73. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/knowledge/source.py +0 -0
  74. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/knowledge/source_docling.py +0 -0
  75. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/knowledge/storage.py +0 -0
  76. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/llm/__init__.py +0 -0
  77. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/llm/llm_vars.py +0 -0
  78. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/llm/model.py +0 -0
  79. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/memory/__init__.py +0 -0
  80. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/memory/model.py +0 -0
  81. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/storage/__init__.py +0 -0
  82. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/storage/base.py +0 -0
  83. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
  84. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/storage/mem0_storage.py +0 -0
  85. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/storage/rag_storage.py +0 -0
  86. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/storage/task_output_storage.py +0 -0
  87. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/storage/utils.py +0 -0
  88. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task/TEMPLATES/Description.py +0 -0
  89. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task/__init__.py +0 -0
  90. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task/evaluate.py +0 -0
  91. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task/formatter.py +0 -0
  92. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task/log_handler.py +0 -0
  93. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task/structured_response.py +0 -0
  94. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task_graph/__init__.py +0 -0
  95. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/task_graph/model.py +0 -0
  96. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/tool/__init__.py +0 -0
  97. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/tool/cache_handler.py +0 -0
  98. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/tool/composio_tool.py +0 -0
  99. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/tool/composio_tool_vars.py +0 -0
  100. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/tool/decorator.py +0 -0
  101. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/tool/model.py +0 -0
  102. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq/tool/tool_handler.py +0 -0
  103. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq.egg-info/dependency_links.txt +0 -0
  104. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq.egg-info/requires.txt +0 -0
  105. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/src/versionhq.egg-info/top_level.txt +0 -0
  106. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/__init__.py +0 -0
  107. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/agent/__init__.py +0 -0
  108. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/agent/agent_test.py +0 -0
  109. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/agent_network/Prompts/Demo_test.py +0 -0
  110. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/agent_network/__init__.py +0 -0
  111. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/agent_network/agent_network_test.py +0 -0
  112. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/cli/__init__.py +0 -0
  113. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/clients/customer_test.py +0 -0
  114. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/clients/product_test.py +0 -0
  115. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/clients/workflow_test.py +0 -0
  116. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/conftest.py +0 -0
  117. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/doc_test.py +0 -0
  118. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/formation_test.py +0 -0
  119. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/knowledge/__init__.py +0 -0
  120. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/knowledge/knowledge_test.py +0 -0
  121. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/knowledge/mock_report_compressed.pdf +0 -0
  122. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/llm/__init__.py +0 -0
  123. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/llm/llm_test.py +0 -0
  124. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/memory/__init__.py +0 -0
  125. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/memory/memory_test.py +0 -0
  126. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/task/__init__.py +0 -0
  127. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/task/llm_connection_test.py +0 -0
  128. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/task_graph/__init__.py +0 -0
  129. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/task_graph/doc_test.py +0 -0
  130. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/task_graph/task_graph_test.py +0 -0
  131. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/tool/__init__.py +0 -0
  132. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/tool/composio_test.py +0 -0
  133. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/tool/doc_test.py +0 -0
  134. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/tool/tool_test.py +0 -0
  135. {versionhq-1.2.1.2 → versionhq-1.2.1.3}/tests/usecase_test.py +0 -0
@@ -26,5 +26,5 @@ jobs:
26
26
  path: .cache
27
27
  restore-keys: |
28
28
  mkdocs-material-
29
- - run: pip install mkdocs-material
30
- - run: mkdocs gh-deploy --force
29
+ - run: pip install mkdocs-material
30
+ - run: mkdocs gh-deploy --force --clean
@@ -7,25 +7,28 @@ _memo
7
7
  _idea.py
8
8
 
9
9
 
10
-
11
10
  dist/
12
11
  lib/
13
12
  build/
14
13
  .pypirc
14
+ *egg-info/
15
+
15
16
  uploads/
16
17
  sample_dataset/
17
18
  chroma.sqlite3
18
- *egg-info/
19
+
19
20
  test/
20
21
  db/
21
22
  rc-tests/*
22
23
  temp/*
23
24
  .vscode/*
24
25
  assets/*
26
+
25
27
  memo.txt
26
28
  site/
27
- _logs/
28
29
 
30
+ _logs/
31
+ .cache
29
32
  __pycache__
30
33
  .ruff_cache/
31
34
  .pytest_cache/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.1.2
3
+ Version: 1.2.1.3
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
  ![pyenv ver](https://img.shields.io/badge/pyenv-2.5.0-orange)
90
90
 
91
91
 
92
- A Python framework for agentic orchestration that handles complex task automation without human interaction.
92
+ Agentic orchestration framework for multi-agent networks and task graph for complex task automation.
93
93
 
94
94
  **Visit:**
95
95
 
@@ -188,7 +188,14 @@ task_graph.add_dependency(
188
188
  type=vhq.DependencyType.FINISH_TO_FINISH, lag=1, required=False, weight=3
189
189
  )
190
190
 
191
+ # To visualize the graph:
191
192
  task_graph.visualize()
193
+
194
+ # To start executing nodes:
195
+ latest_output, outputs = task_graph.activate()
196
+
197
+ assert isinstance(last_task_output, vhq.TaskOutput)
198
+ assert [k in task_graph.nodes.keys() and v and isinstance(v, vhq.TaskOutput) for k, v in outputs.items()]
192
199
  ```
193
200
 
194
201
  <hr />
@@ -346,34 +353,34 @@ Tasks can be delegated to a manager, peers within the agent network, or a comple
346
353
 
347
354
  ## Technologies Used
348
355
 
349
- **Task Graph**
350
-
351
- * [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
352
- * [Matplotlib](https://matplotlib.org/stable/index.html): Visualization library
353
- * [Graphviz](https://graphviz.org/about/): Graph visualization software
354
-
355
-
356
356
  **Schema, Data Validation**
357
357
 
358
358
  * [Pydantic](https://docs.pydantic.dev/latest/): Data validation and serialization library for Python.
359
359
  * [Upstage](https://console.upstage.ai/docs/getting-started/overview): Document processer for ML tasks. (Use `Document Parser API` to extract data from documents)
360
360
  * [Docling](https://ds4sd.github.io/docling/): Document parsing
361
361
 
362
+ **Workflow, Task Graph**
362
363
 
363
- **Storage**
364
-
365
- * [mem0ai](https://docs.mem0.ai/quickstart#install-package): Agents' memory storage and management.
366
- * [Chroma DB](https://docs.trychroma.com/): Vector database for storing and querying usage data.
367
- * [SQLite](https://www.sqlite.org/docs.html): C-language library to implements a small SQL database engine.
364
+ * [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
365
+ * [Matplotlib](https://matplotlib.org/stable/index.html): For graph visualization.
366
+ * [Graphviz](https://graphviz.org/about/): For graph visualization.
368
367
 
369
- **LLM Integration**
368
+ **LLM Curation**
370
369
 
371
- * [LiteLLM](https://docs.litellm.ai/docs/providers): Integration to diverse LLMs
370
+ * [LiteLLM](https://docs.litellm.ai/docs/providers): LLM orchestration platform
372
371
 
373
372
  **Tools**
374
373
 
375
374
  * [Composio](https://composio.dev/): Conect RAG agents with external tools, Apps, and APIs to perform actions and receive triggers. We use [tools](https://composio.dev/tools) and [RAG tools](https://app.composio.dev/app/ragtool) from Composio toolset.
376
375
 
376
+
377
+ **Storage**
378
+
379
+ * [mem0ai](https://docs.mem0.ai/quickstart#install-package): Agents' memory storage and management.
380
+ * [Chroma DB](https://docs.trychroma.com/): Vector database for storing and querying usage data.
381
+ * [SQLite](https://www.sqlite.org/docs.html): C-language library to implements a small SQL database engine.
382
+
383
+
377
384
  **Deployment**
378
385
 
379
386
  * **Python**: Primary programming language. v3.12.x is recommended
@@ -8,7 +8,7 @@
8
8
  ![pyenv ver](https://img.shields.io/badge/pyenv-2.5.0-orange)
9
9
 
10
10
 
11
- A Python framework for agentic orchestration that handles complex task automation without human interaction.
11
+ Agentic orchestration framework for multi-agent networks and task graph for complex task automation.
12
12
 
13
13
  **Visit:**
14
14
 
@@ -107,7 +107,14 @@ task_graph.add_dependency(
107
107
  type=vhq.DependencyType.FINISH_TO_FINISH, lag=1, required=False, weight=3
108
108
  )
109
109
 
110
+ # To visualize the graph:
110
111
  task_graph.visualize()
112
+
113
+ # To start executing nodes:
114
+ latest_output, outputs = task_graph.activate()
115
+
116
+ assert isinstance(last_task_output, vhq.TaskOutput)
117
+ assert [k in task_graph.nodes.keys() and v and isinstance(v, vhq.TaskOutput) for k, v in outputs.items()]
111
118
  ```
112
119
 
113
120
  <hr />
@@ -265,34 +272,34 @@ Tasks can be delegated to a manager, peers within the agent network, or a comple
265
272
 
266
273
  ## Technologies Used
267
274
 
268
- **Task Graph**
269
-
270
- * [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
271
- * [Matplotlib](https://matplotlib.org/stable/index.html): Visualization library
272
- * [Graphviz](https://graphviz.org/about/): Graph visualization software
273
-
274
-
275
275
  **Schema, Data Validation**
276
276
 
277
277
  * [Pydantic](https://docs.pydantic.dev/latest/): Data validation and serialization library for Python.
278
278
  * [Upstage](https://console.upstage.ai/docs/getting-started/overview): Document processer for ML tasks. (Use `Document Parser API` to extract data from documents)
279
279
  * [Docling](https://ds4sd.github.io/docling/): Document parsing
280
280
 
281
+ **Workflow, Task Graph**
281
282
 
282
- **Storage**
283
-
284
- * [mem0ai](https://docs.mem0.ai/quickstart#install-package): Agents' memory storage and management.
285
- * [Chroma DB](https://docs.trychroma.com/): Vector database for storing and querying usage data.
286
- * [SQLite](https://www.sqlite.org/docs.html): C-language library to implements a small SQL database engine.
283
+ * [NetworkX](https://networkx.org/documentation/stable/reference/introduction.html): A Python package to analyze, create, and manipulate complex graph networks.
284
+ * [Matplotlib](https://matplotlib.org/stable/index.html): For graph visualization.
285
+ * [Graphviz](https://graphviz.org/about/): For graph visualization.
287
286
 
288
- **LLM Integration**
287
+ **LLM Curation**
289
288
 
290
- * [LiteLLM](https://docs.litellm.ai/docs/providers): Integration to diverse LLMs
289
+ * [LiteLLM](https://docs.litellm.ai/docs/providers): LLM orchestration platform
291
290
 
292
291
  **Tools**
293
292
 
294
293
  * [Composio](https://composio.dev/): Conect RAG agents with external tools, Apps, and APIs to perform actions and receive triggers. We use [tools](https://composio.dev/tools) and [RAG tools](https://app.composio.dev/app/ragtool) from Composio toolset.
295
294
 
295
+
296
+ **Storage**
297
+
298
+ * [mem0ai](https://docs.mem0.ai/quickstart#install-package): Agents' memory storage and management.
299
+ * [Chroma DB](https://docs.trychroma.com/): Vector database for storing and querying usage data.
300
+ * [SQLite](https://www.sqlite.org/docs.html): C-language library to implements a small SQL database engine.
301
+
302
+
296
303
  **Deployment**
297
304
 
298
305
  * **Python**: Primary programming language. v3.12.x is recommended
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  tags:
3
- - HTML5
4
- - JavaScript
5
- - CSS
3
+ - Agent Network
6
4
  ---
7
5
 
8
6
  # Agent
@@ -14,7 +12,7 @@ Each agent has its unique knowledge and memory on the past task.
14
12
  You can create one and assign the task or reassign another task to the existing agent after fine-tuning.
15
13
 
16
14
 
17
- ## Core usage
15
+ ## Quick Start
18
16
 
19
17
  By defining its role and goal in a simple sentence, the AI agent will be set up to run on <bold>`gpt-4o`</bold> by default.
20
18
 
@@ -0,0 +1,8 @@
1
+ ---
2
+ tags:
3
+ - Task Graph
4
+ ---
5
+
6
+ # Evaluation
7
+
8
+ Under drafting
@@ -1,23 +1,29 @@
1
1
  ---
2
2
  tags:
3
- - HTML5
4
- - JavaScript
5
- - CSS
3
+ - Task Graph
6
4
  ---
7
5
 
8
- # ResponseField
6
+ # Response Field
9
7
 
10
8
  <class>`class` versionhq.task.model.<bold>ResponseField<bold></class>
11
9
 
12
- A class to store response formats to create JSON response schema.
10
+ A Pydantic class to store response formats to create JSON response schema.
13
11
 
14
12
  <hr/>
15
13
 
16
- ## Core Usage
14
+ ## Variables
17
15
 
18
- `[var]`<bold>`title: str = None`</bold>
16
+ | <div style="width:120px">**Variable**</div> | **Data Type** | **Default** | **Nullable** | **Description** |
17
+ | :--- | :--- | :--- | :--- | :--- |
18
+ | **`title`** | str | None | False | Stores a field title. |
19
+ | **`data_type`** | Type | None | False | Stores data type of the response. |
20
+ | **`items`** | Type | None | True | Stores data type of items in the list. Can leave it None when `data_type` is not list. |
21
+ | **`properties`** | List[`ResponseField`] | None | True | Stores properties as a list of `ResponseFormat` objects when the `data_type` is dict. |
22
+ | **`nullable`** | bool | False | False | If the field is nullable. |
23
+ | **`config`** | Dict[str, Any] | None | True | Stores other configs passed to response schema. |
19
24
 
20
- `[var]`<bold>`data_type: Type = None`</bold>
25
+
26
+ **Quick Start**
21
27
 
22
28
  Define a response format with field titles and data types.
23
29
 
@@ -0,0 +1,79 @@
1
+ ---
2
+ tags:
3
+ - Task Graph
4
+ ---
5
+
6
+ # Task Output
7
+
8
+ <class>`class` versionhq.task.model.<bold>TaskOutput<bold></class>
9
+
10
+ A Pydantic class to store and manage response from the `Task` object.
11
+
12
+ <hr />
13
+
14
+ ## Variables
15
+
16
+ | <div style="width:120px">**Variable**</div> | **Data Type** | **Default** | **Nullable** | **Description** |
17
+ | :--- | :--- | :--- | :--- | :--- |
18
+ | **`task_id`** | UUID | uuid.uuid4() | False | Stores task `id` as an identifier. |
19
+ | **`raw`** | str | None | False | Stores response in plane text format. `None` or `""` when the model returned errors.|
20
+ | **`json_dict`** | Dict[str, Any] | None | False | Stores response in JSON serializable dictionary. When the system failed formatting or executing tasks without response_fields, `{ output: <res.raw> }` will be returned. |
21
+ | **`pydantic`** | Type[`BaseModel`] | None | True | Populates and stores Pydantic class defined in the `pydantic_output` field. `None` if `pydantic_output` is NOT given. |
22
+ | **`tool_output`** | Optional[Any] | None | True | Stores results from the tools of the task or agents ONLY when `tool_res_as_final` set as `True`. |
23
+ | **`callback_output`** | Optional[Any] | None | True | Stores results from callback functions if any. |
24
+ | **`evaluation`** | Optional[InstanceOf[`Evaluation`]] | None | True | Stores overall evaluations and usage of the task output. |
25
+
26
+
27
+ The following snippet demonstrates the `TaskOutput` object when the task is all-in with Pydantic response format, callbacks, tools, and evaluation.
28
+
29
+ ```python
30
+ import versionhq as vhq
31
+ from pydantic import BaseModel
32
+
33
+ class CustomOutput(BaseModel):
34
+ test1: str
35
+ test2: list[str]
36
+
37
+ def dummy_tool():
38
+ return "dummy"
39
+
40
+ def summarize_response(message: str, test1: str, test2: list[str]) -> str:
41
+ return f"""{message}: {test1}, {", ".join(test2)}"""
42
+
43
+ task = vhq.Task(
44
+ description="Research a topic to teach a kid aged 6 about math.",
45
+ pydantic_output=CustomOutput,
46
+ tools=[dummy_tool],
47
+ callback=summarize_response,
48
+ callback_kwargs=dict(message="Hi! Here is the result: "),
49
+ should_evaluate=True, # triggers evaluation
50
+ eval_criteria=["Uniquness", "Fit to audience",],
51
+
52
+ )
53
+ res = task.execute()
54
+
55
+ assert res.task_id == task.id
56
+ assert res.raw
57
+ assert res.json_dict
58
+ assert res.pydantic.test1 and res.pydantic.test2
59
+ assert "Hi! Here is the result: " in res.callback_output
60
+ assert res.pydantic.test1 in res.callback_output and ", ".join(res.pydantic.test2) in res.callback_output
61
+ assert res.tool_output is None
62
+ assert res.evaluation and isinstance(res.evaluation, vhq.Evaluation)
63
+ ```
64
+
65
+
66
+ ## Class Methods
67
+
68
+ | <div style="width:120px">**Method**</div> | **Params** | **Returns** | **Description** |
69
+ | :--- | :--- | :--- | :--- |
70
+ | **`evaluate`** | task: InstanceOf[`Task`] | InstanceOf[`Evaluation`] | Evaluates task output based on the criteria |
71
+
72
+ Ref. <a href="/core/task/evaluation">Evaluation</a> class
73
+
74
+ ## Property
75
+
76
+ | <div style="width:120px">**Property**</div> | **Returns** | **Description** |
77
+ | :--- | :--- | :--- |
78
+ | **`aggregate_score`** | float | Calucurates weighted average eval scores of the task output. |
79
+ | **`json_string`** | str | Returns `json_dict` in string format. |
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  tags:
3
- - HTML5
4
- - JavaScript
5
- - CSS
3
+ - Task Graph
6
4
  ---
7
5
 
8
6
  # TaskGraph
@@ -18,7 +16,7 @@ The following example demonstrates a simple concept of a `supervising` agent net
18
16
  <img src="https://res.cloudinary.com/dfeirxlea/image/upload/v1739337639/pj_m_home/zfg4ccw1m1ww1tpnb0pa.png">
19
17
 
20
18
 
21
- ## Core Usage
19
+ ## Quick Start
22
20
 
23
21
  `TaskGraph` needs at least two `nodes` and one `edges` to connect the nodes to function.
24
22
 
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  tags:
3
- - HTML5
4
- - JavaScript
5
- - CSS
3
+ - Task Graph
6
4
  ---
7
5
 
8
6
  # Task
@@ -15,7 +13,7 @@ Ref. Node / Edge / TaskGraph class
15
13
 
16
14
  <hr />
17
15
 
18
- ## Core usage
16
+ ## Quick Start
19
17
 
20
18
  Create a task by defining its description in one simple sentence. The `description` will be used for task prompting later.
21
19
 
@@ -46,9 +44,7 @@ assert task.processed_agents is not None # Agents will be automatically assigned
46
44
 
47
45
  <hr />
48
46
 
49
- ## Customizing tasks
50
-
51
- ### Structured outputs
47
+ ## Structured Response
52
48
 
53
49
  By default, agents will generate plane text and JSON outputs, and store them in the `TaskOutput` object.
54
50
 
@@ -60,7 +56,7 @@ But you can choose to generate Pydantic class or specifig JSON object as respons
60
56
 
61
57
  **1. Pydantic**
62
58
 
63
- `[var]`<bold>`pydantic_output: Optional[Type[BaseModel]] = "None"`</bold>
59
+ `[var]`<bold>`pydantic_output: Optional[Type[BaseModel]] = None`</bold>
64
60
 
65
61
  Create and add a `custom Pydantic class` as a structured response format to the `pydantic_output` field.
66
62
 
@@ -111,7 +107,7 @@ assert [
111
107
 
112
108
  **2. JSON**
113
109
 
114
- `[var]`<bold>`response_fields: List[InstanceOf[ResponseField]] = "None"`</bold>
110
+ `[var]`<bold>`response_fields: List[InstanceOf[ResponseField]] = None`</bold>
115
111
 
116
112
  Similar to Pydantic, JSON output structure can be defined by using a list of `ResponseField` objects.
117
113
 
@@ -187,6 +183,7 @@ assert [v and type(v) == task.response_fields[i].data_type for i, (k, v) in enum
187
183
 
188
184
  * Ref. <a href="/core/task/response-field">`ResponseField`</a> class
189
185
 
186
+ <hr />
190
187
 
191
188
  **Structuring reponse format**
192
189
 
@@ -236,28 +233,82 @@ def format_response(sub: InstanceOf[Sub], main1: list[Any], main2: dict[str, Any
236
233
 
237
234
  # 3. Execute
238
235
  main_task = vhq.Task(
239
- description="generate random values that strictly follows the given format.",
236
+ description="generate random values that strictly follows the given format",
240
237
  pydantic_output=Main,
241
238
  callback=format_response,
242
239
  callback_kwargs=dict(sub=Sub(sub1=sub_res.pydantic.sub1, sub2=sub_res.pydantic.sub2)),
243
240
  )
244
- res = main_task.execute(context=sub_res.raw) # [Optional] Adding sub_task's response as context.
241
+ res = main_task.execute(context=sub_res.raw) # [Optional] Adding sub_task as a context.
245
242
 
246
243
  assert [item for item in res.callback_output.main1 if isinstance(item, Sub)]
247
244
  ```
248
245
 
249
246
  To automate these manual setups, refer to <a href="/core/agent-network">AgentNetwork</a> class.
250
247
 
248
+ <hr />
249
+
250
+ ## Prompting
251
+
252
+ `[class method]`<bold>`prompt(self, model_provider: str = None, context: Optional[Any] = None) -> str`</bold>
253
+
254
+ Prompts are generated automatically based on the task `description`, response format, context, agent `role`, and `goal`.
255
+
256
+
257
+ **Context**
258
+
259
+ The following snippet demonstrates how to add `context` to the prompt.
260
+
261
+ ```python
262
+ import versionhq as vhq
263
+
264
+ sub_task_1 = vhq.Task(description="Run a sub demo part 1")
265
+ sub_res = sub_task_1.execute()
266
+ sub_task_2 = vhq.Task(description="Run a sub demo part 2")
267
+ task = vhq.Task(description="Run a main demo")
268
+ context = [sub_res, sub_task_2, "context to add in string"]
269
+ res = task.execute(context=context)
270
+
271
+ # Explicitly mentioned. `task.execute()` will trigger the following:
272
+ task_prompt = task._prompt(context=context)
273
+
274
+ assert sub_res.raw in task_prompt
275
+ assert sub_task_2.output.raw in task_prompt
276
+ assert "context to add in string" in task_prompt
277
+ assert res
278
+ ```
279
+
280
+ Context can consist of `Task` objects, `TaskOutput` objects, plain text `strings`, or `lists` containing any of these.
281
+
282
+ In this scenario, `sub_task_2` executes before the main task. Its string output is then incorporated into the main task's context prompt on top of other context before the main task is executed.
251
283
 
252
- <!-- ### Context
253
- # task setup
254
- context: Optional[List["Task"]] = Field(default=None, description="other tasks whose outputs should be used as context")
255
- prompt_context: Optional[str] = Field(default=None)
256
284
 
285
+ ## Executing
257
286
 
258
- ### Execution rules
259
- EXECUTION type
260
- allow_delegation: bool = Field(default=False, description="ask other agents for help and run the task instead")
287
+ **Agent delegation**
288
+
289
+ `[var]`<bold>`allow_delegation: bool = False`</bold>
290
+
291
+ You can assign another agent to complete the task:
292
+
293
+ ```python
294
+ import versionhq as vhq
295
+
296
+ task = vhq.Task(
297
+ description="return the output following the given prompt.",
298
+ response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True)],
299
+ allow_delegation=True
300
+ )
301
+ task.execute()
302
+
303
+ assert task.output is not None
304
+ assert "vhq-Delegated-Agent" in task.processed_agents # delegated agent
305
+ assert task.delegations ==1
306
+ ```
307
+
308
+
309
+ <!--
310
+
311
+ ## Callbacks
261
312
  callback: Optional[Callable] = Field(default=None, description="callback to be executed after the task is completed.")
262
313
  callback_kwargs: Optional[Dict[str, Any]] = Field(default_factory=dict, description="kwargs for the callback when the callback is callable")
263
314
 
@@ -265,12 +316,13 @@ EXECUTION type
265
316
  ### tools
266
317
  tools: Optional[List[ToolSet | Tool | Any]] = Field(default_factory=list, description="tools that the agent can use aside from their tools")
267
318
  can_use_agent_tools: bool = Field(default=False, description="whether the agent can use their own tools when executing the task")
268
- tool_res_as_final: bool = Field(default=False, description="when set True, tools res will be stored in the `TaskOutput`") -->
319
+ tool_res_as_final: bool = Field(default=False, description="when set True, tools res will be stored in the `TaskOutput`")
320
+
269
321
 
270
322
 
271
- <hr />
272
323
 
273
324
  ## Executing tasks
325
+ EXECUTION type
274
326
 
275
327
  ### Sync
276
328
 
@@ -288,13 +340,12 @@ EXECUTION type
288
340
 
289
341
 
290
342
 
291
- ## Evaluating task outputs
292
- <!--
293
- # evaluation
343
+ ## Evaluating
344
+
294
345
  should_evaluate: bool = Field(default=False, description="True to run the evaluation flow")
295
- eval_criteria: Optional[List[str]] = Field(default_factory=list, description="criteria to evaluate the outcome. i.e., fit to the brand tone") -->
346
+ eval_criteria: Optional[List[str]] = Field(default_factory=list, description="criteria to evaluate the outcome. i.e., fit to the brand tone")
296
347
 
297
348
 
298
349
  ## Recording
299
350
 
300
- <!-- output: Optional[TaskOutput] = Field(default=None, description="store the final task output in TaskOutput class") -->
351
+ output: Optional[TaskOutput] = Field(default=None, description="store the final task output in TaskOutput class") -->
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  tags:
3
- - HTML5
4
- - JavaScript
5
- - CSS
3
+ - Utils
6
4
  ---
7
5
 
8
6
  # Tool
@@ -11,7 +9,7 @@ tags:
11
9
 
12
10
  Tool is an unique function that the agent can utilize when they execute the task with or without LLM.
13
11
 
14
- ## Core usage
12
+ ## Quick Start
15
13
 
16
14
  By defining the function, you can let the agent start to use it when they get an approval.
17
15