Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

10.4 KB
Raw Blame
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 312" width="720" height="312" role="img" aria-labelledby="t d" fill="none"><title id="t">Your confirm callback decides each browser action before the driver executes it</title><desc id="d">Claude requests a browser action. Your confirm(context) callback runs before the driver executes it, once per action. If it returns True, the driver executes the action. If it returns False or raises, no action runs. Either way a tool_result returns to Claude.</desc><style>.s{font-family:Geist, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif}.m{font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace}text{font-kerning:normal}@keyframes flow{to{stroke-dashoffset:-24}}@media (prefers-reduced-motion:no-preference){.flow{animation:flow 1.6s linear infinite}}@keyframes cur{0%,100%{transform:translate(0,0)}40%{transform:translate(-7px,-5px)}70%{transform:translate(-3px,2px)}}@media (prefers-reduced-motion:no-preference){.cur{animation:cur 6s ease-in-out infinite}}</style><defs><pattern id="dots" width="16" height="16" patternUnits="userSpaceOnUse"><circle cx="8" cy="8" r="0.7" fill="#232328"/></pattern><filter id="grain" x="0" y="0" width="100%" height="100%"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" seed="7" stitchTiles="stitch"/><feColorMatrix values="0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0.07 0"/></filter><clipPath id="card"><rect x="0.5" y="0.5" width="719" height="311" rx="14"/></clipPath><marker id="ah" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M1 1.5 L9 5 L1 8.5" stroke="#A1A1AA" stroke-width="1.3" fill="none" stroke-linecap="round" stroke-linejoin="round"/></marker><marker id="aho" viewBox="0 0 10 10" refX="8.5" refY="5" markerWidth="7" markerHeight="7" orient="auto"><path d="M1 1.5 L9 5 L1 8.5" stroke="#FE750E" stroke-width="1.4" fill="none" stroke-linecap="round" stroke-linejoin="round"/></marker><pattern id="bar" width="6" height="6" patternUnits="userSpaceOnUse" patternTransform="rotate(45)"><rect width="3" height="6" fill="#6B6B74"/></pattern><filter id="glow" filterUnits="userSpaceOnUse" x="0" y="0" width="720" height="312"><feGaussianBlur stdDeviation="3.5"/></filter></defs><rect x="0.5" y="0.5" width="719" height="311" rx="14" fill="#111113"/><g clip-path="url(#card)"><rect width="720" height="312" fill="url(#dots)"/><rect width="720" height="312" filter="url(#grain)"/></g><rect x="0.5" y="0.5" width="719" height="311" rx="14" fill="none" stroke="#26262B"/><path d="M15 20h10M20 15v10" stroke="#3D3D45" stroke-width="0.75"/><path d="M695 20h10M700 15v10" stroke="#3D3D45" stroke-width="0.75"/><path d="M15 292h10M20 287v10" stroke="#3D3D45" stroke-width="0.75"/><path d="M695 292h10M700 287v10" stroke="#3D3D45" stroke-width="0.75"/><text x="34.0" y="24.5" font-size="10" fill="#A1A1AA" letter-spacing="0.08em" class="m">FIG 6.3</text><text x="686.0" y="24.5" font-size="10" fill="#A1A1AA" text-anchor="end" letter-spacing="0.08em" class="m">TOOLSETS FOR CLAUDE / APPROVALS</text><polygon points="100.0,132.0 134.6,152.0 100.0,172.0 65.4,152.0" stroke="#6B6B74" stroke-width="0.8" stroke-dasharray="2 2"/><polygon points="65.4,143.0 100.0,163.0 100.0,166.0 65.4,146.0" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="134.6,143.0 100.0,163.0 100.0,166.0 134.6,146.0" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="100.0,123.0 134.6,143.0 100.0,163.0 65.4,143.0" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="65.4,130.0 100.0,150.0 100.0,153.0 65.4,133.0" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="134.6,130.0 100.0,150.0 100.0,153.0 134.6,133.0" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="100.0,110.0 134.6,130.0 100.0,150.0 65.4,130.0" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><g transform="matrix(0.8660,0.5,-0.8660,0.5,100.0,110.0)"><path d="M7 10h24M7 17h17M7 24h21M7 31h11" stroke="#3D3D45" stroke-width="0.9" stroke-linecap="round" vector-effect="non-scaling-stroke"/></g><text x="100.0" y="106.0" font-size="12.5" fill="#EDEDEF" font-weight="600" text-anchor="middle" class="s">Claude</text><line x1="144" y1="150" x2="256" y2="150" stroke="#A1A1AA" stroke-width="1" marker-end="url(#ah)"/><polygon points="169.9,142.5 176.0,146.0 176.0,151.0 169.9,147.5" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="182.1,142.5 176.0,146.0 176.0,151.0 182.1,147.5" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="176.0,139.0 182.1,142.5 176.0,146.0 169.9,142.5" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="191.9,142.5 198.0,146.0 198.0,151.0 191.9,147.5" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="204.1,142.5 198.0,146.0 198.0,151.0 204.1,147.5" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="198.0,139.0 204.1,142.5 198.0,146.0 191.9,142.5" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="213.9,142.5 220.0,146.0 220.0,151.0 213.9,147.5" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="226.1,142.5 220.0,146.0 220.0,151.0 226.1,147.5" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="220.0,139.0 226.1,142.5 220.0,146.0 213.9,142.5" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="220.0,139.0 226.1,142.5 220.0,146.0 213.9,142.5" fill="#A1A1AA"/><text x="200.0" y="172.0" font-size="11" fill="#A1A1AA" text-anchor="middle" class="m">each browser action</text><polygon points="261.4,147.5 304.7,172.5 304.7,176.5 261.4,151.5" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="318.6,164.5 304.7,172.5 304.7,176.5 318.6,168.5" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="275.3,139.5 318.6,164.5 304.7,172.5 261.4,147.5" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="267.9,116.8 274.0,120.2 274.0,150.2 267.9,146.8" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="280.0,116.8 274.0,120.2 274.0,150.2 280.0,146.8" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="274.0,113.2 280.0,116.8 274.0,120.2 267.9,116.8" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><g transform="matrix(0.8660,0.5,0,1,268.3,147.5)"><rect x="10" y="-28" width="30" height="7" fill="url(#bar)" stroke="#A1A1AA" stroke-width="0.9" vector-effect="non-scaling-stroke"/></g><polygon points="300.0,135.2 306.0,138.8 306.0,168.8 300.0,165.2" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="312.1,135.2 306.0,138.8 306.0,168.8 312.1,165.2" fill="#1A1A1E" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><polygon points="306.0,131.8 312.1,135.2 306.0,138.8 300.0,135.2" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" stroke-linejoin="round"/><text x="290.0" y="194.0" font-size="11.5" fill="#EDEDEF" font-weight="500" text-anchor="middle" class="m">confirm(context)</text><line x1="320" y1="150" x2="364" y2="150" stroke="#A1A1AA" stroke-width="1"/><path d="M364 150V200q0 8 8 8H482" stroke="#A1A1AA" stroke-width="1" stroke-dasharray="4 3" marker-end="url(#ah)"/><path d="M364 150V100q0 -8 8 -8H480" stroke="#FE750E" stroke-width="4" stroke-opacity="0.5" filter="url(#glow)"/><path d="M364 150V100q0 -8 8 -8H480" stroke="#FE750E" stroke-width="2" stroke-linecap="round" marker-end="url(#aho)"/><path class="flow" d="M364 150V100q0 -8 8 -8H480" stroke="#111113" stroke-width="1" stroke-dasharray="4 8" stroke-opacity=".7"/><circle cx="364" cy="150" r="3.5" fill="#111113" stroke="#A1A1AA" stroke-width="1.2"/><text x="376.0" y="83.0" font-size="11" fill="#FF8A3D" font-weight="600" class="m">True</text><text x="376.0" y="228.0" font-size="11" fill="#A1A1AA" class="m">False or raises</text><g transform="matrix(0.8660,0.5,0,1,505.6,93.5)"><rect x="0" y="-40" width="54" height="40" rx="3" stroke="#6B6B74" stroke-width="0.8" stroke-dasharray="2 2" vector-effect="non-scaling-stroke"/></g><g transform="matrix(0.8660,0.5,0,1,498.6,100.5)"><rect x="0" y="-40" width="54" height="40" rx="3" fill="#151518" stroke="#A1A1AA" stroke-width="0.9" vector-effect="non-scaling-stroke"/><path d="M0 -32H54" stroke="#3D3D45" stroke-width="0.8" vector-effect="non-scaling-stroke"/><circle cx="4" cy="-36" r="1.3" fill="#FE750E"/><circle cx="8" cy="-36" r="1.3" fill="#6B6B74"/><circle cx="12" cy="-36" r="1.3" fill="#6B6B74"/><rect x="17" y="-37.7" width="32" height="3.4" rx="1.7" stroke="#3D3D45" stroke-width="0.8" vector-effect="non-scaling-stroke"/><rect x="5" y="-27" width="20" height="10" rx="1.5" fill="#1A1A1E" stroke="#3D3D45" stroke-width="0.8" vector-effect="non-scaling-stroke"/><path d="M30 -26h18M30 -21h12M5 -10h44M5 -5h28" stroke="#3D3D45" stroke-width="0.8" vector-effect="non-scaling-stroke"/><rect x="31" y="-15" width="18" height="6" rx="1.5" fill="#3A2214" stroke="#FE750E" stroke-width="0.9" vector-effect="non-scaling-stroke"/><g class="cur"><path d="M40 -13l0 9l2.4 -2.2l1.8 3.6l1.5 -.7l-1.8 -3.5l3.3 -.3z" fill="#FE750E"/></g></g><text x="562.0" y="96.0" font-size="12.5" fill="#FF8A3D" font-weight="600" class="s">Driver executes</text><g transform="matrix(0.8660,0.5,0,1,498.6,216.5)"><rect x="0" y="-40" width="54" height="40" rx="3" stroke="#6B6B74" stroke-width="0.9" stroke-dasharray="3 3" vector-effect="non-scaling-stroke"/><path d="M0 -32H54" stroke="#6B6B74" stroke-width="0.8" stroke-dasharray="3 3" vector-effect="non-scaling-stroke"/><path d="M21.0 -22.0l12 12M33.0 -22.0l-12 12" stroke="#6B6B74" stroke-width="1.2" stroke-linecap="round" vector-effect="non-scaling-stroke"/></g><text x="562.0" y="212.0" font-size="12.5" fill="#A1A1AA" font-weight="500" class="s">No action</text><path d="M526 118V132q0 6 6 6H670q6 0 6 6V264q0 6 -6 6H106q-6 0 -6 -6V188" stroke="#6B6B74" stroke-width="1" marker-end="url(#ah)"/><path d="M526 234V242q0 6 6 6H676" stroke="#6B6B74" stroke-width="1"/><circle cx="676" cy="248" r="2.5" fill="#6B6B74"/><text x="388.0" y="262.0" font-size="11" fill="#A1A1AA" text-anchor="middle" class="m">tool_result</text></svg>