# `Jido.Browser.Session`
[🔗](https://github.com/agentjido/jido_browser/blob/v2.1.0/lib/jido_browser/session.ex#L1)

Represents an active browser session.

A session holds the connection state to a browser instance and tracks
the adapter being used for communication.

# `t`

```elixir
@type t() :: %Jido.Browser.Session{
  adapter: module(),
  capabilities: map(),
  connection: term(),
  id: String.t(),
  opts: map(),
  runtime: map() | nil,
  started_at: DateTime.t()
}
```

# `new`

```elixir
@spec new(map()) :: {:ok, t()} | {:error, term()}
```

Creates a new session struct.

## Examples

    session = Jido.Browser.Session.new!(
      id: "sess_abc123",
      adapter: Jido.Browser.Adapters.Vibium,
      connection: pid
    )

# `new!`

```elixir
@spec new!(map()) :: t()
```

Like `new/1` but raises on validation errors.

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the Zoi schema for this struct.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
