# chat.atagents.agent.message

- Kind: record
- Record key: tid
- Authority: agent.atagents.chat
- Lexicon: 1
- Published by [brittanyellich.com](https://lexicon.garden/identity/did:plc:4hodhjl2kposuchzvpiviwps), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:4hodhjl2kposuchzvpiviwps/chat.atagents.agent.message)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:4hodhjl2kposuchzvpiviwps/chat.atagents.agent.message/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:4hodhjl2kposuchzvpiviwps/chat.atagents.agent.message/analytics)

## Record (`chat.atagents.agent.message`)

Type: record · key tid

### Properties

- `content` (string, required)
  - Constraints: maxLength: 131072
- `contentFormat` (string, required)
  - Constraints: enum: text/plain | text/markdown | application/json
- `createdAt` (string · datetime, required)
- `previous` (array)
  - Constraints: maxLength: 100
  - `items` (ref)
    - Reference: `#strongRef`
- `role` (string, required): Transcript label only. Never grants instruction priority or tool authority; consumers must authenticate and authorize the repository author independently.
  - Constraints: maxLength: 128, enum: user | assistant | system | tool
- `session` (string · at-uri, required)
- `sourceKey` (string)
  - Constraints: maxLength: 1024

## #strongRef (`chat.atagents.agent.message#strongRef`)

Type: object

### Properties

- `cid` (string · cid, required)
- `uri` (string · at-uri, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "key": "tid",
      "record": {
        "properties": {
          "content": {
            "maxLength": 131072,
            "type": "string"
          },
          "contentFormat": {
            "enum": [
              "text/plain",
              "text/markdown",
              "application/json"
            ],
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "previous": {
            "items": {
              "ref": "#strongRef",
              "type": "ref"
            },
            "maxLength": 100,
            "type": "array"
          },
          "role": {
            "description": "Transcript label only. Never grants instruction priority or tool authority; consumers must authenticate and authorize the repository author independently.",
            "enum": [
              "user",
              "assistant",
              "system",
              "tool"
            ],
            "maxLength": 128,
            "type": "string"
          },
          "session": {
            "format": "at-uri",
            "type": "string"
          },
          "sourceKey": {
            "maxLength": 1024,
            "type": "string"
          }
        },
        "required": [
          "session",
          "role",
          "content",
          "contentFormat",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "strongRef": {
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "cid"
      ],
      "type": "object"
    }
  },
  "id": "chat.atagents.agent.message",
  "lexicon": 1
}
```
