# run.tiles.chat.sessionSnapshot

> Published by [tiles.run](https://lexicon.garden/identity/did:plc:mqmcsjuerbjhu65mpmvkcuw2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mqmcsjuerbjhu65mpmvkcuw2/run.tiles.chat.sessionSnapshot)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mqmcsjuerbjhu65mpmvkcuw2/run.tiles.chat.sessionSnapshot/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mqmcsjuerbjhu65mpmvkcuw2/run.tiles.chat.sessionSnapshot/examples)

## Definitions

### `run.tiles.chat.sessionSnapshot`

**Type**: `record`

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes |  |
| `turns` | `array` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `sessionId` | `string` | Yes |  |

### `run.tiles.chat.sessionSnapshot#message`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `role` | `string` | Yes |  |
| `content` | `array` | Yes |  |
| `toolName` | `string` | No |  |
| `timestamp` | `integer` | No |  |
| `stopReason` | `string` | No |  |

### `run.tiles.chat.sessionSnapshot#contentItem`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | No |  |
| `text` | `string` | No |  |
| `type` | `string` | Yes |  |
| `thinking` | `string` | No |  |
| `arguments` | `string` | No |  |

## Raw Schema

```json
{
  "id": "run.tiles.chat.sessionSnapshot",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "name",
          "sessionId",
          "createdAt",
          "turns"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "turns": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "provider",
                "model",
                "messages"
              ],
              "properties": {
                "api": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "messages": {
                  "type": "array",
                  "items": {
                    "ref": "#message",
                    "type": "ref"
                  }
                },
                "provider": {
                  "type": "string"
                }
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "sessionId": {
            "type": "string"
          }
        }
      }
    },
    "message": {
      "type": "object",
      "required": [
        "role",
        "content"
      ],
      "properties": {
        "role": {
          "type": "string"
        },
        "content": {
          "type": "array",
          "items": {
            "ref": "#contentItem",
            "type": "ref"
          }
        },
        "toolName": {
          "type": "string"
        },
        "timestamp": {
          "type": "integer"
        },
        "stopReason": {
          "type": "string"
        }
      }
    },
    "contentItem": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "thinking": {
          "type": "string"
        },
        "arguments": {
          "type": "string"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
