cua-agent 0.1.25__py3-none-any.whl → 0.1.27__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.

Potentially problematic release.


This version of cua-agent might be problematic. Click here for more details.

@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cua-agent
3
- Version: 0.1.25
3
+ Version: 0.1.27
4
4
  Summary: CUA (Computer Use) Agent for AI-driven computer interaction
5
5
  Author-Email: TryCua <gh@trycua.com>
6
- Requires-Python: <3.13,>=3.10
6
+ Requires-Python: >=3.10
7
7
  Requires-Dist: httpx<0.29.0,>=0.27.0
8
8
  Requires-Dist: aiohttp<4.0.0,>=3.9.3
9
9
  Requires-Dist: asyncio
@@ -148,8 +148,10 @@ The agent includes a Gradio-based user interface for easy interaction. To use it
148
148
  ```bash
149
149
  # Install with Gradio support
150
150
  pip install "cua-agent[ui]"
151
+ ```
152
+
153
+ ### Create a simple launcher script
151
154
 
152
- # Create a simple launcher script
153
155
  ```python
154
156
  # launch_ui.py
155
157
  from agent.ui.gradio.app import create_gradio_ui
@@ -158,10 +160,6 @@ app = create_gradio_ui()
158
160
  app.launch(share=False)
159
161
  ```
160
162
 
161
- # Run the launcher
162
- python launch_ui.py
163
- ```
164
-
165
163
  ### Setting up API Keys
166
164
 
167
165
  For the Gradio UI to show available models, you need to set API keys as environment variables:
@@ -177,6 +175,8 @@ export ANTHROPIC_API_KEY=your_anthropic_key_here
177
175
  OPENAI_API_KEY=your_key ANTHROPIC_API_KEY=your_key python launch_ui.py
178
176
  ```
179
177
 
178
+ Without these environment variables, the UI will show "No models available" for the corresponding providers, but you can still use local models with the OMNI loop provider.
179
+
180
180
  ### Using Local Models
181
181
 
182
182
  You can use local models with the OMNI loop provider by selecting "Custom model..." from the dropdown. The default provider URL is set to `http://localhost:1234/v1` which works with LM Studio.
@@ -186,42 +186,12 @@ If you're using a different local model server:
186
186
  - LocalAI: `http://localhost:8080/v1`
187
187
  - Ollama with OpenAI compat API: `http://localhost:11434/v1`
188
188
 
189
- To change the URL, modify the `provider_base_url` in your launcher script:
190
-
191
- ```python
192
- # In your launcher script
193
- from agent.ui.gradio.app import create_gradio_ui
194
- from agent import LLM, LLMProvider
195
-
196
- # Create a custom model with a specific URL
197
- custom_model = LLM(
198
- provider=LLMProvider.OAICOMPAT,
199
- name="your-model-name",
200
- provider_base_url="http://localhost:8000/v1" # Change to your server URL
201
- )
202
-
203
- app = create_gradio_ui(custom_model=custom_model)
204
- app.launch()
205
- ```
206
-
207
- Without these environment variables, the UI will show "No models available" for the corresponding providers, but you can still use local models with the OMNI loop provider.
208
-
209
189
  The Gradio UI provides:
210
190
  - Selection of different agent loops (OpenAI, Anthropic, OMNI)
211
191
  - Model selection for each provider
212
192
  - Configuration of agent parameters
213
193
  - Chat interface for interacting with the agent
214
194
 
215
- You can also embed the Gradio UI in your own application:
216
-
217
- ```python
218
- # Import directly in your application
219
- from agent.ui.gradio.app import create_gradio_ui
220
-
221
- app = create_gradio_ui()
222
- app.launch()
223
- ```
224
-
225
195
  ## Agent Loops
226
196
 
227
197
  The `cua-agent` package provides three agent loops variations, based on different CUA models providers and techniques:
@@ -270,3 +240,26 @@ async for result in agent.run(task):
270
240
  print("\nTool Call Output:")
271
241
  print(output)
