# Sessions and replays

A **session** is one execution of an [agent](/concepts/agents). A **replay** re-runs a session with the same inputs and state for debugging.

## List sessions

```ts
const { data: sessions } = await client.session.list()
```

## Create a replay

```ts
const { data: replay } = await client.replay.create({
  body: {
    sessionId: session.id,
    publisherId,
    slug: "repro-support-bug",
  },
})
```

## Related

- **[Routines](/concepts/routines)** — what starts a session.
- **API reference:** [Sessions](/api-reference#tag/session), [Replays](/api-reference#tag/replay)