> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metar.ws/llms.txt
> Use this file to discover all available pages before exploring further.

# Connection Lifecycle

> Every frame in both directions is a single JSON object. Here is what the server sends the moment your connection is accepted.

Every frame exchanged over the stream, in either direction, is a single JSON object. This page covers what happens right after the WebSocket upgrade completes.

## The ack frame

On a successful upgrade, the server speaks first and sends an `ack` frame describing the account you connected as:

```json theme={null}
{
    "type": "ack",
    "plan": "starter",
    "owner": "3f2c...",
    "limits": { "max_channels": 10, "max_connections": 2 }
}
```

<Warning>
  Consume the `ack` frame before sending any commands. It tells you the effective plan and limits for this connection, which you should read at runtime rather than assume.
</Warning>

Once you've read the `ack`, you're ready to send `subscribe` commands. See [Commands](/protocol/commands) for the request and response shapes.

<Card title="Next: Commands" icon="terminal" href="/protocol/commands">
  Learn how to subscribe and unsubscribe from channels.
</Card>
