cua-agent 0.2.11__tar.gz → 0.2.13__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.
Potentially problematic release.
This version of cua-agent might be problematic. Click here for more details.
- {cua_agent-0.2.11 → cua_agent-0.2.13}/PKG-INFO +4 -5
- {cua_agent-0.2.11 → cua_agent-0.2.13}/README.md +1 -4
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/__init__.py +1 -1
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/agent.py +0 -2
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/telemetry.py +1 -1
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/loop.py +0 -2
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/loop.py +0 -2
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/ui/gradio/app.py +9 -2
- {cua_agent-0.2.11 → cua_agent-0.2.13}/pyproject.toml +7 -4
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/base.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/callbacks.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/experiment.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/factory.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/messages.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/provider_config.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/base.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/bash.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/collection.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/computer.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/edit.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools/manager.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/tools.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/types.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/core/visualization.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/api/client.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/api/logging.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/api_handler.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/callbacks/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/callbacks/manager.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/loop.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/prompts.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/response_handler.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/base.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/bash.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/collection.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/computer.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/edit.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/manager.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/tools/run.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/types.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/anthropic/utils.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/api_handler.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/anthropic.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/base.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/oaicompat.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/ollama.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/openai.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/clients/utils.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/image_utils.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/parser.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/prompts.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/base.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/bash.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/computer.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/tools/manager.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/omni/utils.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/api_handler.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/loop.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/response_handler.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/tools/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/tools/base.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/tools/computer.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/tools/manager.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/types.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/openai/utils.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/clients/base.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/clients/mlxvlm.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/clients/oaicompat.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/prompts.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/tools/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/tools/computer.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/tools/manager.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/providers/uitars/utils.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/telemetry.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/ui/__init__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/ui/__main__.py +0 -0
- {cua_agent-0.2.11 → cua_agent-0.2.13}/agent/ui/gradio/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cua-agent
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: CUA (Computer Use) Agent for AI-driven computer interaction
|
|
5
5
|
Author-Email: TryCua <gh@trycua.com>
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -24,6 +24,7 @@ Requires-Dist: httpx<0.29.0,>=0.27.0; extra == "openai"
|
|
|
24
24
|
Provides-Extra: uitars
|
|
25
25
|
Requires-Dist: httpx<0.29.0,>=0.27.0; extra == "uitars"
|
|
26
26
|
Provides-Extra: uitars-mlx
|
|
27
|
+
Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "uitars-mlx"
|
|
27
28
|
Provides-Extra: ui
|
|
28
29
|
Requires-Dist: gradio<6.0.0,>=5.23.3; extra == "ui"
|
|
29
30
|
Requires-Dist: python-dotenv<2.0.0,>=1.0.1; extra == "ui"
|
|
@@ -67,6 +68,7 @@ Requires-Dist: requests<3.0.0,>=2.31.0; extra == "all"
|
|
|
67
68
|
Requires-Dist: ollama<0.5.0,>=0.4.7; extra == "all"
|
|
68
69
|
Requires-Dist: gradio<6.0.0,>=5.23.3; extra == "all"
|
|
69
70
|
Requires-Dist: python-dotenv<2.0.0,>=1.0.1; extra == "all"
|
|
71
|
+
Requires-Dist: mlx-vlm>=0.1.27; sys_platform == "darwin" and extra == "all"
|
|
70
72
|
Description-Content-Type: text/markdown
|
|
71
73
|
|
|
72
74
|
<div align="center">
|
|
@@ -105,10 +107,7 @@ pip install "cua-agent[anthropic]" # Anthropic Cua Loop
|
|
|
105
107
|
pip install "cua-agent[uitars]" # UI-Tars support
|
|
106
108
|
pip install "cua-agent[omni]" # Cua Loop based on OmniParser (includes Ollama for local models)
|
|
107
109
|
pip install "cua-agent[ui]" # Gradio UI for the agent
|
|
108
|
-
|
|
109
|
-
# For local UI-TARS with MLX support, you need to manually install mlx-vlm:
|
|
110
|
-
pip install "cua-agent[uitars-mlx]"
|
|
111
|
-
pip install git+https://github.com/ddupont808/mlx-vlm.git@stable/fix/qwen2-position-id # PR: https://github.com/Blaizzy/mlx-vlm/pull/349
|
|
110
|
+
pip install "cua-agent[uitars-mlx]" # MLX UI-Tars support
|
|
112
111
|
```
|
|
113
112
|
|
|
114
113
|
## Run
|
|
@@ -34,10 +34,7 @@ pip install "cua-agent[anthropic]" # Anthropic Cua Loop
|
|
|
34
34
|
pip install "cua-agent[uitars]" # UI-Tars support
|
|
35
35
|
pip install "cua-agent[omni]" # Cua Loop based on OmniParser (includes Ollama for local models)
|
|
36
36
|
pip install "cua-agent[ui]" # Gradio UI for the agent
|
|
37
|
-
|
|
38
|
-
# For local UI-TARS with MLX support, you need to manually install mlx-vlm:
|
|
39
|
-
pip install "cua-agent[uitars-mlx]"
|
|
40
|
-
pip install git+https://github.com/ddupont808/mlx-vlm.git@stable/fix/qwen2-position-id # PR: https://github.com/Blaizzy/mlx-vlm/pull/349
|
|
37
|
+
pip install "cua-agent[uitars-mlx]" # MLX UI-Tars support
|
|
41
38
|
```
|
|
42
39
|
|
|
43
40
|
## Run
|
|
@@ -11,10 +11,8 @@ from .types import AgentResponse
|
|
|
11
11
|
from .factory import LoopFactory
|
|
12
12
|
from .provider_config import DEFAULT_MODELS, ENV_VARS
|
|
13
13
|
|
|
14
|
-
logging.basicConfig(level=logging.INFO)
|
|
15
14
|
logger = logging.getLogger(__name__)
|
|
16
15
|
|
|
17
|
-
|
|
18
16
|
class ComputerAgent:
|
|
19
17
|
"""A computer agent that can perform automated tasks using natural language instructions."""
|
|
20
18
|
|
|
@@ -34,7 +34,7 @@ flush = _default_flush
|
|
|
34
34
|
is_telemetry_enabled = _default_is_telemetry_enabled
|
|
35
35
|
is_telemetry_globally_disabled = _default_is_telemetry_globally_disabled
|
|
36
36
|
|
|
37
|
-
logger = logging.getLogger("
|
|
37
|
+
logger = logging.getLogger("agent.telemetry")
|
|
38
38
|
|
|
39
39
|
try:
|
|
40
40
|
# Import from core telemetry
|
|
@@ -26,10 +26,8 @@ from .api_handler import OmniAPIHandler
|
|
|
26
26
|
from .tools.manager import ToolManager
|
|
27
27
|
from .tools import ToolResult
|
|
28
28
|
|
|
29
|
-
logging.basicConfig(level=logging.INFO)
|
|
30
29
|
logger = logging.getLogger(__name__)
|
|
31
30
|
|
|
32
|
-
|
|
33
31
|
def extract_data(input_string: str, data_type: str) -> str:
|
|
34
32
|
"""Extract content from code blocks."""
|
|
35
33
|
pattern = f"```{data_type}" + r"(.*?)(```|$)"
|
|
@@ -25,10 +25,8 @@ from .prompts import COMPUTER_USE, SYSTEM_PROMPT, MAC_SPECIFIC_NOTES
|
|
|
25
25
|
from .clients.oaicompat import OAICompatClient
|
|
26
26
|
from .clients.mlxvlm import MLXVLMUITarsClient
|
|
27
27
|
|
|
28
|
-
logging.basicConfig(level=logging.INFO)
|
|
29
28
|
logger = logging.getLogger(__name__)
|
|
30
29
|
|
|
31
|
-
|
|
32
30
|
class UITARSLoop(BaseLoop):
|
|
33
31
|
"""UI-TARS-specific implementation of the agent loop.
|
|
34
32
|
|
|
@@ -132,6 +132,13 @@ class GradioChatScreenshotHandler(DefaultCallbackHandler):
|
|
|
132
132
|
# Detect if current device is MacOS
|
|
133
133
|
is_mac = platform.system().lower() == "darwin"
|
|
134
134
|
|
|
135
|
+
# Detect if lume is available (host device is macOS)
|
|
136
|
+
is_lume_available = is_mac or (os.environ.get("PYLUME_HOST", "localhost") != "localhost")
|
|
137
|
+
|
|
138
|
+
print("PYLUME_HOST: ", os.environ.get("PYLUME_HOST", "localhost"))
|
|
139
|
+
print("is_mac: ", is_mac)
|
|
140
|
+
print("Lume available: ", is_lume_available)
|
|
141
|
+
|
|
135
142
|
# Map model names to specific provider model names
|
|
136
143
|
MODEL_MAPPINGS = {
|
|
137
144
|
"openai": {
|
|
@@ -733,9 +740,9 @@ if __name__ == "__main__":
|
|
|
733
740
|
is_mac = platform.system().lower() == "darwin"
|
|
734
741
|
|
|
735
742
|
providers = ["cloud"]
|
|
736
|
-
if
|
|
743
|
+
if is_lume_available:
|
|
737
744
|
providers += ["lume"]
|
|
738
|
-
|
|
745
|
+
if is_windows:
|
|
739
746
|
providers += ["winsandbox"]
|
|
740
747
|
|
|
741
748
|
computer_provider = gr.Radio(
|
|
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "cua-agent"
|
|
9
|
-
version = "0.2.
|
|
9
|
+
version = "0.2.13"
|
|
10
10
|
description = "CUA (Computer Use) Agent for AI-driven computer interaction"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
authors = [
|
|
@@ -39,7 +39,9 @@ openai = [
|
|
|
39
39
|
uitars = [
|
|
40
40
|
"httpx>=0.27.0,<0.29.0",
|
|
41
41
|
]
|
|
42
|
-
uitars-mlx = [
|
|
42
|
+
uitars-mlx = [
|
|
43
|
+
"mlx-vlm>=0.1.27; sys_platform == 'darwin'",
|
|
44
|
+
]
|
|
43
45
|
ui = [
|
|
44
46
|
"gradio>=5.23.3,<6.0.0",
|
|
45
47
|
"python-dotenv>=1.0.1,<2.0.0",
|
|
@@ -86,6 +88,7 @@ all = [
|
|
|
86
88
|
"ollama>=0.4.7,<0.5.0",
|
|
87
89
|
"gradio>=5.23.3,<6.0.0",
|
|
88
90
|
"python-dotenv>=1.0.1,<2.0.0",
|
|
91
|
+
"mlx-vlm>=0.1.27; sys_platform == 'darwin'",
|
|
89
92
|
]
|
|
90
93
|
|
|
91
94
|
[tool.pdm]
|
|
@@ -109,7 +112,7 @@ target-version = [
|
|
|
109
112
|
|
|
110
113
|
[tool.ruff]
|
|
111
114
|
line-length = 100
|
|
112
|
-
target-version = "0.2.
|
|
115
|
+
target-version = "0.2.13"
|
|
113
116
|
select = [
|
|
114
117
|
"E",
|
|
115
118
|
"F",
|
|
@@ -123,7 +126,7 @@ docstring-code-format = true
|
|
|
123
126
|
|
|
124
127
|
[tool.mypy]
|
|
125
128
|
strict = true
|
|
126
|
-
python_version = "0.2.
|
|
129
|
+
python_version = "0.2.13"
|
|
127
130
|
ignore_missing_imports = true
|
|
128
131
|
disallow_untyped_defs = true
|
|
129
132
|
check_untyped_defs = true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|