versionhq 1.2.1.7__py3-none-any.whl → 1.2.1.9__py3-none-any.whl

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/__init__.py CHANGED
@@ -31,7 +31,7 @@ from versionhq.task.formation import form_agent_network
31
31
  from versionhq.task_graph.draft import workflow
32
32
 
33
33
 
34
- __version__ = "1.2.1.7"
34
+ __version__ = "1.2.1.9"
35
35
  __all__ = [
36
36
  "Agent",
37
37
 
versionhq/task/model.py CHANGED
@@ -276,7 +276,7 @@ class Task(BaseModel):
276
276
 
277
277
  # tool usage
278
278
  tools: Optional[List[ToolSet | Tool | Any]] = Field(default_factory=list, description="tools that the agent can use aside from their tools")
279
- can_use_agent_tools: bool = Field(default=False, description="whether the agent can use their own tools when executing the task")
279
+ can_use_agent_tools: bool = Field(default=True, description="whether the agent can use their own tools when executing the task")
280
280
  tool_res_as_final: bool = Field(default=False, description="when set True, tools res will be stored in the `TaskOutput`")
281
281
 
282
282
  # executing
@@ -49,7 +49,7 @@ def workflow(final_output: Type[BaseModel], context: Any = None, human: bool = T
49
49
  )
50
50
 
51
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.",
52
+ description=dedent(f"Design a resource-efficient workflow to achieve the following goal: {final_output_prompt}. The workflow should consist of a list of detailed tasks that represent decision making points, 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
53
  response_fields=[
54
54
  ResponseField(title="tasks", data_type=list, items=dict, properties=[
55
55
  ResponseField(title="name", data_type=str),
@@ -79,23 +79,24 @@ def workflow(final_output: Type[BaseModel], context: Any = None, human: bool = T
79
79
  dependency_types = [DependencyType[dt] if DependencyType[dt] else DependencyType.FINISH_TO_START for dt in res["dependency_types"]]
80
80
 
81
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]
82
+ source = [v for v in task_graph.nodes.values() if v.task.name == res["name"]][0]
83
+ target = [v for v in task_graph.nodes.values() if v.task.name == target_task_name][0]
84
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)
85
+ task_graph.add_dependency(
86
+ source_node_identifier=source.identifier, target_node_identifier=target.identifier, dependency_type=dependency_type)
86
87
 
87
- ## test purpose
88
- # task_graph.visualize()
89
88
 
90
- # if human:
91
- # print('Proceed? Y/n:')
92
- # x = input()
89
+ task_graph.visualize()
93
90
 
94
- # if x.lower() == "y":
95
- # print("ok. generating agent network")
91
+ if human:
92
+ print('Proceed? Y/n:')
93
+ x = input()
96
94
 
97
- # else:
98
- # request = input("request?")
99
- # print('ok. regenerating the graph based on your input: ', request)
95
+ if x.lower() == "y":
96
+ print("ok. generating agent network")
97
+
98
+ else:
99
+ request = input("request?")
100
+ print('ok. regenerating the graph based on your input: ', request)
100
101
 
101
102
  return task_graph
@@ -398,7 +398,7 @@ class TaskGraph(Graph):
398
398
  return self._return_node_object(identifier).status
399
399
 
400
400
 
401
- def visualize(self, layout: str = None):
401
+ def visualize(self, layout: str = None, should_save: bool = False):
402
402
  from matplotlib.lines import Line2D
403
403
  from versionhq.task_graph.colors import white, black, darkgrey, grey, primary, orange, lightgreen, green, darkgreen, darkergreen
404
404
 
@@ -475,7 +475,9 @@ class TaskGraph(Graph):
475
475
 
476
476
  plt.legend(handles=legend_elements, loc='lower right')
477
477
  plt.title(f"vhq-Diagram {str(self.id)}")
478
- self._save(title=f"vhq-Diagram {str(self.id)}")
478
+
479
+ if should_save:
480
+ self._save(title=f"vhq-Diagram {str(self.id)}")
479
481
  plt.show(block=False)
480
482
 
481
483
 
@@ -559,5 +561,7 @@ class TaskGraph(Graph):
559
561
  node_identifier = edge.target.identifier
560
562
  self.outputs.update({ node_identifier: res })
561
563
 
564
+ self.concl = res
565
+ self.concl_template = self.concl_template if self.concl_template else res.pydantic.__class__ if res.pydantic else None
562
566
  # last_task_output = [v for v in self.outputs.values()][len([v for v in self.outputs.values()]) - 1] if [v for v in self.outputs.values()] else None
563
567
  return res, self.outputs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: versionhq
3
- Version: 1.2.1.7
3
+ Version: 1.2.1.9
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,7 +81,7 @@ Requires-Dist: pygraphviz>=1.14; extra == "pygraphviz"
81
81
 
82
82
  # Overview
83
83
 
84
- [![DL](https://img.shields.io/badge/Download-17K+-red)](https://clickpy.clickhouse.com/dashboard/versionhq)
84
+ [![DL](https://img.shields.io/badge/Download-20K+-red)](https://clickpy.clickhouse.com/dashboard/versionhq)
85
85
  ![MIT license](https://img.shields.io/badge/License-MIT-green)
86
86
  [![Publisher](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml/badge.svg)](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
87
87
  ![PyPI](https://img.shields.io/badge/PyPI-v1.2.1+-blue)
@@ -93,11 +93,10 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
93
93
 
94
94
  **Visit:**
95
95
 
96
- - [PyPI](https://pypi.org/project/versionhq/)
96
+ - [Playground](https://versi0n.io/playground)
97
97
  - [Docs](https://docs.versi0n.io)
98
98
  - [Github Repository](https://github.com/versionHQ/multi-agent-system)
99
- - [Playground](https://versi0n.io/)
100
-
99
+ - [PyPI](https://pypi.org/project/versionhq/)
101
100
 
102
101
  <hr />
103
102
 
@@ -594,10 +593,4 @@ Common issues and solutions:
594
593
  ## Frequently Asked Questions (FAQ)
595
594
  **Q. Where can I see if the agent is working?**
596
595
 
597
- A. Visit [playground](https://versi0n.io).
598
-
599
-
600
- **Q. How do you analyze the customer?**
601
-
602
- A. We employ soft clustering for each customer.
603
- <img width="200" src="https://res.cloudinary.com/dfeirxlea/image/upload/v1732732628/pj_m_agents/ito937s5d5x0so8isvw6.png">
596
+ A. Visit [playground](https://versi0n.io/playground).
@@ -1,4 +1,4 @@
1
- versionhq/__init__.py,sha256=S0jSgBSycw_tEb8kM_GR2-pM-ws0e1ScMMK7LWIE4eI,2882
1
+ versionhq/__init__.py,sha256=wkRkbQtV1wbYa2ylp1hBj0jhF8uUwjbIbxLHFBjXpgA,2882
2
2
  versionhq/_utils/__init__.py,sha256=dzoZr4cBlh-2QZuPzTdehPUCe9lP1dmRtauD7qTjUaA,158
3
3
  versionhq/_utils/i18n.py,sha256=TwA_PnYfDLA6VqlUDPuybdV9lgi3Frh_ASsb_X8jJo8,1483
4
4
  versionhq/_utils/logger.py,sha256=zgogTwAY-ujDLrdryAKhdtoaNe1nOFajmEN0V8aMR34,3155
@@ -47,13 +47,13 @@ versionhq/task/evaluate.py,sha256=WdUgjbZL62XrxyWe5MTz29scfzwmuAHGxJ7GvAB8Fmk,39
47
47
  versionhq/task/formation.py,sha256=WH604q9bRmWH7KQCrk2qKJwisCopYX5CjJvsj4TgFjI,6894
48
48
  versionhq/task/formatter.py,sha256=N8Kmk9vtrMtBdgJ8J7RmlKNMdZWSmV8O1bDexmCWgU0,643
49
49
  versionhq/task/log_handler.py,sha256=LT7YnO7gcPR9IZS7eRvMjnHh8crMBFtqduxd8dxIbkk,1680
50
- versionhq/task/model.py,sha256=b2d3mpac1Mah_21vk1TfcvBDiz94-3ZorCoK8pfIxkE,28530
50
+ versionhq/task/model.py,sha256=ASc7l5Lhm9tfINYGKtBikqaLAXbobPQNd0xKFv_IcS0,28529
51
51
  versionhq/task/structured_response.py,sha256=4q-hQPu7oMMHHXEzh9YW4SJ7N5eCZ7OfZ65juyl_jCI,5000
52
52
  versionhq/task/TEMPLATES/Description.py,sha256=V-4kh8xpQTKOcDMi2xnuP-fcNk6kuoz1_5tYBlDLQWQ,420
53
53
  versionhq/task_graph/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  versionhq/task_graph/colors.py,sha256=naJCx4Vho4iuJtbW8USUXb-M5uYvd5ds2p8qbjUfRus,669
55
- versionhq/task_graph/draft.py,sha256=nALpwFIDEEhij64ezMRKyNhmyyiXIhzA-6wpcU35xIs,4772
56
- versionhq/task_graph/model.py,sha256=ZXpuG6f1OZBrGV0Ai1kBuRDNSlwj17WH5GAuWvTWjFQ,23545
55
+ versionhq/task_graph/draft.py,sha256=MknM7lRB2-9dcNfUoj_EMeV6MNOQu1rseIj6hzCgISg,4805
56
+ versionhq/task_graph/model.py,sha256=d1xuVmTbCZL64gO_byo5PCejudNkPfGf1YIp1s3pPOk,23761
57
57
  versionhq/tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
58
  versionhq/tool/cache_handler.py,sha256=iL8FH7X0G-cdT0uhJwzuhLDaadTXOdfybZcDy151-es,1085
59
59
  versionhq/tool/composio_tool.py,sha256=38mEiVvTkuw1BLD233Bl1Gwxbpss1yfQiZLTWwX6BdA,8648
@@ -61,8 +61,8 @@ versionhq/tool/composio_tool_vars.py,sha256=FvBuEXsOQUYnN7RTFxT20kAkiEYkxWKkiVtg
61
61
  versionhq/tool/decorator.py,sha256=C4ZM7Xi2gwtEMaSeRo-geo_g_MAkY77WkSLkAuY0AyI,1205
62
62
  versionhq/tool/model.py,sha256=PO4zNWBZcJhYVur381YL1dy6zqurio2jWjtbxOxZMGI,12194
63
63
  versionhq/tool/tool_handler.py,sha256=2m41K8qo5bGCCbwMFferEjT-XZ-mE9F0mDUOBkgivOI,1416
64
- versionhq-1.2.1.7.dist-info/LICENSE,sha256=cRoGGdM73IiDs6nDWKqPlgSv7aR4n-qBXYnJlCMHCeE,1082
65
- versionhq-1.2.1.7.dist-info/METADATA,sha256=-7ao4UNVn_g-zS5xNXuzJ-XFrbSCZ2dkcXc9IGVO-gA,22226
66
- versionhq-1.2.1.7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
67
- versionhq-1.2.1.7.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
68
- versionhq-1.2.1.7.dist-info/RECORD,,
64
+ versionhq-1.2.1.9.dist-info/LICENSE,sha256=cRoGGdM73IiDs6nDWKqPlgSv7aR4n-qBXYnJlCMHCeE,1082
65
+ versionhq-1.2.1.9.dist-info/METADATA,sha256=IMHP3lKOGuh4jMBkKCMTB7_Rwt6VUHFTKrOk7_HkGy8,22032
66
+ versionhq-1.2.1.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
67
+ versionhq-1.2.1.9.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
68
+ versionhq-1.2.1.9.dist-info/RECORD,,