A Kernel application that demonstrates Computer Use Agent (CUA) capabilities using Google's Gemini 2.5 model with Stagehand for browser automation.
gemini-2.5-cua-demo.mp4
This app uses Gemini 2.5's computer use model capabilities to autonomously navigate websites and complete tasks. The example task searches for Kernel's company page on YCombinator and writes a blog post about their product.
-
Copy the environment file:
cp .env-example .env
-
Add your API keys to
.env:KERNEL_API_KEY- Get from Kernel dashboardGOOGLE_API_KEY- Get from Google AI StudioOPENAI_API_KEY- Get from OpenAI platform
Execute the script directly with tsx:
npx tsx index.tsThis runs the agent without a Kernel invocation context and provides the browser live view URL for debugging.
-
Deploy the application:
kernel deploy index.ts --env-file .env
-
Invoke the action:
kernel invoke ts-stagehand-google-cua-agent google-cua-agent-task
The action creates a Kernel-managed browser and associates it with the invocation for tracking and monitoring.