Spaces:
Runtime error
Runtime error
Commit
·
1dec38c
1
Parent(s):
670dd87
Update Devid and TechnicalProjectManager agents to use new tool imports and set model to gpt-4o; enhance instructions and demo integration
Browse files- app/agents/Devid/Devid.py +1 -0
- app/agents/TechnicalProjectManager/TechnicalProjectManager.py +10 -10
- app/agents/TechnicalProjectManager/instructions.md +16 -2
- app/demo.py +10 -6
- poetry.lock +116 -1
- pyproject.toml +1 -0
app/agents/Devid/Devid.py
CHANGED
@@ -18,6 +18,7 @@ class Devid(Agent):
|
|
18 |
tools=[FileSearch],
|
19 |
tools_folder="./tools",
|
20 |
validation_attempts=1,
|
|
|
21 |
temperature=0,
|
22 |
max_prompt_tokens=25000,
|
23 |
)
|
|
|
18 |
tools=[FileSearch],
|
19 |
tools_folder="./tools",
|
20 |
validation_attempts=1,
|
21 |
+
model="gpt-4o",
|
22 |
temperature=0,
|
23 |
max_prompt_tokens=25000,
|
24 |
)
|
app/agents/TechnicalProjectManager/TechnicalProjectManager.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
from agency_swarm.agents import Agent
|
2 |
from .tools.SendWhatsAppText import SendWhatsAppText
|
3 |
-
from .tools.CreateTask import
|
4 |
-
from .tools.UpdateTask import
|
5 |
-
from .tools.DeleteTask import
|
6 |
-
from .tools.GetTask import
|
7 |
-
from .tools.GetTasks import
|
8 |
|
9 |
|
10 |
class TechnicalProjectManager(Agent):
|
@@ -17,11 +17,11 @@ class TechnicalProjectManager(Agent):
|
|
17 |
schemas_folder="./schemas",
|
18 |
tools=[
|
19 |
SendWhatsAppText,
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
],
|
26 |
tools_folder="./tools",
|
27 |
model="gpt-4o",
|
|
|
1 |
from agency_swarm.agents import Agent
|
2 |
from .tools.SendWhatsAppText import SendWhatsAppText
|
3 |
+
from .tools.CreateTask import CreateTaskTool
|
4 |
+
from .tools.UpdateTask import UpdateTaskTool
|
5 |
+
from .tools.DeleteTask import DeleteTaskTool
|
6 |
+
from .tools.GetTask import GetTaskTool
|
7 |
+
from .tools.GetTasks import GetTasksTool
|
8 |
|
9 |
|
10 |
class TechnicalProjectManager(Agent):
|
|
|
17 |
schemas_folder="./schemas",
|
18 |
tools=[
|
19 |
SendWhatsAppText,
|
20 |
+
CreateTaskTool,
|
21 |
+
UpdateTaskTool,
|
22 |
+
DeleteTaskTool,
|
23 |
+
GetTaskTool,
|
24 |
+
GetTasksTool,
|
25 |
],
|
26 |
tools_folder="./tools",
|
27 |
model="gpt-4o",
|
app/agents/TechnicalProjectManager/instructions.md
CHANGED
@@ -4,8 +4,18 @@ You are a Technical Project Manager working at VRSEN AI.
|
|
4 |
|
5 |
Your Team consists of:
|
6 |
|
7 |
-
- Devid (Code writing and execution
|
8 |
-
- BrowsingAgent (Online research and broswer actions)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
## NOTION INSTRUCTIONS
|
11 |
|
@@ -32,6 +42,10 @@ Always use this database ID unless specified otherwise
|
|
32 |
- Priority
|
33 |
- Due Date
|
34 |
|
|
|
|
|
|
|
|
|
35 |
## WORKFLOWS
|
36 |
|
37 |
### Create a high level WBS
|
|
|
4 |
|
5 |
Your Team consists of:
|
6 |
|
7 |
+
- Devid (Code execution): Useful for perfoming calculations, writing code, handling files and all other tasks that require or benefit from code execution.
|
8 |
+
- BrowsingAgent (Online research and broswer actions): Useful for supplying up to date information, finding information, and providing support for tasks that require online research.
|
9 |
+
|
10 |
+
## CAPABILITIES
|
11 |
+
|
12 |
+
- Interacting with a pre-defined Notion database
|
13 |
+
- Create tasks
|
14 |
+
- Update tasks
|
15 |
+
- Delete tasks
|
16 |
+
- Get tasks
|
17 |
+
- Get task
|
18 |
+
- Texting via Whatsapp (sending only)
|
19 |
|
20 |
## NOTION INSTRUCTIONS
|
21 |
|
|
|
42 |
- Priority
|
43 |
- Due Date
|
44 |
|
45 |
+
## MANUAL INTERACTION WITH NOTION
|
46 |
+
|
47 |
+
The user can manually
|
48 |
+
|
49 |
## WORKFLOWS
|
50 |
|
51 |
### Create a high level WBS
|
app/demo.py
CHANGED
@@ -19,9 +19,9 @@ from openai.types.beta.threads.runs import (
|
|
19 |
from agency_swarm.tools import FileSearch, CodeInterpreter
|
20 |
|
21 |
# Import our agents - using the same imports as in demo.ipynb
|
22 |
-
from agents.NotionProjectAgent import NotionProjectAgent
|
23 |
from agents.TechnicalProjectManager import TechnicalProjectManager
|
24 |
-
from agents.
|
|
|
25 |
|
26 |
|
27 |
# Helper functions for file handling (from agency.py)
|
@@ -146,6 +146,10 @@ class ProjectManagementAgency(Agency):
|
|
146 |
# Create state for iframe visibility
|
147 |
iframe_state = gr.State(value=True)
|
148 |
|
|
|
|
|
|
|
|
|
149 |
# Add toggle button and refresh button at the top
|
150 |
with gr.Row():
|
151 |
toggle_button = gr.Button(
|
@@ -619,15 +623,15 @@ def main():
|
|
619 |
|
620 |
# Instantiate agents
|
621 |
technical_project_manager = TechnicalProjectManager()
|
622 |
-
|
623 |
-
|
624 |
|
625 |
# Create the agency with our agents - using NotionAgency instead of Agency
|
626 |
agency = ProjectManagementAgency(
|
627 |
agency_chart=[
|
628 |
technical_project_manager,
|
629 |
-
[technical_project_manager,
|
630 |
-
[technical_project_manager,
|
631 |
],
|
632 |
shared_instructions="agency_manifesto.md",
|
633 |
)
|
|
|
19 |
from agency_swarm.tools import FileSearch, CodeInterpreter
|
20 |
|
21 |
# Import our agents - using the same imports as in demo.ipynb
|
|
|
22 |
from agents.TechnicalProjectManager import TechnicalProjectManager
|
23 |
+
from agents.BrowsingAgent import BrowsingAgent
|
24 |
+
from agents.Devid import Devid
|
25 |
|
26 |
|
27 |
# Helper functions for file handling (from agency.py)
|
|
|
146 |
# Create state for iframe visibility
|
147 |
iframe_state = gr.State(value=True)
|
148 |
|
149 |
+
# Add Title and Image inline
|
150 |
+
with gr.Row():
|
151 |
+
gr.Markdown("# 🐝🤖🐝 Project Management Agency Swarm Demo 🐝🤖🐝")
|
152 |
+
|
153 |
# Add toggle button and refresh button at the top
|
154 |
with gr.Row():
|
155 |
toggle_button = gr.Button(
|
|
|
623 |
|
624 |
# Instantiate agents
|
625 |
technical_project_manager = TechnicalProjectManager()
|
626 |
+
browsing_agent = BrowsingAgent()
|
627 |
+
developer_agent = Devid()
|
628 |
|
629 |
# Create the agency with our agents - using NotionAgency instead of Agency
|
630 |
agency = ProjectManagementAgency(
|
631 |
agency_chart=[
|
632 |
technical_project_manager,
|
633 |
+
[technical_project_manager, browsing_agent],
|
634 |
+
[technical_project_manager, developer_agent],
|
635 |
],
|
636 |
shared_instructions="agency_manifesto.md",
|
637 |
)
|
poetry.lock
CHANGED
@@ -2452,6 +2452,21 @@ files = [
|
|
2452 |
{file = "orjson-3.10.15.tar.gz", hash = "sha256:05ca7fe452a2e9d8d9d706a2984c95b9c2ebc5db417ce0b7a49b91d50642a23e"},
|
2453 |
]
|
2454 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2455 |
[[package]]
|
2456 |
name = "packaging"
|
2457 |
version = "24.2"
|
@@ -3161,6 +3176,19 @@ files = [
|
|
3161 |
requests = ">=2.26.0"
|
3162 |
websocket-client = "!=0.49"
|
3163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3164 |
[[package]]
|
3165 |
name = "python-dateutil"
|
3166 |
version = "2.9.0.post0"
|
@@ -3789,6 +3817,26 @@ httpx = "*"
|
|
3789 |
[package.extras]
|
3790 |
dev = ["pytest"]
|
3791 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3792 |
[[package]]
|
3793 |
name = "semantic-version"
|
3794 |
version = "2.10.0"
|
@@ -3911,6 +3959,18 @@ files = [
|
|
3911 |
{file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"},
|
3912 |
]
|
3913 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3914 |
[[package]]
|
3915 |
name = "sqlalchemy"
|
3916 |
version = "2.0.38"
|
@@ -4221,6 +4281,43 @@ files = [
|
|
4221 |
docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"]
|
4222 |
test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<8.2)", "pytest-mock", "pytest-mypy-testing"]
|
4223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4224 |
[[package]]
|
4225 |
name = "typer"
|
4226 |
version = "0.15.1"
|
@@ -4291,6 +4388,9 @@ files = [
|
|
4291 |
{file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"},
|
4292 |
]
|
4293 |
|
|
|
|
|
|
|
4294 |
[package.extras]
|
4295 |
brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""]
|
4296 |
h2 = ["h2 (>=4,<5)"]
|
@@ -4445,6 +4545,21 @@ files = [
|
|
4445 |
{file = "websockets-15.0.tar.gz", hash = "sha256:ca36151289a15b39d8d683fd8b7abbe26fc50be311066c5f8dcf3cb8cee107ab"},
|
4446 |
]
|
4447 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4448 |
[[package]]
|
4449 |
name = "yarl"
|
4450 |
version = "1.18.3"
|
@@ -4565,4 +4680,4 @@ type = ["pytest-mypy"]
|
|
4565 |
[metadata]
|
4566 |
lock-version = "2.1"
|
4567 |
python-versions = "3.11.*"
|
4568 |
-
content-hash = "
|
|
|
2452 |
{file = "orjson-3.10.15.tar.gz", hash = "sha256:05ca7fe452a2e9d8d9d706a2984c95b9c2ebc5db417ce0b7a49b91d50642a23e"},
|
2453 |
]
|
2454 |
|
2455 |
+
[[package]]
|
2456 |
+
name = "outcome"
|
2457 |
+
version = "1.3.0.post0"
|
2458 |
+
description = "Capture the outcome of Python function calls."
|
2459 |
+
optional = false
|
2460 |
+
python-versions = ">=3.7"
|
2461 |
+
groups = ["main"]
|
2462 |
+
files = [
|
2463 |
+
{file = "outcome-1.3.0.post0-py2.py3-none-any.whl", hash = "sha256:e771c5ce06d1415e356078d3bdd68523f284b4ce5419828922b6871e65eda82b"},
|
2464 |
+
{file = "outcome-1.3.0.post0.tar.gz", hash = "sha256:9dcf02e65f2971b80047b377468e72a268e15c0af3cf1238e6ff14f7f91143b8"},
|
2465 |
+
]
|
2466 |
+
|
2467 |
+
[package.dependencies]
|
2468 |
+
attrs = ">=19.2.0"
|
2469 |
+
|
2470 |
[[package]]
|
2471 |
name = "packaging"
|
2472 |
version = "24.2"
|
|
|
3176 |
requests = ">=2.26.0"
|
3177 |
websocket-client = "!=0.49"
|
3178 |
|
3179 |
+
[[package]]
|
3180 |
+
name = "pysocks"
|
3181 |
+
version = "1.7.1"
|
3182 |
+
description = "A Python SOCKS client module. See https://github.com/Anorov/PySocks for more information."
|
3183 |
+
optional = false
|
3184 |
+
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
3185 |
+
groups = ["main"]
|
3186 |
+
files = [
|
3187 |
+
{file = "PySocks-1.7.1-py27-none-any.whl", hash = "sha256:08e69f092cc6dbe92a0fdd16eeb9b9ffbc13cadfe5ca4c7bd92ffb078b293299"},
|
3188 |
+
{file = "PySocks-1.7.1-py3-none-any.whl", hash = "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5"},
|
3189 |
+
{file = "PySocks-1.7.1.tar.gz", hash = "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0"},
|
3190 |
+
]
|
3191 |
+
|
3192 |
[[package]]
|
3193 |
name = "python-dateutil"
|
3194 |
version = "2.9.0.post0"
|
|
|
3817 |
[package.extras]
|
3818 |
dev = ["pytest"]
|
3819 |
|
3820 |
+
[[package]]
|
3821 |
+
name = "selenium"
|
3822 |
+
version = "4.29.0"
|
3823 |
+
description = "Official Python bindings for Selenium WebDriver"
|
3824 |
+
optional = false
|
3825 |
+
python-versions = ">=3.9"
|
3826 |
+
groups = ["main"]
|
3827 |
+
files = [
|
3828 |
+
{file = "selenium-4.29.0-py3-none-any.whl", hash = "sha256:ce5d26f1ddc1111641113653af33694c13947dd36c2df09cdd33f554351d372e"},
|
3829 |
+
{file = "selenium-4.29.0.tar.gz", hash = "sha256:3a62f7ec33e669364a6c0562a701deb69745b569c50d55f1a912bf8eb33358ba"},
|
3830 |
+
]
|
3831 |
+
|
3832 |
+
[package.dependencies]
|
3833 |
+
certifi = ">=2021.10.8"
|
3834 |
+
trio = ">=0.17,<1.0"
|
3835 |
+
trio-websocket = ">=0.9,<1.0"
|
3836 |
+
typing_extensions = ">=4.9,<5.0"
|
3837 |
+
urllib3 = {version = ">=1.26,<3", extras = ["socks"]}
|
3838 |
+
websocket-client = ">=1.8,<2.0"
|
3839 |
+
|
3840 |
[[package]]
|
3841 |
name = "semantic-version"
|
3842 |
version = "2.10.0"
|
|
|
3959 |
{file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"},
|
3960 |
]
|
3961 |
|
3962 |
+
[[package]]
|
3963 |
+
name = "sortedcontainers"
|
3964 |
+
version = "2.4.0"
|
3965 |
+
description = "Sorted Containers -- Sorted List, Sorted Dict, Sorted Set"
|
3966 |
+
optional = false
|
3967 |
+
python-versions = "*"
|
3968 |
+
groups = ["main"]
|
3969 |
+
files = [
|
3970 |
+
{file = "sortedcontainers-2.4.0-py2.py3-none-any.whl", hash = "sha256:a163dcaede0f1c021485e957a39245190e74249897e2ae4b2aa38595db237ee0"},
|
3971 |
+
{file = "sortedcontainers-2.4.0.tar.gz", hash = "sha256:25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88"},
|
3972 |
+
]
|
3973 |
+
|
3974 |
[[package]]
|
3975 |
name = "sqlalchemy"
|
3976 |
version = "2.0.38"
|
|
|
4281 |
docs = ["myst-parser", "pydata-sphinx-theme", "sphinx"]
|
4282 |
test = ["argcomplete (>=3.0.3)", "mypy (>=1.7.0)", "pre-commit", "pytest (>=7.0,<8.2)", "pytest-mock", "pytest-mypy-testing"]
|
4283 |
|
4284 |
+
[[package]]
|
4285 |
+
name = "trio"
|
4286 |
+
version = "0.29.0"
|
4287 |
+
description = "A friendly Python library for async concurrency and I/O"
|
4288 |
+
optional = false
|
4289 |
+
python-versions = ">=3.9"
|
4290 |
+
groups = ["main"]
|
4291 |
+
files = [
|
4292 |
+
{file = "trio-0.29.0-py3-none-any.whl", hash = "sha256:d8c463f1a9cc776ff63e331aba44c125f423a5a13c684307e828d930e625ba66"},
|
4293 |
+
{file = "trio-0.29.0.tar.gz", hash = "sha256:ea0d3967159fc130acb6939a0be0e558e364fee26b5deeecc893a6b08c361bdf"},
|
4294 |
+
]
|
4295 |
+
|
4296 |
+
[package.dependencies]
|
4297 |
+
attrs = ">=23.2.0"
|
4298 |
+
cffi = {version = ">=1.14", markers = "os_name == \"nt\" and implementation_name != \"pypy\""}
|
4299 |
+
idna = "*"
|
4300 |
+
outcome = "*"
|
4301 |
+
sniffio = ">=1.3.0"
|
4302 |
+
sortedcontainers = "*"
|
4303 |
+
|
4304 |
+
[[package]]
|
4305 |
+
name = "trio-websocket"
|
4306 |
+
version = "0.12.2"
|
4307 |
+
description = "WebSocket library for Trio"
|
4308 |
+
optional = false
|
4309 |
+
python-versions = ">=3.8"
|
4310 |
+
groups = ["main"]
|
4311 |
+
files = [
|
4312 |
+
{file = "trio_websocket-0.12.2-py3-none-any.whl", hash = "sha256:df605665f1db533f4a386c94525870851096a223adcb97f72a07e8b4beba45b6"},
|
4313 |
+
{file = "trio_websocket-0.12.2.tar.gz", hash = "sha256:22c72c436f3d1e264d0910a3951934798dcc5b00ae56fc4ee079d46c7cf20fae"},
|
4314 |
+
]
|
4315 |
+
|
4316 |
+
[package.dependencies]
|
4317 |
+
outcome = ">=1.2.0"
|
4318 |
+
trio = ">=0.11"
|
4319 |
+
wsproto = ">=0.14"
|
4320 |
+
|
4321 |
[[package]]
|
4322 |
name = "typer"
|
4323 |
version = "0.15.1"
|
|
|
4388 |
{file = "urllib3-2.3.0.tar.gz", hash = "sha256:f8c5449b3cf0861679ce7e0503c7b44b5ec981bec0d1d3795a07f1ba96f0204d"},
|
4389 |
]
|
4390 |
|
4391 |
+
[package.dependencies]
|
4392 |
+
pysocks = {version = ">=1.5.6,<1.5.7 || >1.5.7,<2.0", optional = true, markers = "extra == \"socks\""}
|
4393 |
+
|
4394 |
[package.extras]
|
4395 |
brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""]
|
4396 |
h2 = ["h2 (>=4,<5)"]
|
|
|
4545 |
{file = "websockets-15.0.tar.gz", hash = "sha256:ca36151289a15b39d8d683fd8b7abbe26fc50be311066c5f8dcf3cb8cee107ab"},
|
4546 |
]
|
4547 |
|
4548 |
+
[[package]]
|
4549 |
+
name = "wsproto"
|
4550 |
+
version = "1.2.0"
|
4551 |
+
description = "WebSockets state-machine based protocol implementation"
|
4552 |
+
optional = false
|
4553 |
+
python-versions = ">=3.7.0"
|
4554 |
+
groups = ["main"]
|
4555 |
+
files = [
|
4556 |
+
{file = "wsproto-1.2.0-py3-none-any.whl", hash = "sha256:b9acddd652b585d75b20477888c56642fdade28bdfd3579aa24a4d2c037dd736"},
|
4557 |
+
{file = "wsproto-1.2.0.tar.gz", hash = "sha256:ad565f26ecb92588a3e43bc3d96164de84cd9902482b130d0ddbaa9664a85065"},
|
4558 |
+
]
|
4559 |
+
|
4560 |
+
[package.dependencies]
|
4561 |
+
h11 = ">=0.9.0,<1"
|
4562 |
+
|
4563 |
[[package]]
|
4564 |
name = "yarl"
|
4565 |
version = "1.18.3"
|
|
|
4680 |
[metadata]
|
4681 |
lock-version = "2.1"
|
4682 |
python-versions = "3.11.*"
|
4683 |
+
content-hash = "ab6e6a07a618fe81606a52a4f332ef5a9d7abdd4e8597696eb3018e5c864aa1e"
|
pyproject.toml
CHANGED
@@ -19,6 +19,7 @@ openai = "^1.64.0"
|
|
19 |
gradio = "^5.19.0"
|
20 |
rootpath = "^0.1.1"
|
21 |
typing-extensions = "^4.12.2"
|
|
|
22 |
|
23 |
[tool.poetry.group.dev.dependencies]
|
24 |
ipykernel = "^6.29.5"
|
|
|
19 |
gradio = "^5.19.0"
|
20 |
rootpath = "^0.1.1"
|
21 |
typing-extensions = "^4.12.2"
|
22 |
+
selenium = "^4.29.0"
|
23 |
|
24 |
[tool.poetry.group.dev.dependencies]
|
25 |
ipykernel = "^6.29.5"
|