Session lifecycle
A captured session moves through these states (sessionStatus):
Getting a session in
- Pairing code (recommended)
- Username/password
- CI / automated
Your agent creates an environment and mints a single-use pairing code (On your machine, this opens a real Chromium browser, you log in, and once you press Enter, Director captures and uploads your session (cookies and local browser storage). No API key ever touches your machine — the code itself is the credential, single-use and time-limited.MCP tool responses that include a pairing code automatically carry a ready-to-paste
create_login_code), valid for 30 minutes. Send that code to whoever can log into your product, and have them run:loginCommand field with this exact command pre-filled.Keeping sessions fresh
resethook — an optional URL Director calls to reset your app to a known state (before,after, orbothrelative to the recording). Configurable method and timeout. By default, an unreachable reset hook fails environment creation — passskipResetVerification: trueto opt out.settle— how Director knows the page has finished loading after navigation or login: a selector to wait for, a URL substring, and/or a flat delay.sessionLineageMaxAgeMs— how long a captured session is trusted before it’s treated as expired (default 30 days, 1–365 day range).- Sessions can be wiped without deleting the environment itself via
delete_session— useful when you know credentials rotated and want to force a fresh capture.
Reset secrets
Creating an environment returns a one-timeresetSecret — use it to authenticate calls from your app’s reset endpoint back to Director, if your reset flow needs to prove the request is legitimate.