For AI agents: llms.txt is a short guide that sends you to the rules your problem needs, and rules.json holds every rule of this playbook as JSON.
Recommended
Decide which Digital Services Act tier you are in
Record whether your service is an intermediary, a hosting service, an online platform or a marketplace under the Digital Services Act. Record whether the small enterprise exclusions apply.
Applies when
The project it has users in the EU.
How to do it
The Digital Services Act, Regulation (EU) 2022/2065, has applied to all providers since 17 February 2024. A hosting service stores information that users provide, such as an app with uploads, comments or shared files. An online platform is a hosting service that also shows that information to the public. A marketplace is a platform where consumers sign distance contracts with traders. Every provider names one point of contact for authorities and one for users, and publishes both. A provider without an EU establishment names a legal representative in writing. Article 14 makes your terms describe how you moderate content, including automated tools, human review and complaint handling. Micro and small enterprises are exempt from the platform duties in Articles 20 to 28, except giving user numbers on request. They are also exempt from the marketplace duties in Articles 30 to 32. Compute the size with the facts rule. Record the tier in Keep a register of every duty that applies.
Examples
Using these examples: they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.
YAML example
dsa:
tier: platform
size: small
contact_authorities: dsa-authorities@example.com
contact_users: https://example.com/contact
legal_representative: none, established in the EU
terms_moderation_section: https://example.com/terms#moderation
JavaScript example
const TIERS = ['intermediary', 'hosting', 'platform', 'marketplace'];
const isExemptSize = size => size === 'micro' || size === 'small';
export function dsaDuties({ tier, size }) {
const level = TIERS.indexOf(tier);
if (level < 0) throw new Error(`unknown DSA tier ${tier}`);
const duties = ['contact-points', 'terms', ...(isExemptSize(size) ? [] : ['moderation-report'])];
if (level >= 1) duties.push('notice-and-action');
if (level >= 2 && !isExemptSize(size)) duties.push('platform-complaints');
if (level >= 3 && !isExemptSize(size)) duties.push('trader-traceability');
return duties;
}
Python example
TIERS = ["intermediary", "hosting", "platform", "marketplace"]
def is_exempt_size(size: str) -> bool:
return size in {"micro", "small"}
def dsa_duties(tier: str, size: str) -> list[str]:
level = TIERS.index(tier)
duties = ["contact-points", "terms"] + ([] if is_exempt_size(size) else ["moderation-report"])
if level >= 1:
duties.append("notice-and-action")
if level >= 2 and not is_exempt_size(size):
duties.append("platform-complaints")
if level >= 3 and not is_exempt_size(size):
duties.append("trader-traceability")
return duties
How to check
The obligations register has a dsa entry with a size computed from the facts file. Its tier is intermediary, hosting, platform or marketplace. A test fetches the published contact page and the terms, and both answer 200. The contact page names both points of contact, and the terms hold a content moderation section.
Sources
- Digital Services Act, Regulation (EU) 2022/2065
- Commission questions and answers on the Digital Services Act
Related rules
- Derive scope from recorded facts in Compliance
- Keep a register of every duty that applies in Compliance
- Check traders before they sell on your marketplace in Compliance
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/compliance/online-platforms/dsa-tier">Agent Wranglers compliance playbook</a>. In code you write, add a comment next to it with the same link.