272
242
  ```
243
+
244
+ ### Gradio UI
245
+
246
+ You can also interact with the agent using a Gradio interface.
247
+
248
+ ```python
249
+ # Ensure environment variables (e.g., API keys) are loaded
250
+ # You might need a helper function like load_dotenv_files() if using .env
251
+ # from utils import load_dotenv_files
252
+ # load_dotenv_files()
253
+
254
+ from agent.ui.gradio.app import create_gradio_ui
255
+
256
+ app = create_gradio_ui()
257
+ app.launch(share=False)
258
+ ```
259
+
260
+ **Note on Settings Persistence:**
261
+
262
+ * The Gradio UI automatically saves your configuration (Agent Loop, Model Choice, Custom Base URL, Save Trajectory state, Recent Images count) to a file named `.gradio_settings.json` in the project's root directory when you successfully run a task.
263
+ * This allows your preferences to persist between sessions.
264
+ * API keys entered into the custom provider field are **not** saved in this file for security reasons. Manage API keys using environment variables (e.g., `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`) or a `.env` file.
265
+ * It's recommended to add `.gradio_settings.json` to your `.gitignore` file.
@@ -1,8 +1,8 @@
1
1
  agent/__init__.py,sha256=guFGtorDBF6R5hVep0Bvci3_sUJfBlcsq9ss5Kwrej8,1484
2
2
  agent/core/__init__.py,sha256=7DhJ_6KKooM6uTmDIlumCnd7OFcU67BYIIR1dpIYUB0,506
3
3
  agent/core/agent.py,sha256=HUfBe7Uam3TObAmf6KH0GDKuNCNunNmmMcuxS7aZg0Q,8332
4
- agent/core/base.py,sha256=EoutyMJ2kSJ72Di8KVRiUXc0ZJ1OkA0e7Ej14Y3F87w,7124
5
- agent/core/callbacks.py,sha256=VbGIf5QkHh3Q0KsLM6wv7hRdIA5WExTVYLm64bckyUA,4306
4
+ agent/core/base.py,sha256=2sg8B2VqUKImRlkLTNj5lx-Oarlu7_GoMR6MbNzSY9Q,8078
5
+ agent/core/callbacks.py,sha256=FKAxyajJ-ZJ5SxNXoupNcrm0GYBgjOjJEsStqst0EAk,6453
6
6
  agent/core/experiment.py,sha256=Ywj6q3JZFDKicfPuQsDl0vSN55HS7-Cnk3u3EcUCKe8,8866
7
7
  agent/core/factory.py,sha256=rGlSQDjcm61hNLxe9jLZvmMwPypYatNq25yf_SqUghU,3820
8
8
  agent/core/messages.py,sha256=-OVMDqcxK5MUHPEkHliK29XFJYMRAc1keFvzrUyrOmM,16231
@@ -24,7 +24,7 @@ agent/providers/anthropic/api/client.py,sha256=IVCntHAlkHFHPb6h4cEpb4wsBESy0wC6I
24
24
  agent/providers/anthropic/api/logging.py,sha256=vHpwkIyOZdkSTVIH4ycbBPd4a_rzhP7Osu1I-Ayouwc,5154
25
25
  agent/providers/anthropic/api_handler.py,sha256=pWXcqDs0ruviDhRNRrz5Ac9ZH4yDv6ZlwpeG3a42cDg,5206
26
26
  agent/providers/anthropic/callbacks/__init__.py,sha256=PciBb6Z6MKSwfXqDjU3pV_0FS4MOn_Np_A7_skD-6dA,104
27
- agent/providers/anthropic/callbacks/manager.py,sha256=dRKN7MuBze2dLal0iHDxCKYqMdh_KShSphuwn7zC-c4,1878
27
+ agent/providers/anthropic/callbacks/manager.py,sha256=euIah5yiM8nhisN-RWXewo6v0WQr0c-FbMBO04r6dJk,1865
28
28
  agent/providers/anthropic/loop.py,sha256=jW2PwJ8EBzfFKyD-cy7hKRsz1ZWyw8m-xHLUojsP4qE,20226
29
29
  agent/providers/anthropic/prompts.py,sha256=nHFfgPrfvnWrEdVP7EUBGUHAI85D2X9HeZirk9EwncU,1941
30
30
  agent/providers/anthropic/response_handler.py,sha256=ZTprV4NTP9Eb9jQ7QgEKZBX0L6rMj5nqBRiE3Zfws8I,8008
@@ -42,12 +42,12 @@ agent/providers/omni/__init__.py,sha256=5ix67iJdtQNGuGJEjEOF65PwFWO7vdo1QlXD28bR
42
42
  agent/providers/omni/api_handler.py,sha256=7CpD43lYAqTyNKWfrD8XcM9ekbajqKCTH9p0TWtEQyg,1163
43
43
  agent/providers/omni/clients/anthropic.py,sha256=nC_lj3UwrLqx9TIew58yxLqKwrH1_LwJD6EqVSEfp3g,3670
44
44
  agent/providers/omni/clients/base.py,sha256=6lN86XKZT3cgBT9EQdz2akKoqbIvc-NXXIOkYKwXObE,946
45
- agent/providers/omni/clients/oaicompat.py,sha256=KHFyOBttNUlxJdOEqrR7sS0S-S0LjMz7EVbTIkXyD_Y,7241
45
+ agent/providers/omni/clients/oaicompat.py,sha256=me8TMKt_GhXEcHokeVsotsmUOF7R6krF2OSKkRSuFP0,7743
46
46
  agent/providers/omni/clients/ollama.py,sha256=PmR5EhU9Mi43_o5mZN36XcpiGKp5HbQwlXpiRF9gO3I,4174
47
47
  agent/providers/omni/clients/openai.py,sha256=iTSYWEJEM8INFPGJMiUVs8rFn0781XF_ofRkd7NT3gk,5920
48
48
  agent/providers/omni/clients/utils.py,sha256=Ani9CVVBm_J2Dl51WG6p1GVuoI6cq8scISrG0pmQ37o,688
49
49
  agent/providers/omni/image_utils.py,sha256=wejhWb36yqedsPnLFTFwk2wth8a6txfVWSg4EaNrRdA,908
50
- agent/providers/omni/loop.py,sha256=-eKNHYpNUZ683FNI5ZNcW0ywrAaS27o46Iqt2DR5ZBU,40416
50
+ agent/providers/omni/loop.py,sha256=BmhO8yoCOqcJCgg3l9e9gpwcVCtHx2pUzvb5Dz-7LRI,40761
51
51
  agent/providers/omni/parser.py,sha256=REpQwlwvY1z_N8wbMj6GhOeTiiWVWHhVja_LOxgzbks,11734
52
52
  agent/providers/omni/prompts.py,sha256=Mupjy0bUwBjcAeLXpE1r1jisYPSlhwsp-IXJKEKrEtw,3779
53
53
  agent/providers/omni/tools/__init__.py,sha256=IC1cMEDoR2ljGcNNthzBRF_VtnDbRL5qvHJWErtNp98,774
@@ -58,7 +58,7 @@ agent/providers/omni/tools/manager.py,sha256=UhtasaxGcmkxtz-bP1UJ1a4xdYnD3Cv8Pbt
58
58
  agent/providers/omni/utils.py,sha256=Ikp6ONL1HO637o3KDtv5yv6q-4uIWAzMSQDvGetWXC8,8724
59
59
  agent/providers/openai/__init__.py,sha256=8DS6YNZp42NLCacwXsfRaghyczaOCVovX8TgzXUZf_o,165
60
60
  agent/providers/openai/api_handler.py,sha256=L1K56dR1j4JsX1sX4OFYeKoCUMM25Fwj2y9nqv8oOhw,17736
61
- agent/providers/openai/loop.py,sha256=3gruChABTE6IMQemQPwiER7xk6cmjuHuFssa0KUipAk,18782
61
+ agent/providers/openai/loop.py,sha256=l_sIdRcDhFewy4fXND2ALINdd63LK_G8oi_xCZdn4oU,19343
62
62
  agent/providers/openai/response_handler.py,sha256=K8v_92uSr9R74Y5INY4naeEZZZm35CLIl4h74MBZhsw,7953
63
63
  agent/providers/openai/tools/__init__.py,sha256=-KbHMWcd2OVTk5RYQ3ACBEMygwbH-VW6n_98p0lwM4A,344
64
64
  agent/providers/openai/tools/base.py,sha256=Np_BC9Cm6TslK99etE9hVTtsBlcEaGhoNCK3NXdB_Lw,2474
@@ -69,8 +69,8 @@ agent/providers/openai/utils.py,sha256=YeCZWIqOFSeugWoqAS0rhxOKAfL-9uN9nrYSBGBgP
69
69
  agent/telemetry.py,sha256=pVGxbj0ewnvq4EGj28CydN4a1iOfvZR_XKL3vIOqhOM,390
70
70
  agent/ui/__init__.py,sha256=ohhxJLBin6k1hl5sKcmBST8mgh23WXgAXz3pN4f470E,45
71
71
  agent/ui/gradio/__init__.py,sha256=ANKZhv1HqsLheWbLVBlyRQ7Q5qGeXuPi5jDs8vu-ZMo,579
72
- agent/ui/gradio/app.py,sha256=TzFOo40Fv6mC12UOXacu8JjYMzXAf0llBWD0VjH7bPA,34253
73
- cua_agent-0.1.25.dist-info/METADATA,sha256=rA7ZoOCmIrWiHWf2MeH03USJ7fvSXGCCznp113ItBio,10570
74
- cua_agent-0.1.25.dist-info/WHEEL,sha256=thaaA2w1JzcGC48WYufAs8nrYZjJm8LqNfnXFOFyCC4,90
75
- cua_agent-0.1.25.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
76
- cua_agent-0.1.25.dist-info/RECORD,,
72
+ agent/ui/gradio/app.py,sha256=mRr-zrmOuLOeyiw-CLT_Vyyw7ss7Z7IF_1krbh__sJk,41361
73
+ cua_agent-0.1.27.dist-info/METADATA,sha256=CcMM4dZVXY7QKYuspPT0PG-KttbmMyHHtwpvK_yo-yM,10880
74
+ cua_agent-0.1.27.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
75
+ cua_agent-0.1.27.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
76
+ cua_agent-0.1.27.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.4.3)
2
+ Generator: pdm-backend (2.4.4)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any