--- title: Anthropic Claude | Lightcone description: Use Claude's computer-use capabilities with Lightcone browser sessions. --- Use [Anthropic Claude’s computer use](https://docs.anthropic.com/en/docs/build-with-claude/computer-use) with Lightcone cloud browsers. Claude sees screenshots of the browser and decides what to click, type, and scroll. Lightcone provides the sandboxed execution environment. ## Setup Terminal window ``` pip install tzafon playwright anthropic playwright install chromium ``` ## Example ``` import anthropic from tzafon import Lightcone from playwright.sync_api import sync_playwright import base64 # Create a Lightcone browser session lc = Lightcone() session = lc.computers.create(kind="browser") cdp_url = session.endpoints.get("cdp") # Connect Playwright with sync_playwright() as p: browser = p.chromium.connect_over_cdp(cdp_url) page = browser.contexts[0].pages[0] page.goto("https://example.com") screenshot = page.screenshot() b64_screenshot = base64.b64encode(screenshot).decode() # Ask Claude to analyze the page client = anthropic.Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, tools=[{ "type": "computer_20250124", "name": "computer", "display_width_px": 1280, "display_height_px": 720, "display_number": 1, }], messages=[{ "role": "user", "content": [ {"type": "text", "text": "Click on the 'More information' link"}, { "type": "image", "source": { "type": "base64", "media_type": "image/png", "data": b64_screenshot, }, }, ], }], ) # Process Claude's tool use response for block in response.content: if block.type == "tool_use": action = block.input if action.get("action") == "mouse_move" or action.get("action") == "left_click": x, y = action["coordinate"] page.mouse.click(x, y) browser.close() lc.computers.delete(session.id) ``` ## Why use Lightcone with Claude? - **Cloud execution** — No need to run browsers locally; Lightcone handles the infrastructure - **Stealth mode** — Access sites that block automation - **Session persistence** — Save login sessions for reuse - **Scale** — Run many agents in parallel on separate browser instances For a fully managed experience without Playwright, use Lightcone’s native [Responses API](/guides/responses-api/index.md) with the `tzafon.northstar-cua-fast` model. It handles the screenshot-action loop for you. ## Resources - [Anthropic computer use docs](https://docs.anthropic.com/en/docs/build-with-claude/computer-use) - [Lightcone Playwright integration](/integrations/playwright/index.md) ## See also - [**OpenAI CUA**](/integrations/openai-cua/index.md) — OpenAI’s computer-use agent with Lightcone - [**CUA protocol guide**](/guides/cua-protocol/index.md) — build a CUA loop with Lightcone’s native API - [**Playwright**](/integrations/playwright/index.md) — CDP connection details