Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix: correct image paths and add comprehensive link checker
f-trycua591ba42d6718
diff --git a/docs/content/docs/cua/examples/ai-models/gemini-complex-ui-navigation.mdx b/docs/content/docs/cua/examples/ai-models/gemini-complex-ui-navigation.mdxindex 5b98f79fe2..a2735bb083 100644--- a/docs/content/docs/cua/examples/ai-models/gemini-complex-ui-navigation.mdx+++ b/docs/content/docs/cua/examples/ai-models/gemini-complex-ui-navigation.mdx@@ -12,7 +12,7 @@ import { Callout } from 'fumadocs-ui/components/callout';This example demonstrates how to use Google's Gemini 3 models with OmniParser for complex GUI grounding tasks. Gemini 3 Pro achieves exceptional performance on the [ScreenSpot-Pro benchmark](https://github.com/likaixin2000/ScreenSpot-Pro-GUI-Grounding) with a **72.7% accuracy** (compared to Claude Sonnet 4.5's 36.2%), making it ideal for precise UI element location and complex navigation tasks.<img- src="/docs/img/grounding-with-gemini3.gif"+ src="/img/grounding-with-gemini3.gif"alt="Demo of Gemini 3 with OmniParser performing complex GUI navigation tasks"width="800px"/>diff --git a/docs/content/docs/cua/guide/get-started/what-is-computer-use-agent.mdx b/docs/content/docs/cua/guide/get-started/what-is-computer-use-agent.mdxindex 43682d8989..172e0e442a 100644--- a/docs/content/docs/cua/guide/get-started/what-is-computer-use-agent.mdx+++ b/docs/content/docs/cua/guide/get-started/what-is-computer-use-agent.mdx@@ -6,7 +6,7 @@ description: Understanding AI agents that can see and interact with computer intA **computer-use agent** is an AI system that can perceive, understand, and interact with graphical user interfaces (GUIs) just like a human user would. Instead of using APIs or scripted automation, these agents "see" the screen and perform actions through simulated mouse and keyboard inputs.<div className="not-prose relative rounded-xl overflow-hidden my-8 w-full">- <img src="/docs/img/what-is-cua.png" alt="How Computer-Use Agents work" className="w-full h-auto rounded-xl" />+ <img src="/img/what-is-cua.png" alt="How Computer-Use Agents work" className="w-full h-auto rounded-xl" /></div>## How Computer-Use Agents Workdiff --git a/docs/content/docs/cua/guide/get-started/what-is-cua.mdx b/docs/content/docs/cua/guide/get-started/what-is-cua.mdxindex 5f9b64eef8..8e93623513 100644--- a/docs/content/docs/cua/guide/get-started/what-is-cua.mdx+++ b/docs/content/docs/cua/guide/get-started/what-is-cua.mdx@@ -6,7 +6,7 @@ description: Learn about Cua, the open-source platform for building computer-useCua is an **open-source platform** for building, deploying, and managing computer-use agents. It provides everything you need to create AI agents that can interact with desktop environments just like a human would—clicking, typing, navigating, and completing tasks autonomously.<div className="not-prose relative rounded-xl overflow-hidden my-8 w-full">- <img src="/docs/img/hero.png" alt="Cua" className="w-full h-auto rounded-xl" />+ <img src="/img/hero.png" alt="Cua" className="w-full h-auto rounded-xl" /></div>## The Cua Stackdiff --git a/docs/content/docs/cua/guide/get-started/what-is-desktop-sandbox.mdx b/docs/content/docs/cua/guide/get-started/what-is-desktop-sandbox.mdxindex 6db51a4df4..273218ebb7 100644--- a/docs/content/docs/cua/guide/get-started/what-is-desktop-sandbox.mdx+++ b/docs/content/docs/cua/guide/get-started/what-is-desktop-sandbox.mdx@@ -6,7 +6,7 @@ description: Understanding isolated environments for safe computer-use agent exeA **desktop sandbox** is an isolated virtual environment that provides a complete desktop operating system where computer-use agents can safely execute tasks. Think of it as a disposable computer that your agent can control without risk to your real system.<div className="not-prose relative rounded-xl overflow-hidden my-8 w-full">- <img src="/docs/img/what-is-sandbox.png" alt="What is a Desktop Sandbox" className="w-full h-auto rounded-xl" />+ <img src="/img/what-is-sandbox.png" alt="What is a Desktop Sandbox" className="w-full h-auto rounded-xl" /></div>## Why Use Sandboxes?diff --git a/docs/content/docs/cua/guide/index.mdx b/docs/content/docs/cua/guide/index.mdxindex c3a39ce0a6..c604840cc3 100644--- a/docs/content/docs/cua/guide/index.mdx+++ b/docs/content/docs/cua/guide/index.mdx@@ -12,7 +12,7 @@ import { Monitor, Code, BookOpen, Zap, Bot, Boxes, Rocket } from 'lucide-react';**Cua** is an open-source framework for building and evaluating Computer-Use Agents - AI systems that autonomously interact with computer interfaces by understanding visual elements and executing actions.<div className="not-prose relative rounded-xl overflow-hidden my-8 w-full">- <img src="/docs/img/hero.png" alt="Cua" className="w-full h-auto rounded-xl" />+ <img src="/img/hero.png" alt="Cua" className="w-full h-auto rounded-xl" /></div>## What is a Computer-Use Agent?diff --git a/docs/content/docs/cua/guide/integrations/laminar.mdx b/docs/content/docs/cua/guide/integrations/laminar.mdxindex 6571c1afe8..4688261575 100644--- a/docs/content/docs/cua/guide/integrations/laminar.mdx+++ b/docs/content/docs/cua/guide/integrations/laminar.mdx@@ -58,7 +58,7 @@ you will see all the agent execution steps, including computer actions, LLM callFor each step, you will see the LLM call, the computer action. The computer actions are highlighted in the timeline in yellow.<img- src="/docs/img/laminar_trace_example.png"+ src="/img/laminar_trace_example.png"alt="Example trace in Laminar showing the litellm.response span and its output."width="800px"/>diff --git a/docs/content/docs/cuabench/guide/fundamentals/tasks.mdx b/docs/content/docs/cuabench/guide/fundamentals/tasks.mdxindex 0a27646799..a17d175390 100644--- a/docs/content/docs/cuabench/guide/fundamentals/tasks.mdx+++ b/docs/content/docs/cuabench/guide/fundamentals/tasks.mdx@@ -4,7 +4,7 @@ description: An in-depth guide describing the structure of a Cua-Bench task.---<div className="not-prose relative rounded-xl overflow-hidden my-8 w-full">- <img src="/docs/img/cua_bench_overview.png" alt="Cua" className="w-full h-auto rounded-xl border" />+ <img src="/img/cua_bench_overview.png" alt="Cua" className="w-full h-auto rounded-xl border" /></div>A Cua-Bench task is a Python module that defines a verifiable computer-use environment. Tasks use decorators to define configuration, setup, evaluation, and oracle solutions.diff --git a/docs/content/docs/cuabench/guide/getting-started/introduction.mdx b/docs/content/docs/cuabench/guide/getting-started/introduction.mdxindex 48aeb9d38a..327ee02029 100644--- a/docs/content/docs/cuabench/guide/getting-started/introduction.mdx+++ b/docs/content/docs/cuabench/guide/getting-started/introduction.mdx@@ -6,7 +6,7 @@ description: A benchmark to measure the capabilities of computer-use agents in d**Cua-Bench** is a framework and set of tasks for evaluating how well AI agents can accomplish complex tasks on a desktop computer using primarily the keyboard and mouse, or on a mobile device using primarily the touchscreen.<div className="not-prose relative rounded-xl overflow-hidden my-8 w-full">- <img src="/docs/img/cua_bench_screenshots.png" alt="Cua" className="w-full h-auto rounded-xl border" />+ <img src="/img/cua_bench_screenshots.png" alt="Cua" className="w-full h-auto rounded-xl border" /></div>Examples of Cua-Bench tasks are:diff --git a/docs/scripts/check-all-links.py b/docs/scripts/check-all-links.pynew file mode 100755index 0000000000..93f21ab7ae--- /dev/null+++ b/docs/scripts/check-all-links.py@@ -0,0 +1,286 @@+#!/usr/bin/env python3+"""+Comprehensive Link Checker - Checks for broken internal links across all file types.++This script scans various file types in the docs directory and validates+that all internal links point to existing files.++Supported file types:+- MDX files (.mdx)+- TypeScript/JavaScript files (.ts, .tsx, .js, .jsx)+- JSON files (.json)+- CSS files (.css)++Usage:+ python scripts/check-all-links.py [docs_dir]++Example:+ python scripts/check-all-links.py+ python scripts/check-all-links.py /path/to/docs+"""++import os+import re+import sys+from pathlib import Path+from collections import defaultdict+++# File extensions to scan+SCAN_EXTENSIONS = {'.mdx', '.md', '.tsx', '.ts', '.jsx', '.js', '.json', '.css'}++# Directories to skip+SKIP_DIRS = {'node_modules', '.next', '.git', 'dist', 'build', '.turbo', '.cache'}+++def find_files(base_dir: Path) -> list[Path]:+ """Find all scannable files in the directory."""+ files = []+ for root, dirs, filenames in os.walk(base_dir):+ # Skip certain directories+ dirs[:] = [d for d in dirs if d not in SKIP_DIRS]++ for filename in filenames:+ path = Path(root) / filename+ if path.suffix in SCAN_EXTENSIONS:+ files.append(path)+ return files+++def extract_links_from_content(content: str, file_type: str) -> list[tuple[str, int]]:+ """Extract all internal links from content with line numbers."""+ links = []+ lines = content.split('\n')++ for line_num, line in enumerate(lines, 1):+ # Skip comments+ stripped = line.strip()+ if stripped.startswith('//') or stripped.startswith('*') or stripped.startswith('/*'):+ continue++ # Markdown links: [text](/path) or [text](/path#anchor)+ md_link_pattern = r'\[([^\]]*)\]\((/[^)#\s]+)(?:#[^)]*)?\)'+ for match in re.finditer(md_link_pattern, line):+ links.append((match.group(2), line_num))++ # JSX/HTML href attributes: href="/path" or href='/path'+ href_pattern = r'href=["\'](/[^"\'#\s]+)(?:#[^"\']*)?["\']'+ for match in re.finditer(href_pattern, line):+ links.append((match.group(1), line_num))++ # JSX/HTML src attributes: src="/path" or src='/path'+ src_pattern = r'src=["\'](/[^"\'#\s]+)["\']'+ for match in re.finditer(src_pattern, line):+ links.append((match.group(1), line_num))++ # Next.js Link component: to="/path" or to='/path'+ to_pattern = r'\bto=["\'](/[^"\'#\s]+)(?:#[^"\']*)?["\']'+ for match in re.finditer(to_pattern, line):+ links.append((match.group(1), line_num))++ # JavaScript/TypeScript string paths (common patterns)+ # e.g., path: '/cua/guide', redirect: '/docs/cua'+ js_path_pattern = r'(?:path|href|to|redirect|url|link|route):\s*["\'](/[^"\'#\s]+)["\']'+ for match in re.finditer(js_path_pattern, line, re.IGNORECASE):+ links.append((match.group(1), line_num))++ # Image markdown: + img_md_pattern = r'!\[[^\]]*\]\((/[^)#\s]+)(?:#[^)]*)?\)'+ for match in re.finditer(img_md_pattern, line):+ links.append((match.group(1), line_num))++ return links+++def normalize_link(link: str, docs_dir: Path, public_dir: Path, src_dir: Path) -> tuple[Path | None, str]:+ """Convert a link to a file path. Returns (path, type)."""+ # Skip external links+ if link.startswith(('http://', 'https://', 'mailto:', 'tel:', '#', 'data:')):+ return None, 'external'++ # Remove leading slash+ clean_link = link.lstrip('/')++ # Skip Next.js internal routes+ if clean_link.startswith('_next/'):+ return None, 'internal'++ # Check if it's a public asset (images, etc.)+ if clean_link.startswith(('img/', 'images/', 'favicon', 'icons/')):+ return public_dir / clean_link, 'public'++ # Check if it's a docs path+ if clean_link.startswith(('docs/', 'cua/', 'cuabench/')):+ # Remove 'docs/' prefix if present+ if clean_link.startswith('docs/'):+ clean_link = clean_link[5:]+ docs_content_dir = docs_dir / 'content' / 'docs'+ return docs_content_dir / clean_link, 'docs'++ # Check source directory for components, etc.+ if clean_link.startswith(('components/', 'lib/', 'app/', 'src/')):+ return src_dir / clean_link, 'src'++ # Default: check in public directory first, then docs+ public_path = public_dir / clean_link+ if public_path.exists() or (public_path.parent.exists() and any(public_path.parent.glob(f"{public_path.name}*"))):+ return public_path, 'public'++ # Check docs content+ docs_content_dir = docs_dir / 'content' / 'docs'+ return docs_content_dir / clean_link, 'docs'+++def check_file_exists(file_path: Path, link_type: str) -> bool:+ """Check if a file exists (with various extensions and index files)."""+ # Direct match+ if file_path.exists():+ return True++ # For docs, try various MDX/MD patterns+ if link_type == 'docs':+ # Try with .mdx extension+ mdx_path = file_path.with_suffix('.mdx')+ if mdx_path.exists():+ return True++ # Try with .md extension+ md_path = file_path.with_suffix('.md')+ if md_path.exists():+ return True++ # Try as directory with index.mdx+ index_mdx = file_path / 'index.mdx'+ if index_mdx.exists():+ return True++ # Try as directory with index.md+ index_md = file_path / 'index.md'+ if index_md.exists():+ return True++ # For public assets, check common image extensions+ if link_type == 'public':+ for ext in ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico']:+ if file_path.with_suffix(ext).exists():+ return True++ # For source files, try various extensions+ if link_type == 'src':+ for ext in ['.tsx', '.ts', '.jsx', '.js', '.css']:+ if file_path.with_suffix(ext).exists():+ return True+ # Try index files+ for ext in ['.tsx', '.ts', '.jsx', '.js']:+ index_file = file_path / f'index{ext}'+ if index_file.exists():+ return True++ return False+++def check_links(docs_dir: Path) -> dict[str, list[tuple[str, int, str, str]]]:+ """Check all links in all files and return broken ones."""+ broken_links = defaultdict(list)++ public_dir = docs_dir / 'public'+ src_dir = docs_dir / 'src'+ content_dir = docs_dir / 'content'++ # Find all files to scan+ all_files = find_files(docs_dir)++ print(f"\n🔍 Scanning {len(all_files)} files in {docs_dir}\n")+ print("-" * 60)++ # Track unique broken links to avoid duplicates+ seen_broken = set()++ for file_path in all_files:+ try:+ content = file_path.read_text(encoding='utf-8')+ except Exception as e:+ print(f"⚠️ Error reading {file_path}: {e}")+ continue++ file_type = file_path.suffix+ links = extract_links_from_content(content, file_type)++ for link, line_num in links:+ # Skip external and internal Next.js links+ if link.startswith(('http://', 'https://', 'mailto:', 'tel:', '#', 'data:')):+ continue++ target_path, link_type = normalize_link(link, docs_dir, public_dir, src_dir)+ if target_path is None:+ continue++ if not check_file_exists(target_path, link_type):+ # Create unique key to avoid duplicates+ key = (str(file_path), link, line_num)+ if key not in seen_broken:+ seen_broken.add(key)+ rel_file = file_path.relative_to(docs_dir)+ broken_links[str(rel_file)].append((link, line_num, str(target_path), link_type))++ return broken_links+++def main():+ # Determine docs directory+ if len(sys.argv) > 1:+ docs_dir = Path(sys.argv[1])+ else:+ # Default: look for docs directory relative to script location+ script_dir = Path(__file__).parent+ docs_dir = script_dir.parent++ if not docs_dir.exists():+ print(f"❌ Directory not found: {docs_dir}")+ sys.exit(1)++ broken_links = check_links(docs_dir)++ # Summary+ print("\n" + "=" * 60)++ total_broken = sum(len(links) for links in broken_links.values())+ files_with_broken = len(broken_links)++ print(f"\n📊 Summary:")+ print(f" Files with broken links: {files_with_broken}")+ print(f" Total broken links: {total_broken}")++ if broken_links:+ print(f"\n❌ Broken Links:\n")++ # Group by link type+ by_type = defaultdict(list)+ for file_path, links in sorted(broken_links.items()):+ for link, line_num, target_path, link_type in links:+ by_type[link_type].append((file_path, link, line_num, target_path))++ for link_type, items in sorted(by_type.items()):+ print(f"\n 📁 {link_type.upper()} links ({len(items)}):\n")+ for file_path, link, line_num, target_path in items:+ print(f" {file_path}:{line_num}")+ print(f" Link: {link}")+ print(f" Expected: {target_path}")+ print()++ # Suggest fixes+ print("\n💡 Common issues to check:")+ print(" - Links with /docs/ prefix should NOT have /docs/ (basePath handles it)")+ print(" - Internal doc links should start with /cua/ or /cuabench/")+ print(" - Image paths should start with /img/ and exist in public/img/")+ print(" - Check if target files were renamed or moved")+ print()++ return 1+ else:+ print("\n✅ All internal links are valid!\n")+ return 0+++if __name__ == '__main__':+ sys.exit(main())diff --git a/docs/src/app/(landing)/page.tsx b/docs/src/app/(landing)/page.tsxindex fa8e4ed4db..fa03a25908 100644--- a/docs/src/app/(landing)/page.tsx+++ b/docs/src/app/(landing)/page.tsx@@ -73,14 +73,14 @@ export default function LandingPage() {{/* Background image - dark/light mode */}<div className="pointer-events-none absolute inset-0"><Image- src="/docs/img/bg-dark.jpg"+ src="/img/bg-dark.jpg"alt=""fillclassName="hidden object-cover object-top opacity-50 dark:block"priority/><Image- src="/docs/img/bg-light.jpg"+ src="/img/bg-light.jpg"alt=""fillclassName="block object-cover object-top opacity-30 dark:hidden"@@ -144,7 +144,7 @@ export default function LandingPage() {<div className="absolute -inset-4 rounded-3xl bg-gradient-to-br from-sky-500/20 via-emerald-500/10 to-purple-500/20 blur-2xl" /><div className="relative overflow-hidden rounded-2xl border border-fd-border/50 bg-fd-card/30 p-4 backdrop-blur-sm"><Image- src="/docs/img/hero.png"+ src="/img/hero.png"alt="Cua Platform"width={400}height={400}diff --git a/docs/src/app/layout.tsx b/docs/src/app/layout.tsxindex cd5ef8c131..5ad53f41fa 100644--- a/docs/src/app/layout.tsx+++ b/docs/src/app/layout.tsx@@ -31,7 +31,7 @@ export default function Layout({ children }: { children: ReactNode }) {suppressHydrationWarning><head>- <link rel="icon" href="/docs/favicon.ico" sizes="any" />+ <link rel="icon" href="/favicon.ico" sizes="any" /><scriptdangerouslySetInnerHTML={{__html: `diff --git a/docs/src/components/docs-nav.tsx b/docs/src/components/docs-nav.tsxindex f6cc3edc65..ad6bde19ec 100644--- a/docs/src/components/docs-nav.tsx+++ b/docs/src/components/docs-nav.tsx@@ -5,9 +5,9 @@ import { usePathname } from 'next/navigation';import { cn } from 'fumadocs-ui/utils/cn';const tabs = [- { name: 'Guide', href: '/guide/get-started/what-is-cua', prefix: '/guide' },- { name: 'Examples', href: '/examples', prefix: '/examples' },- { name: 'Reference', href: '/reference/computer-sdk', prefix: '/reference' },+ { name: 'Guide', href: '/cua/guide/get-started/what-is-cua', prefix: '/cua/guide' },+ { name: 'Examples', href: '/cua/examples', prefix: '/cua/examples' },+ { name: 'Reference', href: '/cua/reference/computer-sdk', prefix: '/cua/reference' },];export function DocsNav() {