Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blog/build-your-own-operator-on-macos-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ For a visual interface to your agent, the package also includes a Gradio UI:
1. Create a file named `launch_ui.py` with the following code:

```python
from agent.ui.gradio.app import create_gradio_ui
from cua_agent.ui.gradio.app import create_gradio_ui

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

This article still contains stale agent imports in earlier code blocks.

After this rename, examples at Line 214, Line 266, Line 358, and Line 578 still use from agent import ComputerAgent, which will mislead users and fail with the new package layout.

📝 Suggested updates
- from agent import ComputerAgent
+ from cua_agent import ComputerAgent

Apply this replacement to each outdated snippet in the post.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@blog/build-your-own-operator-on-macos-2.md` at line 484, Search the article
for any occurrences of the stale import "from agent import ComputerAgent" (e.g.,
in the snippets around the earlier blocks that also import create_gradio_ui) and
update each to import the renamed package, replacing it with "from
cua_agent.agent import ComputerAgent" so the examples match the current layout
and won't fail at runtime.


# Create and launch the UI
if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions blog/hud-agent-evals.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export OPENAI_API_KEY="your_openai_key" # For OpenAI models
### Quick Start - Single Task

```python
from agent.integrations.hud import run_single_task
from cua_agent.integrations.hud import run_single_task

await run_single_task(
dataset="hud-evals/OSWorld-Verified-XLang",
Expand All @@ -46,7 +46,7 @@ await run_single_task(
### Run a dataset (parallel execution)

```python
from agent.integrations.hud import run_full_dataset
from cua_agent.integrations.hud import run_full_dataset

