cdpUrl, the same way it attaches to any CDP browser. Browser Use lets several connections share one browser, so the SDK and the agent work in the same browser at the same time.
You need a user with a card in the Vault first. See Adding a card.
Install
Shop with your own agent
Create a Browser Use browser, connect Playwright to itscdpUrl, and attach Agentcard to the page before your agent reaches the payment form.
cdpUrl, and keep the Node process above running while the agent shops:
keep_alive=True, the browser stays open after the agent finishes, so you can still confirm the order with the merchant.
Shop with Browser Use’s agent
When Browser Use’s hosted agent does the shopping, attach Agentcard before the shopping task starts. A run starts working as soon as you create it, so open the session with a first run that only opens the store. Attach Agentcard to that run’s browser, wait until it is ready, then give the shopping task to a second run in the same session. Browser Use keeps a session on the same browser between runs.run.dispatched reports which browser the run landed on, and observing it then cancelling does not guarantee the agent has taken no step. If you need a hard guarantee that nothing can run before Agentcard is attached, own the browser yourself with browsers.create(), attach Agentcard to it, and start the agent only after attachment has completed, as in Shop with your own agent.
Put the placeholder card in the task, and tell the agent that the payment waits for the user after Pay. Send the approval link to the user over your own app or thread, and keep it out of the task and your logs: the link opens the approval screen for this payment, and only the user should see it.