versionhq 1.2.2.6__py3-none-any.whl → 1.2.2.8__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 +1 -1
- versionhq/llm/llm_vars.py +35 -43
- versionhq/llm/model.py +0 -1
- {versionhq-1.2.2.6.dist-info → versionhq-1.2.2.8.dist-info}/METADATA +46 -49
- {versionhq-1.2.2.6.dist-info → versionhq-1.2.2.8.dist-info}/RECORD +8 -8
- {versionhq-1.2.2.6.dist-info → versionhq-1.2.2.8.dist-info}/LICENSE +0 -0
- {versionhq-1.2.2.6.dist-info → versionhq-1.2.2.8.dist-info}/WHEEL +0 -0
- {versionhq-1.2.2.6.dist-info → versionhq-1.2.2.8.dist-info}/top_level.txt +0 -0
versionhq/__init__.py
CHANGED
versionhq/llm/llm_vars.py
CHANGED
@@ -32,39 +32,30 @@ MODELS = {
|
|
32
32
|
],
|
33
33
|
"anthropic": [
|
34
34
|
"claude-3-7-sonnet-latest",
|
35
|
-
"claude-3-5-
|
36
|
-
"claude-3-5-sonnet-
|
37
|
-
"claude-3-
|
38
|
-
"claude-3-opus-20240229",
|
39
|
-
"claude-3-haiku-20240307",
|
35
|
+
"claude-3-5-haiku-latest",
|
36
|
+
"claude-3-5-sonnet-latest",
|
37
|
+
"claude-3-opus-latest",
|
40
38
|
],
|
41
39
|
"openrouter": [
|
42
40
|
"openrouter/deepseek/deepseek-r1",
|
43
|
-
|
44
41
|
"openrouter/qwen/qwen-2.5-72b-instruct",
|
45
|
-
|
46
|
-
"openrouter/google/gemini-2.0-flash-thinking-exp:free",
|
47
|
-
"openrouter/google/gemini-2.0-flash-thinking-exp-1219:free",
|
48
42
|
"openrouter/google/gemini-2.0-flash-001",
|
49
|
-
|
50
|
-
"openrouter/meta-llama/llama-3.3-70b-instruct",
|
51
|
-
"openrouter/mistralai/mistral-large-2411",
|
43
|
+
"openrouter/mistralai/mistral-large",
|
52
44
|
"openrouter/cohere/command-r-plus",
|
45
|
+
"openrouter/databricks/dbrx-instruct",
|
53
46
|
],
|
54
47
|
"bedrock": [
|
55
48
|
"bedrock/converse/us.meta.llama3-3-70b-instruct-v1:0",
|
56
49
|
"bedrock/us.meta.llama3-2-1b-instruct-v1:0",
|
57
50
|
"bedrock/us.meta.llama3-2-3b-instruct-v1:0",
|
58
51
|
"bedrock/us.meta.llama3-2-11b-instruct-v1:0",
|
59
|
-
|
52
|
+
"bedrock/us.meta.llama3-2-90b-instruct-v1:0",
|
60
53
|
"bedrock/mistral.mistral-7b-instruct-v0:2",
|
61
54
|
"bedrock/mistral.mixtral-8x7b-instruct-v0:1",
|
62
55
|
"bedrock/mistral.mistral-large-2407-v1:0",
|
63
|
-
|
64
56
|
"bedrock/amazon.titan-text-lite-v1",
|
65
57
|
"bedrock/amazon.titan-text-express-v1",
|
66
58
|
"bedrock/amazon.titan-text-premier-v1:0",
|
67
|
-
|
68
59
|
"bedrock/cohere.command-r-plus-v1:0",
|
69
60
|
"bedrock/cohere.command-r-v1:0",
|
70
61
|
"bedrock/cohere.command-text-v14",
|
@@ -93,39 +84,40 @@ LLM_CONTEXT_WINDOW_SIZES = {
|
|
93
84
|
"gpt-4": 8192,
|
94
85
|
"gpt-4o": 128000,
|
95
86
|
"gpt-4o-mini": 128000,
|
96
|
-
"gpt-4-turbo": 128000,
|
97
87
|
"o1-preview": 128000,
|
98
88
|
"o1-mini": 128000,
|
99
89
|
|
100
90
|
"gemini/gemini-1.5-flash": 1048576,
|
101
91
|
"gemini/gemini-1.5-pro": 2097152,
|
102
92
|
"gemini/gemini-2.0-flash-exp": 1048576,
|
103
|
-
|
104
|
-
"
|
105
|
-
|
106
|
-
"claude-3-5-sonnet-
|
107
|
-
"claude-3-
|
108
|
-
|
109
|
-
"
|
110
|
-
"
|
111
|
-
"
|
112
|
-
|
113
|
-
"
|
114
|
-
"
|
115
|
-
|
116
|
-
"
|
117
|
-
"
|
118
|
-
"llama3-
|
119
|
-
"llama3-
|
120
|
-
"
|
121
|
-
"
|
122
|
-
"
|
123
|
-
"
|
124
|
-
"
|
125
|
-
"
|
126
|
-
"
|
127
|
-
"
|
128
|
-
"
|
93
|
+
|
94
|
+
"claude-3-7-sonnet-latest": 200000,
|
95
|
+
"claude-3-5-haiku-latest": 200000,
|
96
|
+
"claude-3-5-sonnet-latest": 200000,
|
97
|
+
"claude-3-opus-latest": 200000,
|
98
|
+
|
99
|
+
"openrouter/deepseek/deepseek-r1" :65336,
|
100
|
+
"openrouter/qwen/qwen-2.5-72b-instruct": 33792,
|
101
|
+
"openrouter/google/gemini-2.0-flash-001": 1048576,
|
102
|
+
"openrouter/mistralai/mistral-large": 32000,
|
103
|
+
"openrouter/cohere/command-r-plus": 128000,
|
104
|
+
"openrouter/databricks/dbrx-instruct": 32768,
|
105
|
+
|
106
|
+
"bedrock/converse/us.meta.llama3-3-70b-instruct-v1:0": 8192,
|
107
|
+
"bedrock/us.meta.llama3-2-1b-instruct-v1:0": 128000,
|
108
|
+
"bedrock/us.meta.llama3-2-3b-instruct-v1:0": 128000,
|
109
|
+
"bedrock/us.meta.llama3-2-11b-instruct-v1:0": 128000,
|
110
|
+
"bedrock/us.meta.llama3-2-90b-instruct-v1:0": 128000,
|
111
|
+
"bedrock/mistral.mistral-7b-instruct-v0:2": 8191,
|
112
|
+
"bedrock/mistral.mixtral-8x7b-instruct-v0:1": 8191,
|
113
|
+
"bedrock/mistral.mistral-large-2407-v1:0": 8191,
|
114
|
+
"bedrock/amazon.titan-text-lite-v1": 4000,
|
115
|
+
"bedrock/amazon.titan-text-express-v1": 8000,
|
116
|
+
"bedrock/amazon.titan-text-premier-v1:0": 32000,
|
117
|
+
"bedrock/cohere.command-r-plus-v1:0": 4096,
|
118
|
+
"bedrock/cohere.command-r-v1:0": 4096,
|
119
|
+
"bedrock/cohere.command-text-v14": 4096,
|
120
|
+
"bedrock/cohere.command-light-text-v14": 4096,
|
129
121
|
}
|
130
122
|
|
131
123
|
|
@@ -142,6 +134,7 @@ PARAMS = {
|
|
142
134
|
"context_window_fallback_dict",
|
143
135
|
"fallbacks",
|
144
136
|
"metadata",
|
137
|
+
"api_key",
|
145
138
|
],
|
146
139
|
"common": [
|
147
140
|
"model",
|
@@ -156,7 +149,6 @@ PARAMS = {
|
|
156
149
|
"n",
|
157
150
|
"stop",
|
158
151
|
# "base_url",
|
159
|
-
# "api_key",
|
160
152
|
],
|
161
153
|
"openai": [
|
162
154
|
"timeout",
|
versionhq/llm/model.py
CHANGED
@@ -69,7 +69,6 @@ class LLM(BaseModel):
|
|
69
69
|
|
70
70
|
_logger: Logger = PrivateAttr(default_factory=lambda: Logger(verbose=True))
|
71
71
|
_init_model_name: str = PrivateAttr(default=None)
|
72
|
-
# _init_config: Optional[Dict[str, Any]] = PrivateAttr(default_factory=dict) # stores llm config passed by client or agent
|
73
72
|
_tokens: int = PrivateAttr(default=0) # aggregate number of tokens consumed
|
74
73
|
|
75
74
|
model: str = Field(default=None)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: versionhq
|
3
|
-
Version: 1.2.2.
|
3
|
+
Version: 1.2.2.8
|
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
|
@@ -91,7 +91,7 @@ Requires-Dist: scikit-learn>=1.6.1; extra == "eval"
|
|
91
91
|

|
92
92
|
[](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
|
93
93
|

|
94
|
-

|
95
95
|

|
96
96
|
|
97
97
|
|
@@ -99,10 +99,10 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
|
|
99
99
|
|
100
100
|
**Visit:**
|
101
101
|
|
102
|
-
- [Playground](https://versi0n.io/
|
102
|
+
- [Playground](https://versi0n.io/)
|
103
103
|
- [Docs](https://docs.versi0n.io)
|
104
|
-
- [Github
|
105
|
-
- [
|
104
|
+
- [Github](https://github.com/versionHQ/)
|
105
|
+
- [Python SDK](https://pypi.org/project/versionhq/)
|
106
106
|
|
107
107
|
<hr />
|
108
108
|
|
@@ -117,9 +117,10 @@ Agentic orchestration framework for multi-agent networks and task graphs for com
|
|
117
117
|
- [Optimization](#optimization)
|
118
118
|
- [Quick Start](#quick-start)
|
119
119
|
- [Package installation](#package-installation)
|
120
|
-
- [
|
121
|
-
- [
|
122
|
-
- [
|
120
|
+
- [Launching an agent](#launching-an-agent)
|
121
|
+
- [Automating workflows](#automating-workflows)
|
122
|
+
- [Executing a single task](#executing-a-single-task)
|
123
|
+
- [Supervising agents](#supervising-agents)
|
123
124
|
- [Technologies Used](#technologies-used)
|
124
125
|
- [Project Structure](#project-structure)
|
125
126
|
- [Setting Up Your Project](#setting-up-your-project)
|
@@ -247,33 +248,45 @@ agent.update(
|
|
247
248
|
|
248
249
|
### Package installation
|
249
250
|
|
250
|
-
|
251
|
-
|
252
|
-
|
251
|
+
```
|
252
|
+
pip install versionhq
|
253
|
+
```
|
253
254
|
|
254
255
|
(Python 3.11 / 3.12)
|
255
256
|
|
256
|
-
### Forming a agent network
|
257
257
|
|
258
|
-
|
259
|
-
import versionhq as vhq
|
258
|
+
### Launching an agent
|
260
259
|
|
261
|
-
network = work(
|
262
|
-
task="YOUR AMAZING TASK OVERVIEW",
|
263
|
-
expected_outcome="YOUR OUTCOME EXPECTATION",
|
264
|
-
)
|
265
|
-
res, tg = network.launch()
|
266
|
-
```
|
267
260
|
|
268
|
-
|
261
|
+
```python
|
262
|
+
import versionhq as vhq
|
269
263
|
|
264
|
+
agent = vhq.Agent(role="Marketer")
|
265
|
+
res = agent.start()
|
266
|
+
|
267
|
+
assert isinstance(res, vhq.TaskOutput) # contains agent's response in text, JSON, Pydantic formats with usage recordes and eval scores.
|
268
|
+
```
|
270
269
|
|
271
|
-
### Executing tasks
|
272
270
|
|
273
|
-
|
271
|
+
### Automating workflows
|
274
272
|
|
275
|
-
|
273
|
+
```python
|
274
|
+
import versionhq as vhq
|
276
275
|
|
276
|
+
network = vhq.form_agent_network(
|
277
|
+
task="draft a promo plan",
|
278
|
+
expected_outcome="marketing plan, budget, KPI targets",
|
279
|
+
)
|
280
|
+
res, tg = network.launch()
|
281
|
+
|
282
|
+
assert isinstance(res, vhq.TaskOutput) # the latest output from the workflow
|
283
|
+
assert isinstance(tg, vhq.TaskGraph) # contains task nodes and edges that connect the nodes with dep-met conditions
|
284
|
+
```
|
285
|
+
|
286
|
+
|
287
|
+
### Executing a single task
|
288
|
+
|
289
|
+
You can simply build and execute a task using `Task` class.
|
277
290
|
|
278
291
|
```python
|
279
292
|
import versionhq as vhq
|
@@ -293,34 +306,20 @@ task = vhq.Task(
|
|
293
306
|
callback_kwargs=dict(message="Hi! Here is the result: ")
|
294
307
|
)
|
295
308
|
|
296
|
-
res = task.execute(context="
|
297
|
-
|
309
|
+
res = task.execute(context="testing a task function")
|
298
310
|
assert isinstance(res, vhq.TaskOutput)
|
299
311
|
```
|
300
312
|
|
301
|
-
This will return a `TaskOutput` object that stores response in plane text, JSON, and Pydantic model: `CustomOutput` formats with a callback result, tool output (if given), and evaluation results (if given).
|
302
313
|
|
303
|
-
|
304
|
-
res == vhq.TaskOutput(
|
305
|
-
task_id=UUID('<TASK UUID>'),
|
306
|
-
raw='{\"test1\":\"random str\", \"test2\":[\"str item 1\", \"str item 2\", \"str item 3\"]}',
|
307
|
-
json_dict={'test1': 'random str', 'test2': ['str item 1', 'str item 2', 'str item 3']},
|
308
|
-
pydantic=<class '__main__.CustomOutput'>,
|
309
|
-
tool_output=None,
|
310
|
-
callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3', # returned a plain text summary
|
311
|
-
evaluation=None
|
312
|
-
)
|
313
|
-
```
|
314
|
-
|
315
|
-
### Supervising
|
314
|
+
### Supervising agents
|
316
315
|
|
317
316
|
To create an agent network with one or more manager agents, designate members using the `is_manager` tag.
|
318
317
|
|
319
318
|
```python
|
320
319
|
import versionhq as vhq
|
321
320
|
|
322
|
-
agent_a = vhq.Agent(role="
|
323
|
-
agent_b = vhq.Agent(role="
|
321
|
+
agent_a = vhq.Agent(role="Member", llm="gpt-4o")
|
322
|
+
agent_b = vhq.Agent(role="Leader", llm="gemini-2.0")
|
324
323
|
|
325
324
|
task_1 = vhq.Task(
|
326
325
|
description="Analyze the client's business model.",
|
@@ -342,11 +341,9 @@ network =vhq.AgentNetwork(
|
|
342
341
|
)
|
343
342
|
res, tg = network.launch()
|
344
343
|
|
345
|
-
assert isinstance(res, vhq.
|
346
|
-
assert
|
347
|
-
assert
|
348
|
-
|
349
|
-
assert isinstance(tg, vhq.TaskGraph)
|
344
|
+
assert isinstance(res, vhq.NetworkOutput)
|
345
|
+
assert not [item for item in task_1.processed_agents if "vhq-Delegated-Agent" == item]
|
346
|
+
assert [item for item in task_1.processed_agents if "agent b" == item]
|
350
347
|
```
|
351
348
|
|
352
349
|
This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
|
@@ -510,7 +507,7 @@ Create `.env` file in the project root and add secret vars following `.env.sampl
|
|
510
507
|
|
511
508
|
* Test functions within the files must begin with `test_`.
|
512
509
|
|
513
|
-
* Pytest priorities are `1. playground
|
510
|
+
* Pytest priorities are `1. playground > 2. docs use cases > 3. other features`
|
514
511
|
|
515
512
|
|
516
513
|
4. Update `docs` accordingly.
|
@@ -598,4 +595,4 @@ Common issues and solutions:
|
|
598
595
|
## Frequently Asked Questions (FAQ)
|
599
596
|
**Q. Where can I see if the agent is working?**
|
600
597
|
|
601
|
-
A. Visit [playground](https://versi0n.io
|
598
|
+
A. Visit [playground](https://versi0n.io).
|
@@ -1,4 +1,4 @@
|
|
1
|
-
versionhq/__init__.py,sha256=
|
1
|
+
versionhq/__init__.py,sha256=0feG_kS9Ofzgiw_dNfLuCVjdcLJNdkt0JHVrUcEbgG8,2980
|
2
2
|
versionhq/_utils/__init__.py,sha256=d-vYVcORZKG-kkLe_fzE8VbViDpAk9DDOKe2fVK25ew,178
|
3
3
|
versionhq/_utils/i18n.py,sha256=TwA_PnYfDLA6VqlUDPuybdV9lgi3Frh_ASsb_X8jJo8,1483
|
4
4
|
versionhq/_utils/llm_as_a_judge.py,sha256=RM0oYfoeanuUyUL3Ewl6_8Xn1F5Axd285UMH46kxG1I,2378
|
@@ -32,8 +32,8 @@ versionhq/knowledge/source.py,sha256=-hEUPtJUHHMx4rUKtiHl19J8xAMw-WVBw34zwa2jZ08
|
|
32
32
|
versionhq/knowledge/source_docling.py,sha256=dcu1ITqPXwWZ_lK-6tykEKhhC82eNRTMoWRpxK9Kzls,5441
|
33
33
|
versionhq/knowledge/storage.py,sha256=Kd-4r6aWM5EDaoXrzKXbgi1hY6tysSQARPGXM95qMmU,8266
|
34
34
|
versionhq/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
|
-
versionhq/llm/llm_vars.py,sha256=
|
36
|
-
versionhq/llm/model.py,sha256=
|
35
|
+
versionhq/llm/llm_vars.py,sha256=87IAPfWpyONf4QZoLNcdV3iL-ZFth5Xverl0eQti8i4,5613
|
36
|
+
versionhq/llm/model.py,sha256=_P5Hm_hkncy9LvRySAqWhtOQXaFTEY-px97vjOc3Baw,17019
|
37
37
|
versionhq/memory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
38
38
|
versionhq/memory/contextual_memory.py,sha256=QEMVvHuEXxY7M6-12S8HhyFKf108KfX8Zzt7paPW048,3882
|
39
39
|
versionhq/memory/model.py,sha256=VQR1229t7GQPMItlGAHLtJrb6LrZfSoRA1DRW4z0SOU,8234
|
@@ -62,8 +62,8 @@ versionhq/tool/decorator.py,sha256=C4ZM7Xi2gwtEMaSeRo-geo_g_MAkY77WkSLkAuY0AyI,1
|
|
62
62
|
versionhq/tool/model.py,sha256=Nc2f9frTK5tH4kh6EeEAk1Fi1w19kEXLOcsBwHCS1a4,12189
|
63
63
|
versionhq/tool/rag_tool.py,sha256=qm_nDWs-WyDvrxZeZAL2AkswfUWGPZS4zybz0o6wOFI,3653
|
64
64
|
versionhq/tool/tool_handler.py,sha256=2m41K8qo5bGCCbwMFferEjT-XZ-mE9F0mDUOBkgivOI,1416
|
65
|
-
versionhq-1.2.2.
|
66
|
-
versionhq-1.2.2.
|
67
|
-
versionhq-1.2.2.
|
68
|
-
versionhq-1.2.2.
|
69
|
-
versionhq-1.2.2.
|
65
|
+
versionhq-1.2.2.8.dist-info/LICENSE,sha256=cRoGGdM73IiDs6nDWKqPlgSv7aR4n-qBXYnJlCMHCeE,1082
|
66
|
+
versionhq-1.2.2.8.dist-info/METADATA,sha256=J_bqJJyNxyPtePhrFah9mArdCHUT1HCfbKhWEBOxi00,21647
|
67
|
+
versionhq-1.2.2.8.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
68
|
+
versionhq-1.2.2.8.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
|
69
|
+
versionhq-1.2.2.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|