How ATProto Feed Generators work
mainA Feed Generator is a service that provides custom algorithms to users via the AT Protocol.
The Workflow:
- Request: A user's Personal Data Server (PDS) requests a feed using the
at-uriof a declared feed record. - Resolution: The PDS resolves the
at-urito find the Feed Generator's DID document. - Requesting Skeleton: The PDS calls the
app.bsky.feed.getFeedSkeletonendpoint on the Feed Generator. This request is authenticated via a JWT signed by the user's repo signing key. - Response: The Feed Generator returns a 'skeleton' (a list of post URIs and optional metadata).
- Hydration: The PDS takes these URIs and 'hydrates' them (fetching full user info, post content, etc.) before sending the final feed to the client.
Key Abstractions:
- Service DID: Identifies the Feed Generator service itself.
- Algorithm Declaration: Each algorithm hosted by the service is declared as a record in the creator's repository. The algorithm is identified by the
at-uriof this declaration record.