# Test on OSWorld (367 computer-use tasks)
await run_full_dataset(
Expand Down
4 changes: 2 additions & 2 deletions blog/human-in-the-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ The web UI will show pending completions. Click any completion to take control o
Perfect for creating demonstrations or when you want full manual control:

```python
from agent import ComputerAgent
from agent.computer import computer
from cua_agent import ComputerAgent
from cua_agent.computer import computer

agent = ComputerAgent(
"human/human",
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/cua/guide/advanced/custom-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ agent = ComputerAgent(model="cua/microsoft/fara-7b", tools=[computer])
To silence the warning, pass the correct tool explicitly:

```python
from agent.tools.browser_tool import BrowserTool
from cua_agent.tools.browser_tool import BrowserTool

browser_tool = BrowserTool(interface=computer.interface)
agent = ComputerAgent(model="cua/microsoft/fara-7b", tools=[browser_tool])
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/cua/guide/fundamentals/agent-loops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async for result in agent.run(messages, stream=True):
The agent respects the `max_trajectory_budget` you set. When the budget is exceeded, the agent raises an exception:

```python
from agent.exceptions import BudgetExceededException
from cua_agent.exceptions import BudgetExceededException

agent = ComputerAgent(
model="anthropic/claude-sonnet-4-5-20250929",
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/cua/guide/fundamentals/callbacks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ This is a simple way to guide agent behavior without modifying agent loops.
Callbacks can implement these hooks (all are optional):

```python
from agent.callbacks.base import AsyncCallbackHandler
from cua_agent.callbacks.base import AsyncCallbackHandler

class MyCallback(AsyncCallbackHandler):
async def on_run_start(self, kwargs, old_items):
Expand Down Expand Up @@ -214,7 +214,7 @@ class MyCallback(AsyncCallbackHandler):
Build your own callback by extending `AsyncCallbackHandler`:

```python
from agent.callbacks.base import AsyncCallbackHandler
from cua_agent.callbacks.base import AsyncCallbackHandler

class ActionCounterCallback(AsyncCallbackHandler):
def __init__(self):
Expand Down
4 changes: 2 additions & 2 deletions docs/content/docs/cua/guide/integrations/hud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ You can run a single task from a HUD dataset for quick verification.
### Example

```python
from agent.integrations.hud import run_single_task
from cua_agent.integrations.hud import run_single_task

await run_single_task(
dataset="hud-evals/OSWorld-Verified", # or another HUD dataset
Expand All @@ -61,7 +61,7 @@ To benchmark your agent at scale, you can run an entire dataset (or a subset) in
### Example

```python
from agent.integrations.hud import run_full_dataset
from cua_agent.integrations.hud import run_full_dataset

results = await run_full_dataset(
dataset="hud-evals/OSWorld-Verified", # can also pass a Dataset or list[dict]
Expand Down
6 changes: 3 additions & 3 deletions libs/cua-bench/cua_bench/telemetry/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
from datetime import datetime, timezone
from typing import Any, Callable, Dict, Optional

from core.telemetry import is_telemetry_enabled as _core_is_telemetry_enabled
from core.telemetry import record_event as _core_record_event
from core.telemetry.posthog import PostHogTelemetryClient
from cua_core.telemetry import is_telemetry_enabled as _core_is_telemetry_enabled
from cua_core.telemetry import record_event as _core_record_event
from cua_core.telemetry.posthog import PostHogTelemetryClient

logger = logging.getLogger("cua_bench.telemetry")

Expand Down
4 changes: 2 additions & 2 deletions libs/cua-bench/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies = [
"docker>=7.0.0",
# CUA SDK
"cua-computer>=0.4.19",
"cua-core>=0.1.18",
"cua-core>=0.3.0,<0.4.0",
"playwright>=1.55.0",
]

Expand All @@ -70,7 +70,7 @@ browser = [

# Agent support
agents = [
"cua-agent>=0.6.2",
"cua-agent>=0.8.0",
"anthropic>=0.26.0",
]

Expand Down
2 changes: 1 addition & 1 deletion libs/python/agent/benchmarks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# Add parent directory to path for imports
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from agent.agent import ComputerAgent
from cua_agent.agent import ComputerAgent
from models.base import ModelProtocol


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
from typing import Any, AsyncIterator, Iterator

from core.http import cua_version_headers
from cua_core.http import cua_version_headers
from litellm import acompletion, completion
from litellm.llms.custom_llm import CustomLLM
from litellm.types.utils import GenericStreamingChunk, ModelResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import litellm
import litellm.utils
from core.telemetry import is_telemetry_enabled, record_event
from cua_core.telemetry import is_telemetry_enabled, record_event
from litellm.responses.utils import Usage

from .adapters import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import uuid
from typing import Any, Dict, List, Optional, Union

from core.telemetry import (
from cua_core.telemetry import (
is_telemetry_enabled,
record_event,
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import time
from typing import Any, Optional

from agent.computers import is_agent_computer
from cua_agent.computers import is_agent_computer
from datasets import Dataset, load_dataset
from hud import trace
from hud.datasets import Task, run_dataset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

import hud
import mcp.types as types
from agent.agent import ComputerAgent as BaseComputerAgent
from agent.callbacks import PromptInstructionsCallback
from agent.callbacks.trajectory_saver import TrajectorySaverCallback
from agent.computers import is_agent_computer
from agent.responses import make_failed_tool_call_items
from cua_agent.agent import ComputerAgent as BaseComputerAgent
from cua_agent.callbacks import PromptInstructionsCallback
from cua_agent.callbacks.trajectory_saver import TrajectorySaverCallback
from cua_agent.computers import is_agent_computer
from cua_agent.responses import make_failed_tool_call_items
from hud.agents import MCPAgent
from hud.tools.computer.settings import computer_settings
from hud.types import AgentResponse, MCPToolCall, MCPToolResult, Trace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
import uuid
from typing import Any, Dict, List, Optional

from agent.agent import ComputerAgent as BaseComputerAgent
from agent.callbacks import PromptInstructionsCallback
from cua_agent.agent import ComputerAgent as BaseComputerAgent
from cua_agent.callbacks import PromptInstructionsCallback
from hud.agents import OperatorAgent
from hud.tools.computer.settings import computer_settings

Expand Down
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
"""
Agent loops for agent
"""
# Import the loops to register them
from . import (
anthropic,
composed_grounded,
fara,
gelato,
gemini,
generic_vlm,
glm45v,
gta1,
holo,
internvl,
moondream3,
omniparser,
openai,
opencua,
qwen3vl,
qwen35,
uiins,
uitars,
uitars2,
yutori,
)
__all__ = [
"anthropic",
"composed_grounded",
"gelato",
"gemini",
"generic_vlm",
"fara",
"glm45v",
"gta1",
"holo",
"internvl",
"moondream3",
"omniparser",
"openai",
"opencua",
"qwen3vl",
"qwen35",
"uiins",
"uitars",
"uitars2",
"yutori",
]
"""
Agent loops for agent
"""

# Import the loops to register them
from . import (
anthropic,
composed_grounded,
fara,
gelato,
gemini,
generic_vlm,
glm45v,
gta1,
holo,
internvl,
moondream3,
omniparser,
openai,
opencua,
qwen3vl,
qwen35,
uiins,
uitars,
uitars2,
yutori,
)

__all__ = [
"anthropic",
"composed_grounded",
"gelato",
"gemini",
"generic_vlm",
"fara",
"glm45v",
"gta1",
"holo",
"internvl",
"moondream3",
"omniparser",
"openai",
"opencua",
"qwen3vl",
"qwen35",
"uiins",
"uitars",
"uitars2",
"yutori",
]
Loading
Loading