versionhq 1.1.12.4__tar.gz → 1.1.13.0__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.1.13.0/.github/workflows/deploy_docs.yml +30 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/.gitignore +4 -4
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/PKG-INFO +116 -141
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/README.md +113 -138
- versionhq-1.1.13.0/docs/_logos/favicon.ico +0 -0
- versionhq-1.1.13.0/docs/_logos/logo192.png +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/docs/core/Agent.md +156 -160
- versionhq-1.1.13.0/docs/core/tool.md +387 -0
- versionhq-1.1.13.0/docs/index.md +271 -0
- versionhq-1.1.13.0/docs/quickstart.md +152 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/docs/stylesheets/main.css +8 -8
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/mkdocs.yml +5 -5
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/pyproject.toml +7 -5
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/__init__.py +6 -3
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/_utils/usage_metrics.py +6 -6
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/agent/inhouse_agents.py +1 -1
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/agent/model.py +1 -1
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/llm/llm_vars.py +5 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/llm/model.py +66 -40
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/task/evaluate.py +5 -6
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/task/formation.py +64 -30
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/task/log_handler.py +1 -1
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/task/model.py +4 -7
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/team/model.py +95 -92
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/team/team_planner.py +5 -6
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/tool/model.py +1 -4
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq.egg-info/PKG-INFO +116 -141
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq.egg-info/SOURCES.txt +2 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/clients/customer_test.py +0 -4
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/clients/workflow_test.py +0 -2
- versionhq-1.1.13.0/tests/doc_test.py +492 -0
- versionhq-1.1.13.0/tests/formation_test.py +48 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/llm/llm_test.py +0 -3
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/memory/memory_test.py +0 -5
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/task/llm_connection_test.py +6 -6
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/task/task_test.py +3 -19
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/team/team_test.py +51 -70
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/uv.lock +203 -554
- versionhq-1.1.12.4/.github/workflows/deploy_docs.yml +0 -38
- versionhq-1.1.12.4/docs/_logos/favicon.ico +0 -0
- versionhq-1.1.12.4/docs/_logos/logo192.png +0 -0
- versionhq-1.1.12.4/docs/index.md +0 -388
- versionhq-1.1.12.4/docs/quickstart.md +0 -73
- versionhq-1.1.12.4/tests/doc_test.py +0 -200
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/.github/workflows/publish.yml +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/.github/workflows/publish_testpypi.yml +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/.github/workflows/run_tests.yml +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/.github/workflows/security_check.yml +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/.pre-commit-config.yaml +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/.python-version +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/CNAME +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/LICENSE +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/SECURITY.md +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/db/preprocess.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/docs/CNAME +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/requirements-dev.txt +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/requirements.txt +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/runtime.txt +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/setup.cfg +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/_utils/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/_utils/i18n.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/_utils/logger.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/_utils/process_config.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/_utils/vars.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/agent/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/agent/parser.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/agent/rpm_controller.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/cli/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/clients/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/clients/customer/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/clients/customer/model.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/clients/product/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/clients/product/model.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/clients/workflow/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/clients/workflow/model.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/knowledge/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/knowledge/_utils.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/knowledge/embedding.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/knowledge/model.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/knowledge/source.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/knowledge/source_docling.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/knowledge/storage.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/llm/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/memory/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/memory/contextual_memory.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/memory/model.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/storage/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/storage/base.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/storage/ltm_sqlite_storage.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/storage/mem0_storage.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/storage/rag_storage.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/storage/task_output_storage.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/storage/utils.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/task/TEMPLATES/Description.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/task/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/task/formatter.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/task/structured_response.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/team/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/tool/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/tool/cache_handler.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/tool/composio_tool.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/tool/composio_tool_vars.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/tool/decorator.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq/tool/tool_handler.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq.egg-info/dependency_links.txt +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq.egg-info/requires.txt +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/src/versionhq.egg-info/top_level.txt +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/agent/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/agent/agent_test.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/cli/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/clients/product_test.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/conftest.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/knowledge/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/knowledge/knowledge_test.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/knowledge/mock_report_compressed.pdf +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/llm/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/memory/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/task/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/team/Prompts/Demo_test.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/team/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/tool/__init__.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/tool/composio_test.py +0 -0
- {versionhq-1.1.12.4 → versionhq-1.1.13.0}/tests/tool/tool_test.py +0 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
name: Deploy Docs
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- main
|
6
|
+
|
7
|
+
permissions:
|
8
|
+
contents: write
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
deploy:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v4
|
15
|
+
- name: Configure Git Credentials
|
16
|
+
run: |
|
17
|
+
git config user.name github-actions[bot]
|
18
|
+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
19
|
+
- uses: actions/setup-python@v5
|
20
|
+
with:
|
21
|
+
python-version: 3.12
|
22
|
+
- run: echo "cache_id=$(date +%s)" >> $GITHUB_ENV
|
23
|
+
- uses: actions/cache@v4
|
24
|
+
with:
|
25
|
+
key: mkdocs-material-${{ env.cache_id }}
|
26
|
+
path: .cache
|
27
|
+
restore-keys: |
|
28
|
+
mkdocs-material-
|
29
|
+
- run: pip install mkdocs-material
|
30
|
+
- run: mkdocs gh-deploy --force
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: versionhq
|
3
|
-
Version: 1.1.
|
4
|
-
Summary: An agentic orchestration framework for
|
3
|
+
Version: 1.1.13.0
|
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
|
7
7
|
|
@@ -40,7 +40,7 @@ Classifier: Development Status :: 3 - Alpha
|
|
40
40
|
Classifier: Intended Audience :: Developers
|
41
41
|
Classifier: Intended Audience :: Information Technology
|
42
42
|
Classifier: Topic :: Software Development :: Build Tools
|
43
|
-
Requires-Python:
|
43
|
+
Requires-Python: <3.13,>=3.11
|
44
44
|
Description-Content-Type: text/markdown
|
45
45
|
License-File: LICENSE
|
46
46
|
Requires-Dist: regex==2024.11.6
|
@@ -77,6 +77,7 @@ Requires-Dist: numpy>=1.26.4; extra == "numpy"
|
|
77
77
|
|
78
78
|
# Overview
|
79
79
|
|
80
|
+
[](https://clickpy.clickhouse.com/dashboard/versionhq)
|
80
81
|

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

|
@@ -84,14 +85,14 @@ Requires-Dist: numpy>=1.26.4; extra == "numpy"
|
|
84
85
|

|
85
86
|
|
86
87
|
|
87
|
-
|
88
|
+
A Python framework for agentic orchestration that handles complex task automation without human interaction.
|
88
89
|
|
89
90
|
**Visit:**
|
90
91
|
|
91
92
|
- [PyPI](https://pypi.org/project/versionhq/)
|
92
|
-
- [Github (LLM orchestration framework)](https://github.com/versionHQ/multi-agent-system)
|
93
|
-
- [Use case](https://versi0n.io/) / [Quick demo](https://res.cloudinary.com/dfeirxlea/video/upload/v1737732977/pj_m_home/pnsyh5mfvmilwgt0eusa.mov)
|
94
93
|
- [Docs](https://docs.versi0n.io)
|
94
|
+
- [Github Repository](https://github.com/versionHQ/multi-agent-system)
|
95
|
+
- [Playground](https://versi0n.io/)
|
95
96
|
|
96
97
|
|
97
98
|
<hr />
|
@@ -103,20 +104,17 @@ Agentic orchestration framework to deploy agent network and handle complex task
|
|
103
104
|
- [Key Features](#key-features)
|
104
105
|
- [Agent formation](#agent-formation)
|
105
106
|
- [Quick Start](#quick-start)
|
106
|
-
- [
|
107
|
-
- [
|
108
|
-
|
109
|
-
- [Supervising
|
107
|
+
- [Package installation](#package-installation)
|
108
|
+
- [Forming a agent network](#forming-a-agent-network)
|
109
|
+
- [Customizing AI agents](#customizing-ai-agents)
|
110
|
+
- [Supervising](#supervising)
|
110
111
|
- [Technologies Used](#technologies-used)
|
111
112
|
- [Project Structure](#project-structure)
|
112
|
-
- [
|
113
|
-
- [Set up a project](#set-up-a-project)
|
113
|
+
- [Setting Up](#setting-up)
|
114
114
|
- [Contributing](#contributing)
|
115
|
-
- [Documentation](#documentation)
|
116
|
-
- [Customizing AI Agents](#customizing-ai-agents)
|
117
|
-
- [Modifying RAG Functionality](#modifying-rag-functionality)
|
118
115
|
- [Package Management with uv](#package-management-with-uv)
|
119
116
|
- [Pre-Commit Hooks](#pre-commit-hooks)
|
117
|
+
- [Documentation](#documentation)
|
120
118
|
- [Trouble Shooting](#trouble-shooting)
|
121
119
|
- [Frequently Asked Questions (FAQ)](#frequently-asked-questions-faq)
|
122
120
|
|
@@ -148,20 +146,20 @@ You can specify a desired formation or allow the agents to determine it autonomo
|
|
148
146
|
|
149
147
|
## Quick Start
|
150
148
|
|
151
|
-
|
149
|
+
### Package installation
|
152
150
|
|
153
151
|
```
|
154
152
|
pip install versionhq
|
155
153
|
```
|
156
154
|
|
157
|
-
(Python 3.11
|
155
|
+
(Python 3.11 / 3.12)
|
158
156
|
|
159
|
-
###
|
157
|
+
### Forming a agent network
|
160
158
|
|
161
|
-
```
|
162
|
-
|
159
|
+
```python
|
160
|
+
import versionhq as vhq
|
163
161
|
|
164
|
-
network = form_agent_network(
|
162
|
+
network = vhq.form_agent_network(
|
165
163
|
task="YOUR AMAZING TASK OVERVIEW",
|
166
164
|
expected_outcome="YOUR OUTCOME EXPECTATION",
|
167
165
|
)
|
@@ -171,25 +169,28 @@ You can specify a desired formation or allow the agents to determine it autonomo
|
|
171
169
|
This will form a network with multiple agents on `Formation` and return `TaskOutput` object with output in JSON, plane text, Pydantic model format with evaluation.
|
172
170
|
|
173
171
|
|
174
|
-
###
|
172
|
+
### Customizing AI agents
|
175
173
|
|
176
|
-
|
174
|
+
You can simply build an agent using `Agent` model.
|
177
175
|
|
178
|
-
|
176
|
+
By default, the agent prioritize JSON serializable outputs over plane texts.
|
177
|
+
|
178
|
+
|
179
|
+
```python
|
180
|
+
import versionhq as vhq
|
179
181
|
from pydantic import BaseModel
|
180
|
-
from versionhq import Agent, Task
|
181
182
|
|
182
183
|
class CustomOutput(BaseModel):
|
183
184
|
test1: str
|
184
185
|
test2: list[str]
|
185
186
|
|
186
187
|
def dummy_func(message: str, test1: str, test2: list[str]) -> str:
|
187
|
-
return f"{message}: {test1}, {", ".join(test2)}"
|
188
|
+
return f"""{message}: {test1}, {", ".join(test2)}"""
|
188
189
|
|
189
190
|
|
190
|
-
agent = Agent(role="demo", goal="amazing project goal")
|
191
|
+
agent = vhq.Agent(role="demo", goal="amazing project goal")
|
191
192
|
|
192
|
-
task = Task(
|
193
|
+
task = vhq.Task(
|
193
194
|
description="Amazing task",
|
194
195
|
pydantic_output=CustomOutput,
|
195
196
|
callback=dummy_func,
|
@@ -200,47 +201,48 @@ You can specify a desired formation or allow the agents to determine it autonomo
|
|
200
201
|
print(res)
|
201
202
|
```
|
202
203
|
|
203
|
-
This will return `TaskOutput` instance that stores a response in plane text, JSON serializable dict, and Pydantic model: `CustomOutput` formats with a callback result, tool output (if given), and evaluation results (if given).
|
204
204
|
|
205
|
-
|
205
|
+
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).
|
206
|
+
|
207
|
+
```python
|
206
208
|
res == TaskOutput(
|
207
|
-
task_id=UUID('<TASK UUID>')
|
209
|
+
task_id=UUID('<TASK UUID>'),
|
208
210
|
raw='{\"test1\":\"random str\", \"test2\":[\"str item 1\", \"str item 2\", \"str item 3\"]}',
|
209
211
|
json_dict={'test1': 'random str', 'test2': ['str item 1', 'str item 2', 'str item 3']},
|
210
|
-
pydantic=<class '__main__.CustomOutput'
|
212
|
+
pydantic=<class '__main__.CustomOutput'>,
|
211
213
|
tool_output=None,
|
212
|
-
callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3',
|
214
|
+
callback_output='Hi! Here is the result: random str, str item 1, str item 2, str item 3', # returned a plain text summary
|
213
215
|
evaluation=None
|
214
216
|
)
|
215
217
|
```
|
216
218
|
|
217
|
-
### Supervising
|
219
|
+
### Supervising
|
218
220
|
|
219
|
-
```
|
220
|
-
|
221
|
+
```python
|
222
|
+
import versionhq as vhq
|
221
223
|
|
222
|
-
agent_a = Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
|
223
|
-
agent_b = Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
|
224
|
+
agent_a = vhq.Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
|
225
|
+
agent_b = vhq.Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
|
224
226
|
|
225
|
-
task_1 = Task(
|
227
|
+
task_1 = vhq.Task(
|
226
228
|
description="Analyze the client's business model.",
|
227
|
-
response_fields=[ResponseField(title="test1", data_type=str, required=True),],
|
229
|
+
response_fields=[vhq.ResponseField(title="test1", data_type=str, required=True),],
|
228
230
|
allow_delegation=True
|
229
231
|
)
|
230
232
|
|
231
|
-
task_2 = Task(
|
233
|
+
task_2 = vhq.Task(
|
232
234
|
description="Define the cohort.",
|
233
235
|
response_fields=[ResponseField(title="test1", data_type=int, required=True),],
|
234
236
|
allow_delegation=False
|
235
237
|
)
|
236
238
|
|
237
|
-
team = Team(
|
239
|
+
team = vhq.Team(
|
238
240
|
members=[
|
239
|
-
|
240
|
-
|
241
|
+
vhq.Member(agent=agent_a, is_manager=False, task=task_1),
|
242
|
+
vhq.Member(agent=agent_b, is_manager=True, task=task_2),
|
241
243
|
],
|
242
244
|
)
|
243
|
-
res = team.
|
245
|
+
res = team.launch()
|
244
246
|
```
|
245
247
|
|
246
248
|
This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
|
@@ -250,27 +252,33 @@ Tasks can be delegated to a team manager, peers in the team, or completely new a
|
|
250
252
|
<hr />
|
251
253
|
|
252
254
|
## Technologies Used
|
255
|
+
|
253
256
|
**Schema, Data Validation**
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
+
|
258
|
+
* [Pydantic](https://docs.pydantic.dev/latest/): Data validation and serialization library for Python.
|
259
|
+
* [Upstage](https://console.upstage.ai/docs/getting-started/overview): Document processer for ML tasks. (Use `Document Parser API` to extract data from documents)
|
260
|
+
* [Docling](https://ds4sd.github.io/docling/): Document parsing
|
257
261
|
|
258
262
|
**Storage**
|
259
|
-
|
260
|
-
|
261
|
-
|
263
|
+
|
264
|
+
* [mem0ai](https://docs.mem0.ai/quickstart#install-package): Agents' memory storage and management.
|
265
|
+
* [Chroma DB](https://docs.trychroma.com/): Vector database for storing and querying usage data.
|
266
|
+
* [SQLite](https://www.sqlite.org/docs.html): C-language library to implements a small SQL database engine.
|
262
267
|
|
263
268
|
**LLM-curation**
|
264
|
-
|
269
|
+
|
270
|
+
* [LiteLLM](https://docs.litellm.ai/docs/providers): Curation platform to access LLMs
|
265
271
|
|
266
272
|
**Tools**
|
267
|
-
|
273
|
+
|
274
|
+
* [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.
|
268
275
|
|
269
276
|
**Deployment**
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
277
|
+
|
278
|
+
* **Python**: Primary programming language. v3.12.x is recommended
|
279
|
+
* [uv](https://docs.astral.sh/uv/): Python package installer and resolver
|
280
|
+
* [pre-commit](https://pre-commit.com/): Manage and maintain pre-commit hooks
|
281
|
+
* [setuptools](https://pypi.org/project/setuptools/): Build python modules
|
274
282
|
|
275
283
|
<hr />
|
276
284
|
|
@@ -281,36 +289,28 @@ Tasks can be delegated to a team manager, peers in the team, or completely new a
|
|
281
289
|
.github
|
282
290
|
└── workflows/ # Github actions
|
283
291
|
│
|
292
|
+
docs/ # Documentation built by MkDocs
|
293
|
+
│
|
284
294
|
src/
|
285
|
-
└── versionhq/ # Orchestration
|
286
|
-
│ ├── agent/ #
|
295
|
+
└── versionhq/ # Orchestration framework package
|
296
|
+
│ ├── agent/ # Core components
|
287
297
|
│ └── llm/
|
288
298
|
│ └── task/
|
289
|
-
│ └── team/
|
290
299
|
│ └── tool/
|
291
|
-
│ └── cli/
|
292
|
-
│ └── ...
|
293
|
-
│ │
|
294
|
-
│ ├── db/ # Storage
|
295
|
-
│ ├── chroma.sqlite3
|
296
300
|
│ └── ...
|
297
301
|
│
|
298
|
-
└──tests/ # Pytest
|
302
|
+
└──tests/ # Pytest - by core component and use cases in the docs
|
299
303
|
│ └── agent/
|
300
304
|
│ └── llm/
|
301
305
|
│ └── ...
|
302
306
|
│
|
303
|
-
└── uploads/ # Local
|
307
|
+
└── uploads/ # Local directory that stores uloaded files
|
304
308
|
|
305
309
|
```
|
306
310
|
|
307
311
|
<hr />
|
308
312
|
|
309
|
-
##
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
## Set up a project
|
313
|
+
## Setting Up
|
314
314
|
|
315
315
|
1. Install `uv` package manager:
|
316
316
|
|
@@ -340,12 +340,12 @@ src/
|
|
340
340
|
pyenv install 3.12.8
|
341
341
|
pyenv global 3.12.8 (optional: `pyenv global system` to get back to the system default ver.)
|
342
342
|
uv python pin 3.12.8
|
343
|
-
echo 3.12.8
|
343
|
+
echo 3.12.8 >> .python-version
|
344
344
|
```
|
345
345
|
|
346
346
|
|
347
|
-
3.
|
348
|
-
|
347
|
+
3. Add secrets to `.env` file in the project root:
|
348
|
+
|
349
349
|
```
|
350
350
|
LITELLM_API_KEY=your-litellm-api-key
|
351
351
|
OPENAI_API_KEY=your-openai-api-key
|
@@ -362,65 +362,37 @@ src/
|
|
362
362
|
|
363
363
|
2. Create amazing features
|
364
364
|
|
365
|
-
3.
|
365
|
+
3. Add a test funcition to the `tests` directory and run **pytest**.
|
366
366
|
|
367
|
-
- Add
|
368
|
-
-
|
369
|
-
- Run a test.
|
367
|
+
- Add secret values defined in `.github/workflows/run_test.yml` to your Github `repository secrets` located at settings > secrets & variables > Actions.
|
368
|
+
- Run a following command:
|
370
369
|
```
|
371
370
|
uv run pytest tests -vv --cache-clear
|
372
371
|
```
|
373
372
|
|
374
|
-
**pytest**
|
373
|
+
**Building a new pytest function**
|
375
374
|
|
376
|
-
*
|
377
|
-
* When adding a new feature to the file, name the feature started with `test_`.
|
375
|
+
* Files added to the `tests` directory must end in `_test.py`.
|
378
376
|
|
379
|
-
|
380
|
-
5. Commit your changes (`git add .` / `git commit -m 'Add your-amazing-feature'`)
|
381
|
-
6. Push to the branch (`git push origin feature/your-amazing-feature`)
|
382
|
-
7. Open a pull request
|
377
|
+
* Test functions within the files must begin with `test_`.
|
383
378
|
|
384
379
|
|
385
|
-
|
386
|
-
* Flag with `#! REFINEME` for any improvements needed and `#! FIXME` for any errors.
|
380
|
+
4. Update `docs` accordingly.
|
387
381
|
|
388
|
-
|
389
|
-
```
|
390
|
-
npm i
|
391
|
-
npm start
|
392
|
-
```
|
393
|
-
The frontend will be available at `http://localhost:3000`. -->
|
382
|
+
5. Pull the latest version of source code from the main branch (`git pull origin main`) *Address conflicts if any.
|
394
383
|
|
395
|
-
|
384
|
+
6. Commit your changes (`git add .` / `git commit -m 'Add your-amazing-feature'`)
|
396
385
|
|
386
|
+
7. Push to the branch (`git push origin feature/your-amazing-feature`)
|
397
387
|
|
398
|
-
|
399
|
-
* To edit the documentation, see `docs` repository and edit the respective component.
|
388
|
+
8. Open a pull request
|
400
389
|
|
401
|
-
* We use `mkdocs` to update the docs. You can run the doc locally at http://127.0.0.1:8000/:
|
402
390
|
|
403
|
-
|
404
|
-
uv run python3 -m mkdocs serve --clean
|
405
|
-
```
|
406
|
-
|
407
|
-
|
408
|
-
### Customizing AI Agents
|
409
|
-
|
410
|
-
To add an agent, use `sample` directory to add new `project`. You can define an agent with a specific role, goal, and set of tools.
|
411
|
-
|
412
|
-
Your new agent needs to follow the `Agent` model defined in the `verionhq.agent.model.py`.
|
413
|
-
|
414
|
-
You can also add any fields and functions to the `Agent` model **universally** by modifying `verionhq.agent.model.py`.
|
415
|
-
|
416
|
-
|
417
|
-
### Modifying RAG Functionality
|
391
|
+
**Optional**
|
418
392
|
|
419
|
-
|
393
|
+
* Flag with `#! REFINEME` for any improvements needed and `#! FIXME` for any errors.
|
420
394
|
|
421
|
-
|
422
|
-
2. Modify the `tools.py` file to update the ingestion process if necessary.
|
423
|
-
3. Run the ingestion process to update the Chroma DB.
|
395
|
+
* `Playground` is available at `https://versi0n.io`.
|
424
396
|
|
425
397
|
|
426
398
|
### Package Management with uv
|
@@ -451,46 +423,49 @@ Pre-commit hooks help maintain code quality by running checks for formatting, li
|
|
451
423
|
git commit --no-verify -m "your-commit-message"
|
452
424
|
```
|
453
425
|
|
426
|
+
### Documentation
|
427
|
+
|
428
|
+
* To edit the documentation, see `docs` repository and edit the respective component.
|
429
|
+
|
430
|
+
* We use `mkdocs` to update the docs. You can run the doc locally at http://127.0.0.1:8000/:
|
431
|
+
|
432
|
+
```
|
433
|
+
uv run python3 -m mkdocs serve --clean
|
434
|
+
```
|
435
|
+
|
436
|
+
* To add a new page, update `mkdocs.yml` in the root. Refer to [MkDocs documentation](https://squidfunk.github.io/mkdocs-material/getting-started/) for more details.
|
437
|
+
|
454
438
|
<hr />
|
455
439
|
|
456
440
|
## Trouble Shooting
|
457
441
|
|
458
442
|
Common issues and solutions:
|
459
|
-
- API key errors: Ensure all API keys in the `.env` file are correct and up to date. Make sure to add `load_dotenv()` on the top of the python file to apply the latest environment values.
|
460
|
-
- Database connection issues: Check if the Chroma DB is properly initialized and accessible.
|
461
|
-
- Memory errors: If processing large contracts, you may need to increase the available memory for the Python process.
|
462
|
-
- Issues related to the Python version: Docling/Pytorch is not ready for Python 3.13 as of Jan 2025. Use Python 3.12.x as default by running `uv venv --python 3.12.8` and `uv python pin 3.12.8`.
|
463
|
-
- Issues related to dependencies: `rm -rf uv.lock`, `uv cache clean`, `uv venv`, and run `uv pip install -r requirements.txt -v`.
|
464
|
-
- Issues related to the AI agents or RAG system: Check the `output.log` file for detailed error messages and stack traces.
|
465
|
-
- Issues related to `Python quit unexpectedly`: Check [this stackoverflow article](https://stackoverflow.com/questions/59888499/macos-catalina-python-quit-unexpectedly-error).
|
466
|
-
- `reportMissingImports` error from pyright after installing the package: This might occur when installing new libraries while VSCode is running. Open the command pallete (ctrl + shift + p) and run the Python: Restart language server task.
|
467
443
|
|
468
|
-
|
444
|
+
* API key errors: Ensure all API keys in the `.env` file are correct and up to date. Make sure to add `load_dotenv()` on the top of the python file to apply the latest environment values.
|
469
445
|
|
470
|
-
|
471
|
-
**Q. Where can I see if the agent is working?**
|
446
|
+
* Database connection issues: Check if the Chroma DB is properly initialized and accessible.
|
472
447
|
|
473
|
-
|
474
|
-
> You can also test features [here](https://github.com/versionHQ/test-client-app) using React app.
|
448
|
+
* Memory errors: If processing large contracts, you may need to increase the available memory for the Python process.
|
475
449
|
|
476
|
-
|
450
|
+
* Issues related to the Python version: Docling/Pytorch is not ready for Python 3.13 as of Jan 2025. Use Python 3.12.x as default by running `uv venv --python 3.12.8` and `uv python pin 3.12.8`.
|
477
451
|
|
478
|
-
|
479
|
-
> <img width="200" src="https://res.cloudinary.com/dfeirxlea/image/upload/v1732732628/pj_m_agents/ito937s5d5x0so8isvw6.png">
|
452
|
+
* Issues related to dependencies: `rm -rf uv.lock`, `uv cache clean`, `uv venv`, and run `uv pip install -r requirements.txt -v`.
|
480
453
|
|
454
|
+
* Issues related to the AI agents or RAG system: Check the `output.log` file for detailed error messages and stack traces.
|
481
455
|
|
482
|
-
|
456
|
+
* Issues related to `Python quit unexpectedly`: Check [this stackoverflow article](https://stackoverflow.com/questions/59888499/macos-catalina-python-quit-unexpectedly-error).
|
483
457
|
|
484
|
-
|
458
|
+
* `reportMissingImports` error from pyright after installing the package: This might occur when installing new libraries while VSCode is running. Open the command pallete (ctrl + shift + p) and run the Python: Restart language server task.
|
485
459
|
|
486
|
-
|
460
|
+
<hr />
|
487
461
|
|
488
|
-
|
462
|
+
## Frequently Asked Questions (FAQ)
|
463
|
+
**Q. Where can I see if the agent is working?**
|
489
464
|
|
490
|
-
|
465
|
+
A. Visit [playground](https://versi0n.io).
|
491
466
|
|
492
|
-
> Use an agent when:
|
493
467
|
|
494
|
-
|
468
|
+
**Q. How do you analyze the customer?**
|
495
469
|
|
496
|
-
|
470
|
+
A. We employ soft clustering for each customer.
|
471
|
+
<img width="200" src="https://res.cloudinary.com/dfeirxlea/image/upload/v1732732628/pj_m_agents/ito937s5d5x0so8isvw6.png">
|