AI agent instructions
AI agent instructions
computer tool to a Notte browser through Playwright over CDP.
Set up
Clone the Notte repository and open examples/openai-computer-use. Its README contains the complete runnable projects. SetNOTTE_API_KEY from Notte and OPENAI_API_KEY from OpenAI. Real model requests incur OpenAI API charges.
- Python
- TypeScript
Use Python 3.11+ and uv. Run
uv sync --locked, then uv run python python/demo.py.Run a visual browser task
The example usesgpt-6.1-sol to read a random code from a screenshot and submit it through a form. It verifies the actual page result and returns output, session_id, and the actions executed. Each run owns its Notte session and closes it on success or error.
The reusable adapter executes ordered action batches and returns a screenshot at the original viewport resolution. It supports mouse movement, clicks, scrolling, dragging, typing, key presses, waits, and screenshots within the browser.
Provide a permission callback when adapting the adapter to other pages. The demo approves actions only on its own test page; pending API safety checks stop execution for human review. Keep consequential actions under your user’s control, and treat page content as untrusted. Runs have turn, action, and time limits.