Creation: You initiate a session using the /sessions/create API endpoint (or the equivalent method in the SDKs).
Running: During the session’s active state, you can interact with it through a WebSocket connection. This is typically done using browser automation frameworks like Playwright and Puppeteer.
Termination: You can terminate a session in a few ways:
Explicitly: Using the fleet.terminate() endpoint.
Implicitly: By closing the playwright connection.
Timeout: Sessions might have a predefined timeout, after which they automatically terminate.
A session can be associated with a Task (from the LAM API). This association allows you to observe and even control the browser as it carries out the task defined in the LAM API request.
The Livestream URL allows you to observe and interact with a running session. This is useful for debugging, monitoring, and providing real-time feedback to users.