diff --git a/docs/content/docs/home/index.mdx b/docs/content/docs/home/index.mdx index 048dbddf..c4d5f4d6 100644 --- a/docs/content/docs/home/index.mdx +++ b/docs/content/docs/home/index.mdx @@ -3,9 +3,7 @@ title: Home icon: House --- -import { buttonVariants } from 'fumadocs-ui/components/ui/button'; -import { cn } from 'fumadocs-ui/utils/cn'; -import { ChevronRight } from 'lucide-react'; +import { Monitor, Code, BookOpen } from 'lucide-react'; # Welcome! @@ -18,48 +16,18 @@ c/ua makes every stage of computer-using agent development simple: - **Deployment**: c/ua cloud gives you a production-ready cloud environment for your assistants
-
-

🖥️ Quickstart (UI)

-

Try the c/ua Agent UI in your browser—no coding required.

- - Get Started (UI) - - -
-
-

đź’» Quickstart (Developers)

-

Build with Python—full SDK and agent code examples.

- - Get Started (Python) - - -
+ } href="/home/quickstart-ui" title="Quickstart (UI)"> + Try the c/ua Agent UI in your browser—no coding required. + + } + href="/home/quickstart-devs" + title="Quickstart (Developers)"> + Build with Python—full SDK and agent code examples. +
-
-

📚 API Reference

-

Explore the agent SDK and APIs

