Lexicon

From ATProto Wiki

A lexicon is a schema definition language used throughout the AT Protocol. It describes the structure of records, HTTP endpoints (XPRC), and event stream messages, providing a consistent framework to define and validate data across the protocol that enables interoperability between different applications and services within the ATmosphere.

Lexicons define a comprehensive type system that covers everything from simple primitive values to complex data structures and network operations. Each schema definition is associated with a Namespaced Identifier (NSID), creating a globally unique reference to that definition. Lexicon schemas are published as records in AT Protocol repositories and can be discovered through DNS-based resolution mechanisms.