Logo of LexmountLexmount Browser
BlogDocs
Logo of LexmountLexmount Browser
Logo of LexmountLexmount Browser

Elastic cloud browser infrastructure for AI agents

GitHubGitHubEmail

Product

  • Features
  • Quick Start
  • Templates
  • Pricing
  • FAQ

Resources

  • Blog
  • Documentation
  • Changelog
  • Roadmap

Company

  • About
  • Contact
  • Waitlist

Legal

  • Cookie Policy
  • Privacy Policy
  • Terms of Service

© 2026 Lexmount Browser All Rights Reserved.

Identity and state

Reuse browser state across Sessions

Store cookies and local storage in a persistent Context for reuse in later Sessions, reducing repeated logins across automation tasks.

View integration options
Example · reuse browser state in a new Session
Example · reuse browser state in a new Session

Integration options

Replace the variables, then copy this prompt to your agent
Mandatory prerequisite: First fetch and fully execute the official Lexmount Setup Prompt returned by https://browser.lexmount.cn/api/agent-setup/browser-cli, completing installation, authentication, and environment validation. Continue only after every check passes. If the URL is unreachable or validation fails, stop immediately and report it; never skip the setup or pretend it succeeded.
Task: Use browser-cli only to complete one public demo login at https://tdesign.tencent.com/starter/vue-next/login, then create a new Session with the same persistent Context and verify that the login state is reused.
Flow: Create a Context and Session 1, submit the public demo information already filled in on the page, confirm navigation to /starter/vue-next/dashboard/base and visibility of .dashboard-item, and close Session 1. Wait until the Context is available again, then create Session 2 and repeat the verification.
Execution: Session 2 must use the same Context. Confirm that the page does not return to the login page and that .dashboard-item remains visible. Never request real credentials. If human verification is required, hand control to the user only through Remote View.
State: Save the Context reference, dashboard URL, origin, and ownership metadata to .lexmount/persistent-login-state.json in the working directory. Do not save login values, cookies, or browser storage. If the file already exists, add a timestamp instead of overwriting it.
Acceptance: Success requires both Sessions to use the same Context, Session 2 to remain logged in, both Sessions to close successfully, and the Context to remain reusable.
Cleanup and return: Close only the Sessions created for this task and retain the Context. If closing fails, report “partial success.” Report only the status, URL, cross-Session verification result, state file, Context availability, cleanup result, and error summary. Do not expose API keys, Project IDs, Session IDs, connection URLs, or login credentials.