Handing Real Logins to Headless AI Agents: Building the Lightpanda Session Bridge
Description and use
AI agents can securely interact with web dashboards using the Lightpanda Session Bridge, which transfers only temporary, scoped cookies without exposing passwords.
Problem
AI agents need to interact with modern web dashboards that use OAuth, SSO, passkeys, and 2FA, but headless browsers cannot perform these authentication rituals, forcing insecure credential handling.
Outcome
Agents can securely interact with authenticated web dashboards without exposing passwords, reducing credential leakage risk and improving workflow isolation.
Workflow
- 1. User logs into target site using native browser authentication (passkey, OAuth, 2FA).
- 2. User clicks the Lightpanda Session Bridge extension’s Sync button.
- 3. Extension extracts and normalizes cookies for the active domain and posts them to the local relay at 127.0.0.1:8765 with a secure token.
- 4. The relay validates origin, normalizes cookie format, and forwards them over CDP WebSocket to a Lightpanda headless instance running in WSL2.
- 5. The AI agent connects to Lightpanda via the Python SDK, attaches to the authenticated page, and evaluates JavaScript to perform its task.
- 6. Agent completes its work without ever seeing the user’s credentials.
- 7. User can revoke the session by logging out of the main browser, instantly invalidating the headless session.
Evidence
Zero credentials typed, zero secrets exposed to LLMs.
The relay never logs a cookie value.
Backed by 9 automated security test suites, validating private IP rejections, CDP payload structures, and token enforcement.
- Record date: 2026-09-14T19:15:24.192Z