versionhq 1.1.7.4__tar.gz → 1.1.7.5__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 (67) hide show
  1. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/PKG-INFO +51 -8
  2. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/README.md +50 -7
  3. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/pyproject.toml +1 -1
  4. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/__init__.py +1 -1
  5. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/clients/workflow/model.py +7 -7
  6. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/task/model.py +9 -7
  7. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq.egg-info/PKG-INFO +51 -8
  8. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/clients/workflow_test.py +1 -1
  9. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/task/task_test.py +22 -22
  10. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/uv.lock +1 -1
  11. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/.github/workflows/publish.yml +0 -0
  12. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/.github/workflows/publish_testpypi.yml +0 -0
  13. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/.github/workflows/run_tests.yml +0 -0
  14. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/.github/workflows/security_check.yml +0 -0
  15. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/.gitignore +0 -0
  16. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/.pre-commit-config.yaml +0 -0
  17. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/.python-version +0 -0
  18. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/LICENSE +0 -0
  19. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/SECURITY.md +0 -0
  20. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/db/preprocess.py +0 -0
  21. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/requirements.txt +0 -0
  22. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/runtime.txt +0 -0
  23. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/setup.cfg +0 -0
  24. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/_utils/__init__.py +0 -0
  25. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/_utils/cache_handler.py +0 -0
  26. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/_utils/i18n.py +0 -0
  27. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/_utils/logger.py +0 -0
  28. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/_utils/process_config.py +0 -0
  29. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/_utils/rpm_controller.py +0 -0
  30. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/_utils/usage_metrics.py +0 -0
  31. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
  32. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
  33. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/agent/__init__.py +0 -0
  34. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/agent/model.py +0 -0
  35. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/agent/parser.py +0 -0
  36. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/cli/__init__.py +0 -0
  37. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/clients/__init__.py +0 -0
  38. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/clients/customer/__init__.py +0 -0
  39. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/clients/customer/model.py +0 -0
  40. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/clients/product/__init__.py +0 -0
  41. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/clients/product/model.py +0 -0
  42. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/clients/workflow/__init__.py +0 -0
  43. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/llm/__init__.py +0 -0
  44. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/llm/llm_vars.py +0 -0
  45. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/llm/model.py +0 -0
  46. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/task/__init__.py +0 -0
  47. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/task/formatter.py +0 -0
  48. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/team/__init__.py +0 -0
  49. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/team/model.py +0 -0
  50. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/team/team_planner.py +0 -0
  51. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/tool/__init__.py +0 -0
  52. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/tool/decorator.py +0 -0
  53. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/tool/model.py +0 -0
  54. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq/tool/tool_handler.py +0 -0
  55. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq.egg-info/SOURCES.txt +0 -0
  56. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq.egg-info/dependency_links.txt +0 -0
  57. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq.egg-info/requires.txt +0 -0
  58. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/src/versionhq.egg-info/top_level.txt +0 -0
  59. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/__init__.py +0 -0
  60. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/agent/__init__.py +0 -0
  61. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/agent/agent_test.py +0 -0
  62. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/cli/__init__.py +0 -0
  63. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/conftest.py +0 -0
  64. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/task/__init__.py +0 -0
  65. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/team/Prompts/Demo_test.py +0 -0
  66. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/team/__init__.py +0 -0
  67. {versionhq-1.1.7.4 → versionhq-1.1.7.5}/tests/team/team_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: versionhq
3
- Version: 1.1.7.4
3
+ Version: 1.1.7.5
4
4
  Summary: LLM orchestration frameworks for model-agnostic AI agents that handle complex outbound workflows
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -52,7 +52,11 @@ Requires-Dist: wheel>=0.45.1
52
52
 
53
53
  # Overview
54
54
 
