The Agency Accountability Act of 2023 requires federal agencies to clearly identify the specific laws that authorize their rules when proposing and finalizing them. When agencies publish new rules in the Federal Register, they must cite the exact statutory provision granting them regulatory authority and the specific law under which the rule is proposed, including relevant statutory language. Additionally, if an agency penalizes someone for violating a rule, it must inform that person of the specific legal provision the rule is based on. The bill also creates an affirmative defense in administrative and court proceedings, allowing defendants to argue that an ordinary person could not reasonably understand from the statutory language that their conduct would be illegal. This legislation aims to increase government transparency and ensure that citizens and businesses have clear notice of the legal basis for agency regulations.