- - View API Reference - - -
+ } href="/home/libraries/agent" title="API Reference"> + Explore the agent SDK and APIs +
diff --git a/docs/content/docs/home/libraries/agent/index.mdx b/docs/content/docs/home/libraries/agent/index.mdx index dd49018d..15ea92c6 100644 --- a/docs/content/docs/home/libraries/agent/index.mdx +++ b/docs/content/docs/home/libraries/agent/index.mdx @@ -1,6 +1,7 @@ --- title: Agent description: Reference for the current version of the Agent library. +pypi: cua-agent github: - https://github.com/trycua/cua/tree/main/libs/python/agent --- @@ -33,20 +34,20 @@ async for result in agent.run(prompt): The `ComputerAgent` constructor provides a wide range of options for customizing agent behavior, tool integration, callbacks, resource management, and more. -| Parameter | Type | Default | Description | -|-----------|------|---------|-------------| -| `model` | `str` | **required** | Model name (e.g., "claude-3-5-sonnet-20241022", "computer-use-preview", "omni+vertex_ai/gemini-pro") | -| `tools` | `List[Any]` | `None` | List of tools (e.g., computer objects, decorated functions) | -| `custom_loop` | `Callable` | `None` | Custom agent loop function (overrides auto-selection) | -| `only_n_most_recent_images` | `int` | `None` | If set, only keep the N most recent images in message history (adds ImageRetentionCallback) | -| `callbacks` | `List[Any]` | `None` | List of AsyncCallbackHandler instances for preprocessing/postprocessing | -| `verbosity` | `int` | `None` | Logging level (`logging.DEBUG`, `logging.INFO`, etc.; adds LoggingCallback) | -| `trajectory_dir` | `str` | `None` | Directory to save trajectory data (adds TrajectorySaverCallback) | -| `max_retries` | `int` | `3` | Maximum number of retries for failed API calls | -| `screenshot_delay` | `float` \| `int` | `0.5` | Delay before screenshots (seconds) | -| `use_prompt_caching` | `bool` | `False` | Use prompt caching to avoid reprocessing the same prompt (mainly for Anthropic) | -| `max_trajectory_budget` | `float` \| `dict` | `None` | If set, adds BudgetManagerCallback to track usage costs and stop when budget is exceeded | -| `**kwargs` | _any_ | | Additional arguments passed to the agent loop | +| Parameter | Type | Default | Description | +| --------------------------- | ----------------- | ------------ | ---------------------------------------------------------------------------------------------------- | +| `model` | `str` | **required** | Model name (e.g., "claude-3-5-sonnet-20241022", "computer-use-preview", "omni+vertex_ai/gemini-pro") | +| `tools` | `List[Any]` | `None` | List of tools (e.g., computer objects, decorated functions) | +| `custom_loop` | `Callable` | `None` | Custom agent loop function (overrides auto-selection) | +| `only_n_most_recent_images` | `int` | `None` | If set, only keep the N most recent images in message history (adds ImageRetentionCallback) | +| `callbacks` | `List[Any]` | `None` | List of AsyncCallbackHandler instances for preprocessing/postprocessing | +| `verbosity` | `int` | `None` | Logging level (`logging.DEBUG`, `logging.INFO`, etc.; adds LoggingCallback) | +| `trajectory_dir` | `str` | `None` | Directory to save trajectory data (adds TrajectorySaverCallback) | +| `max_retries` | `int` | `3` | Maximum number of retries for failed API calls | +| `screenshot_delay` | `float` \| `int` | `0.5` | Delay before screenshots (seconds) | +| `use_prompt_caching` | `bool` | `False` | Use prompt caching to avoid reprocessing the same prompt (mainly for Anthropic) | +| `max_trajectory_budget` | `float` \| `dict` | `None` | If set, adds BudgetManagerCallback to track usage costs and stop when budget is exceeded | +| `**kwargs` | _any_ | | Additional arguments passed to the agent loop | #### Parameter Details @@ -101,6 +102,7 @@ async for result in agent.run(messages): ``` ### Supported Agent Loops + - **Anthropic**: Claude 4, 3.7, 3.5 models - **OpenAI**: computer-use-preview - **UITARS**: UI-TARS 1.5 models (Hugging Face, TGI) @@ -120,4 +122,4 @@ agent = ComputerAgent( tools=[computer], callbacks=[ImageRetentionCallback(only_n_most_recent_images=3)] ) -``` \ No newline at end of file +``` diff --git a/docs/content/docs/home/libraries/computer-server/index.mdx b/docs/content/docs/home/libraries/computer-server/index.mdx index e6452e46..c2a9c43c 100644 --- a/docs/content/docs/home/libraries/computer-server/index.mdx +++ b/docs/content/docs/home/libraries/computer-server/index.mdx @@ -1,6 +1,7 @@ --- title: Computer Server descrption: Reference for the current version of the Computer Server library. +pypi: cua-computer-server github: - https://github.com/trycua/cua/tree/main/libs/python/computer-server --- diff --git a/docs/content/docs/home/libraries/computer/index.mdx b/docs/content/docs/home/libraries/computer/index.mdx index 03d72785..3f3a19b6 100644 --- a/docs/content/docs/home/libraries/computer/index.mdx +++ b/docs/content/docs/home/libraries/computer/index.mdx @@ -1,6 +1,8 @@ --- title: Computer description: Reference for the current version of the Computer library. +pypi: cua-computer +npm: '@trycua/computer' github: - https://github.com/trycua/cua/tree/main/libs/python/computer - https://github.com/trycua/cua/tree/main/libs/typescript/computer @@ -13,6 +15,7 @@ The Computer library provides a Computer class that can be used to control and a ### Basic Usage Connect to a c/ua cloud container: + ```python @@ -20,13 +23,14 @@ Connect to a c/ua cloud container: computer = Computer( os_type="linux", - provider_type="cloud", + provider_type="cloud", name="your-container-name", api_key="your-api-key" - ) + ) computer = await computer.run() # Connect to a c/ua cloud container ``` + ```typescript @@ -40,10 +44,12 @@ Connect to a c/ua cloud container: await computer.run(); // Connect to a c/ua cloud container ``` + Connect to a c/ua local container: + ```python @@ -55,6 +61,7 @@ Connect to a c/ua local container: computer = await computer.run() # Connect to the container ``` + @@ -144,6 +151,7 @@ Connect to a c/ua local container: # stdout and stderr are also captured and printed / raised print("Result from sandboxed function:", result) ``` + ```typescript @@ -196,5 +204,6 @@ Connect to a c/ua local container: // Accessibility await computer.interface.getAccessibilityTree(); // Get accessibility tree ``` + diff --git a/docs/content/docs/home/libraries/core/index.mdx b/docs/content/docs/home/libraries/core/index.mdx index a3c6dbcc..394c7547 100644 --- a/docs/content/docs/home/libraries/core/index.mdx +++ b/docs/content/docs/home/libraries/core/index.mdx @@ -1,6 +1,8 @@ --- title: Core description: Reference for the current version of the Core library. +pypi: cua-core +npm: '@trycua/core' github: - https://github.com/trycua/cua/tree/main/libs/python/core - https://github.com/trycua/cua/tree/main/libs/typescript/core diff --git a/docs/content/docs/home/libraries/mcp-server/index.mdx b/docs/content/docs/home/libraries/mcp-server/index.mdx index 243927ad..f9885bf1 100644 --- a/docs/content/docs/home/libraries/mcp-server/index.mdx +++ b/docs/content/docs/home/libraries/mcp-server/index.mdx @@ -1,6 +1,7 @@ --- title: MCP Server description: Reference for the current version of the MCP Server library. +pypi: cua-mcp-server github: - https://github.com/trycua/cua/tree/main/libs/python/mcp-server --- diff --git a/docs/content/docs/home/libraries/som/index.mdx b/docs/content/docs/home/libraries/som/index.mdx index 4a0d3b5b..e61f7a05 100644 --- a/docs/content/docs/home/libraries/som/index.mdx +++ b/docs/content/docs/home/libraries/som/index.mdx @@ -1,6 +1,7 @@ --- title: Set-of-Mark description: Reference for the current version of the Set-of-Mark library. +pypi: cua-som github: - https://github.com/trycua/cua/tree/main/libs/python/som --- @@ -46,6 +47,7 @@ class ParseResult: ``` ### UIElement + ```python class UIElement(BaseModel): id: Optional[int] = Field(None) # Element ID (1-indexed) @@ -53,4 +55,4 @@ class UIElement(BaseModel): bbox: BoundingBox # Bounding box coordinates { x1, y1, x2, y2 } interactivity: bool = Field(default=False) # Whether the element is interactive confidence: float = Field(default=1.0) # Detection confidence -``` \ No newline at end of file +```