55
- ![MIT license](https://img.shields.io/badge/License-MIT-green) [![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) ![PyPI](https://img.shields.io/badge/PyPI-v1.1.7.3-blue) ![python ver](https://img.shields.io/badge/Python-3.12/3.13-purple) ![pyenv ver](https://img.shields.io/badge/pyenv-2.4.23-orange)
55
+ ![MIT license](https://img.shields.io/badge/License-MIT-green)
56
+ [![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)
57
+ ![PyPI](https://img.shields.io/badge/PyPI-v1.1.7.5-blue)
58
+ ![python ver](https://img.shields.io/badge/Python-3.12/3.13-purple)
59
+ ![pyenv ver](https://img.shields.io/badge/pyenv-2.4.23-orange)
56
60
 
57
61
 
58
62
  An LLM orchestration frameworks for multi-agent systems with RAG to autopilot outbound workflows.
@@ -64,10 +68,11 @@ Messaging workflows are created at individual level, and will be deployed on thi
64
68
 
65
69
  **Visit:**
66
70
 
67
- - [Landing page](https://home.versi0n.io)
68
- - [Client app](https://versi0n.io/)
69
- - [Orchestration frameworks](https://github.com/versionHQ/multi-agent-system)
70
- - [Test client app](https://github.com/versionHQ/test-client-app)
71
+ - [PyPI](https://pypi.org/project/versionhq/)
72
+ - [Github (LLM orchestration)](https://github.com/versionHQ/multi-agent-system)
73
+ - [Github (Test client app)](https://github.com/versionHQ/test-client-app)
74
+ - [Use case](https://versi0n.io/) - client app (alpha)
75
+
71
76
 
72
77
  <hr />
73
78
 
@@ -87,6 +92,8 @@ LLM-powered `agent`s and `team`s use `tool`s and their own knowledge to complete
87
92
 
88
93
  - [Key Features](#key-features)
89
94
  - [Usage](#usage)
95
+ - [Case 1. Build an AI agent on LLM of your choice and execute a task:](#case-1-build-an-ai-agent-on-llm-of-your-choice-and-execute-a-task)
96
+ - [Case 2. Form a team to handle multiple tasks:](#case-2-form-a-team-to-handle-multiple-tasks)
90
97
  - [Technologies Used](#technologies-used)
91
98
  - [Project Structure](#project-structure)
92
99
  - [Setup](#setup)
@@ -132,7 +139,8 @@ Multiple `agents` can form a `team` to complete complex tasks together.
132
139
 
133
140
  2. You can use the `versionhq` module in your Python app.
134
141
 
135
- - **i.e.,** Make LLM-based agent execute the task and return JSON dict.
142
+
143
+ ### Case 1. Build an AI agent on LLM of your choice and execute a task:
136
144
 
137
145
  ```
138
146
  from versionhq.agent.model import Agent
@@ -142,6 +150,7 @@ Multiple `agents` can form a `team` to complete complex tasks together.
142
150
  role="demo",
143
151
  goal="amazing project goal",
144
152
  skillsets=["skill_1", "skill_2", ],
153
+ tools=["amazing RAG tool",]
145
154
  llm="llm-of-your-choice"
146
155
  )
147
156
 
@@ -165,7 +174,41 @@ This will return a dictionary with keys defined in the `ResponseField`.
165
174
  { test1: "answer1", "test2": ["answer2-1", "answer2-2", "answer2-3",] }
166
175
  ```
167
176
 
168
- For more info: [PyPI package](https://pypi.org/project/versionhq/)
177
+ ### Case 2. Form a team to handle multiple tasks:
178
+
179
+ ```
180
+ from versionhq.agent.model import Agent
181
+ from versionhq.task.model import Task, ResponseField
182
+ from versionhq.team.model import Team, TeamMember
183
+
184
+ agent_a = Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
185
+ agent_b = Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
186
+
187
+ task_1 = Task(
188
+ description="Analyze the client's business model.",
189
+ output_field_list=[ResponseField(title="test1", type=str, required=True),],
190
+ allow_delegation=True
191
+ )
192
+
193
+ task_2 = Task(
194
+ description="Define the cohort.",
195
+ output_field_list=[ResponseField(title="test1", type=int, required=True),],
196
+ allow_delegation=False
197
+ )
198
+
199
+ team = Team(
200
+ members=[
201
+ TeamMember(agent=agent_a, is_manager=False, task=task_1),
202
+ TeamMember(agent=agent_b, is_manager=True, task=task_2),
203
+ ],
204
+ )
205
+ res = team.kickoff()
206
+ ```
207
+
208
+ This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
209
+
210
+ Tasks can be delegated to a team manager, peers in the team, or completely new agent.
211
+
169
212
 
170
213
  <hr />
171
214
 
@@ -1,6 +1,10 @@
1
1
  # Overview
2
2
 
3
- ![MIT license](https://img.shields.io/badge/License-MIT-green) [![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) ![PyPI](https://img.shields.io/badge/PyPI-v1.1.7.3-blue) ![python ver](https://img.shields.io/badge/Python-3.12/3.13-purple) ![pyenv ver](https://img.shields.io/badge/pyenv-2.4.23-orange)
3
+ ![MIT license](https://img.shields.io/badge/License-MIT-green)
4
+ [![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)
5
+ ![PyPI](https://img.shields.io/badge/PyPI-v1.1.7.5-blue)
6
+ ![python ver](https://img.shields.io/badge/Python-3.12/3.13-purple)
7
+ ![pyenv ver](https://img.shields.io/badge/pyenv-2.4.23-orange)
4
8
 
5
9
 
6
10
  An LLM orchestration frameworks for multi-agent systems with RAG to autopilot outbound workflows.
@@ -12,10 +16,11 @@ Messaging workflows are created at individual level, and will be deployed on thi
12
16
 
13
17
  **Visit:**
14
18
 
15
- - [Landing page](https://home.versi0n.io)
16
- - [Client app](https://versi0n.io/)
17
- - [Orchestration frameworks](https://github.com/versionHQ/multi-agent-system)
18
- - [Test client app](https://github.com/versionHQ/test-client-app)
19
+ - [PyPI](https://pypi.org/project/versionhq/)
20
+ - [Github (LLM orchestration)](https://github.com/versionHQ/multi-agent-system)
21
+ - [Github (Test client app)](https://github.com/versionHQ/test-client-app)
22
+ - [Use case](https://versi0n.io/) - client app (alpha)
23
+
19
24
 
20
25
  <hr />
21
26
 
@@ -35,6 +40,8 @@ LLM-powered `agent`s and `team`s use `tool`s and their own knowledge to complete
35
40
 
36
41
  - [Key Features](#key-features)
37
42
  - [Usage](#usage)
43
+ - [Case 1. Build an AI agent on LLM of your choice and execute a task:](#case-1-build-an-ai-agent-on-llm-of-your-choice-and-execute-a-task)
44
+ - [Case 2. Form a team to handle multiple tasks:](#case-2-form-a-team-to-handle-multiple-tasks)
38
45
  - [Technologies Used](#technologies-used)
39
46
  - [Project Structure](#project-structure)
40
47
  - [Setup](#setup)
@@ -80,7 +87,8 @@ Multiple `agents` can form a `team` to complete complex tasks together.
80
87
 
81
88
  2. You can use the `versionhq` module in your Python app.
82
89
 
83
- - **i.e.,** Make LLM-based agent execute the task and return JSON dict.
90
+
91
+ ### Case 1. Build an AI agent on LLM of your choice and execute a task:
84
92
 
85
93
  ```
86
94
  from versionhq.agent.model import Agent
@@ -90,6 +98,7 @@ Multiple `agents` can form a `team` to complete complex tasks together.
90
98
  role="demo",
91
99
  goal="amazing project goal",
92
100
  skillsets=["skill_1", "skill_2", ],
101
+ tools=["amazing RAG tool",]
93
102
  llm="llm-of-your-choice"
94
103
  )
95
104
 
@@ -113,7 +122,41 @@ This will return a dictionary with keys defined in the `ResponseField`.
113
122
  { test1: "answer1", "test2": ["answer2-1", "answer2-2", "answer2-3",] }
114
123
  ```
115
124
 
116
- For more info: [PyPI package](https://pypi.org/project/versionhq/)
125
+ ### Case 2. Form a team to handle multiple tasks:
126
+
127
+ ```
128
+ from versionhq.agent.model import Agent
129
+ from versionhq.task.model import Task, ResponseField
130
+ from versionhq.team.model import Team, TeamMember
131
+
132
+ agent_a = Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
133
+ agent_b = Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
134
+
135
+ task_1 = Task(
136
+ description="Analyze the client's business model.",
137
+ output_field_list=[ResponseField(title="test1", type=str, required=True),],
138
+ allow_delegation=True
139
+ )
140
+
141
+ task_2 = Task(
142
+ description="Define the cohort.",
143
+ output_field_list=[ResponseField(title="test1", type=int, required=True),],
144
+ allow_delegation=False
145
+ )
146
+
147
+ team = Team(
148
+ members=[
149
+ TeamMember(agent=agent_a, is_manager=False, task=task_1),
150
+ TeamMember(agent=agent_b, is_manager=True, task=task_2),
151
+ ],
152
+ )
153
+ res = team.kickoff()
154
+ ```
155
+
156
+ This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
157
+
158
+ Tasks can be delegated to a team manager, peers in the team, or completely new agent.
159
+
117
160
 
118
161
  <hr />
119
162
 
@@ -15,7 +15,7 @@ exclude = ["test*", "__pycache__"]
15
15
 
16
16
  [project]
17
17
  name = "versionhq"
18
- version = "1.1.7.4"
18
+ version = "1.1.7.5"
19
19
  authors = [{ name = "Kuriko Iwai", email = "kuriko@versi0n.io" }]
20
20
  description = "LLM orchestration frameworks for model-agnostic AI agents that handle complex outbound workflows"
21
21
  readme = "README.md"
@@ -17,7 +17,7 @@ from versionhq.team.model import Team, TeamOutput
17
17
  from versionhq.tool.model import Tool
18
18
 
19
19
 
20
- __version__ = "1.1.7.4"
20
+ __version__ = "1.1.7.5"
21
21
  __all__ = [
22
22
  "Agent",
23
23
  "Customer",
@@ -61,21 +61,21 @@ class MessagingComponent(ABC, BaseModel):
61
61
  score: Union[float, InstanceOf[Score]] = Field(default=None)
62
62
 
63
63
 
64
- def store_scoring_result(self, scoring_subject: str, score: Union[int, Score, ScoreFormat] = None):
64
+ def store_scoring_result(self, scoring_subject: str, score_raw: Union[int, Score, ScoreFormat] = None):
65
65
  """
66
66
  Set up the `score` field
67
67
  """
68
68
 
69
- if isinstance(score, Score):
70
- setattr(self, "score", score)
69
+ if isinstance(score_raw, Score):
70
+ setattr(self, "score", score_raw)
71
71
 
72
- elif isinstance(score, ScoreFormat):
72
+ elif isinstance(score_raw, ScoreFormat):
73
73
  score_instance = Score()
74
- setattr(score_instance, scoring_subject, score)
74
+ setattr(score_instance, scoring_subject, score_raw)
75
75
  setattr(self, "score", score_instance)
76
76
 
77
- elif isinstance(score, int) or isinstance(score, float):
78
- score_instance, score_format_instance = Score(), ScoreFormat(rate=score, weight=1)
77
+ elif isinstance(score_raw, int) or isinstance(score_raw, float):
78
+ score_instance, score_format_instance = Score(), ScoreFormat(rate=score_raw, weight=1)
79
79
  setattr(score_instance, "kwargs", { scoring_subject: score_format_instance })
80
80
  setattr(self, "score", score_instance)
81
81
 
@@ -436,9 +436,14 @@ Your outputs MUST adhere to the following format and should NOT include any irre
436
436
  agent = agent_to_delegate
437
437
  self.delegations += 1
438
438
 
439
- output_raw = agent.execute_task(task=self, context=context)
440
- output_json_dict = self.create_json_output(raw_result=output_raw) if self.expected_output_json is True else None
441
- output_pydantic = self.create_pydantic_output(output_json_dict=output_json_dict) if self.expected_output_pydantic else None
439
+ output_raw, output_json_dict, output_pydantic = agent.execute_task(task=self, context=context), None, None
440
+
441
+ if self.expected_output_json:
442
+ output_json_dict = self.create_json_output(raw_result=output_raw)
443
+
444
+ if self.expected_output_pydantic:
445
+ output_pydantic = self.create_pydantic_output(output_json_dict=output_json_dict)
446
+
442
447
  task_output = TaskOutput(
443
448
  task_id=self.id,
444
449
  raw=output_raw,
@@ -451,10 +456,7 @@ Your outputs MUST adhere to the following format and should NOT include any irre
451
456
  # self._set_end_execution_time(start_time)
452
457
 
453
458
  if self.callback:
454
- if isinstance(self.callback, Callable):
455
- self.callback(**self.callback_kwargs)
456
- else:
457
- self.callback(self.output)
459
+ self.callback({ **self.callback_kwargs, **self.output.__dict__ })
458
460
 
459
461
  # if self._execution_span:
460
462
  # # self._telemetry.task_ended(self._execution_span, self, agent.team)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: versionhq
3
- Version: 1.1.7.4
3
+ Version: 1.1.7.5
4
4
  Summary: LLM orchestration frameworks for model-agnostic AI agents that handle complex outbound workflows
5
5
  Author-email: Kuriko Iwai <kuriko@versi0n.io>
6
6
  License: MIT License
@@ -52,7 +52,11 @@ Requires-Dist: wheel>=0.45.1
52
52
 
53
53
  # Overview
54
54
 
55
- ![MIT license](https://img.shields.io/badge/License-MIT-green) [![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) ![PyPI](https://img.shields.io/badge/PyPI-v1.1.7.3-blue) ![python ver](https://img.shields.io/badge/Python-3.12/3.13-purple) ![pyenv ver](https://img.shields.io/badge/pyenv-2.4.23-orange)
55
+ ![MIT license](https://img.shields.io/badge/License-MIT-green)
56
+ [![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)
57
+ ![PyPI](https://img.shields.io/badge/PyPI-v1.1.7.5-blue)
58
+ ![python ver](https://img.shields.io/badge/Python-3.12/3.13-purple)
59
+ ![pyenv ver](https://img.shields.io/badge/pyenv-2.4.23-orange)
56
60
 
57
61
 
58
62
  An LLM orchestration frameworks for multi-agent systems with RAG to autopilot outbound workflows.
@@ -64,10 +68,11 @@ Messaging workflows are created at individual level, and will be deployed on thi
64
68
 
65
69
  **Visit:**
66
70
 
67
- - [Landing page](https://home.versi0n.io)
68
- - [Client app](https://versi0n.io/)
69
- - [Orchestration frameworks](https://github.com/versionHQ/multi-agent-system)
70
- - [Test client app](https://github.com/versionHQ/test-client-app)
71
+ - [PyPI](https://pypi.org/project/versionhq/)
72
+ - [Github (LLM orchestration)](https://github.com/versionHQ/multi-agent-system)
73
+ - [Github (Test client app)](https://github.com/versionHQ/test-client-app)
74
+ - [Use case](https://versi0n.io/) - client app (alpha)
75
+
71
76
 
72
77
  <hr />
73
78
 
@@ -87,6 +92,8 @@ LLM-powered `agent`s and `team`s use `tool`s and their own knowledge to complete
87
92
 
88
93
  - [Key Features](#key-features)
89
94
  - [Usage](#usage)
95
+ - [Case 1. Build an AI agent on LLM of your choice and execute a task:](#case-1-build-an-ai-agent-on-llm-of-your-choice-and-execute-a-task)
96
+ - [Case 2. Form a team to handle multiple tasks:](#case-2-form-a-team-to-handle-multiple-tasks)
90
97
  - [Technologies Used](#technologies-used)
91
98
  - [Project Structure](#project-structure)
92
99
  - [Setup](#setup)
@@ -132,7 +139,8 @@ Multiple `agents` can form a `team` to complete complex tasks together.
132
139
 
133
140
  2. You can use the `versionhq` module in your Python app.
134
141
 
135
- - **i.e.,** Make LLM-based agent execute the task and return JSON dict.
142
+
143
+ ### Case 1. Build an AI agent on LLM of your choice and execute a task:
136
144
 
137
145
  ```
138
146
  from versionhq.agent.model import Agent
@@ -142,6 +150,7 @@ Multiple `agents` can form a `team` to complete complex tasks together.
142
150
  role="demo",
143
151
  goal="amazing project goal",
144
152
  skillsets=["skill_1", "skill_2", ],
153
+ tools=["amazing RAG tool",]
145
154
  llm="llm-of-your-choice"
146
155
  )
147
156
 
@@ -165,7 +174,41 @@ This will return a dictionary with keys defined in the `ResponseField`.
165
174
  { test1: "answer1", "test2": ["answer2-1", "answer2-2", "answer2-3",] }
166
175
  ```
167
176
 
168
- For more info: [PyPI package](https://pypi.org/project/versionhq/)
177
+ ### Case 2. Form a team to handle multiple tasks:
178
+
179
+ ```
180
+ from versionhq.agent.model import Agent
181
+ from versionhq.task.model import Task, ResponseField
182
+ from versionhq.team.model import Team, TeamMember
183
+
184
+ agent_a = Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
185
+ agent_b = Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
186
+
187
+ task_1 = Task(
188
+ description="Analyze the client's business model.",
189
+ output_field_list=[ResponseField(title="test1", type=str, required=True),],
190
+ allow_delegation=True
191
+ )
192
+
193
+ task_2 = Task(
194
+ description="Define the cohort.",
195
+ output_field_list=[ResponseField(title="test1", type=int, required=True),],
196
+ allow_delegation=False
197
+ )
198
+
199
+ team = Team(
200
+ members=[
201
+ TeamMember(agent=agent_a, is_manager=False, task=task_1),
202
+ TeamMember(agent=agent_b, is_manager=True, task=task_2),
203
+ ],
204
+ )
205
+ res = team.kickoff()
206
+ ```
207
+
208
+ This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
209
+
210
+ Tasks can be delegated to a team manager, peers in the team, or completely new agent.
211
+
169
212
 
170
213
  <hr />
171
214
 
@@ -15,7 +15,7 @@ def test_store_scores():
15
15
 
16
16
  messaging_component = MessagingComponent(message="demo")
17
17
  score_raw = 15
18
- messaging_component.store_scoring_result("demo", score=score_raw)
18
+ messaging_component.store_scoring_result("demo", score_raw=score_raw)
19
19
 
20
20
  assert messaging_component.score is not None
21
21
  assert messaging_component.score.result() is not None
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import pytest
3
3
  from unittest.mock import patch
4
- from typing import Union
4
+ from typing import Union, Dict, Any
5
5
  from versionhq.agent.model import Agent
6
6
  from versionhq.task.model import Task, ResponseField, TaskOutput, AgentOutput
7
7
 
@@ -27,8 +27,6 @@ def test_sync_execute_task():
27
27
  ResponseField(title="test1", type=str, required=True),
28
28
  ResponseField(title="test2", type=list, required=True),
29
29
  ],
30
- context=None,
31
- callback=None,
32
30
  )
33
31
  res = task.execute_sync(agent=agent)
34
32
 
@@ -202,14 +200,14 @@ def test_callback():
202
200
  See if the callback function is executed well with kwargs.
203
201
  """
204
202
 
205
- def callback_func(item: str = None):
206
- return f"I am callback with {item}."
207
-
208
- agent = Agent(
209
- role="demo agent 5",
210
- goal="My amazing goals",
211
- )
203
+ def callback_func(kwargs: Dict[str, Any]):
204
+ task_id = kwargs.get("task_id", None)
205
+ added_condition = kwargs.get("added_condition", None)
206
+ assert task_id is not None
207
+ assert added_condition is not None
208
+ return f"Result: {task_id}, condition added: {added_condition}"
212
209
 
210
+ agent = Agent(role="demo agent 5", goal="My amazing goals")
213
211
  task = Task(
214
212
  description="Analyze the client's business model and define the optimal cohort timeframe.",
215
213
  expected_output_json=True,
@@ -218,23 +216,26 @@ def test_callback():
218
216
  ResponseField(title="test1", type=str, required=True),
219
217
  ],
220
218
  callback=callback_func,
221
- callback_kwargs={"item": "demo for pytest"}
219
+ callback_kwargs=dict(added_condition="demo for pytest")
222
220
  )
223
221
 
224
- with patch.object(Agent, "execute_task", return_value="ok") as execute:
225
- execution = task.execute_async(agent=agent)
226
- result = execution.result()
227
- assert result.raw == "ok"
228
- execute.assert_called_once_with(task=task, context=None)
222
+ res = task.execute_sync(agent=agent)
229
223
 
224
+ assert res is not None
225
+ assert isinstance(res, TaskOutput)
226
+ assert res.task_id is task.id
227
+ assert res.raw is not None
228
+
229
+ # with patch.object(Agent, "execute_task", return_value="ok") as execute:
230
+ # execution = task.execute_async(agent=agent)
231
+ # result = execution.result()
232
+ # assert result.raw == "ok"
233
+ # execute.assert_called_once_with(task=task, context=None)
230
234
 
231
235
 
232
- def test_delegate():
233
- agent = Agent(
234
- role="demo agent 6",
235
- goal="My amazing goals",
236
- )
237
236
 
237
+ def test_delegate():
238
+ agent = Agent(role="demo agent 6", goal="My amazing goals")
238
239
  task = Task(
239
240
  description="Analyze the client's business model and define the optimal cohort timeframe.",
240
241
  expected_output_json=True,
@@ -255,5 +256,4 @@ def test_delegate():
255
256
  # def test_conditional_task():
256
257
 
257
258
 
258
-
259
259
  # tools, CONDITIONAL, token usage
@@ -1647,7 +1647,7 @@ wheels = [
1647
1647
 
1648
1648
  [[package]]
1649
1649
  name = "versionhq"
1650
- version = "1.1.7.4"
1650
+ version = "1.1.7.5"
1651
1651
  source = { editable = "." }
1652
1652
  dependencies = [
1653
1653
  { name = "composio" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes