If you are building AI agents or compliance tools for the Brazilian market, you need to stop treating all legal data as a single monolith. The recent deep dive into Brazil’s digital legal infrastructure clarifies a critical distinction: Planalto.gov.br and LexML are foundational for presidential acts and metadata, but they are not the source of truth for regulatory agencies like ANVISA or the Central Bank (BCB). For builders, this means your data ingestion pipeline needs to be segmented by authority, not just by topic.
Planalto and LexML Are Not Interchangeable
Planalto is the sole official repository for presidential acts, including provisional measures and decrees, legally validated under Law No. 14,197/2021 and Decree No. 11,273/2022. In contrast, LexML is not a publisher but a technical framework—a national interoperable metadata standard mandated by Law No. 10,875/2004. Since 2021, over 98% of federal normative acts on Planalto carry LexML-compliant metadata, enabling machine-readable provenance. The LexML portal aggregates documents from various government levels, but it relies on publishers to conform to its schema, which is based on ABNT NBR ISO/IEC 11179.
Regulatory Agencies Operate Outside This Stack
A common mistake in developer documentation is assuming LexML covers all federal norms. It does not. ANVISA’s resolutions and ordinances derive authority from Law No. 9,782/1999 and are published exclusively on anvisa.gov.br. Similarly, BCB’s norms stem from Law No. 4,595/1964 and reside on bcb.gov.br. While these agencies may voluntarily adopt LexML metadata for better discoverability, they are not required to publish on Planalto or through the LexML portal. If your RAG system only scrapes Planalto, you are missing the entire regulatory landscape for health and finance.
API Integration and AI Grounding
For practical implementation, Planalto’s API (api.planoalto.gov.br) has been delivering JSON-LD with embedded LexML metadata since 2022. This structured data is crucial for AI governance. The draft AI bill, PL 2338/2023, explicitly references 'official digital repositories' like Planalto as ground-truth sources. Furthermore, IBM Granite documentation cites LexML URIs as canonical anchors for legal grounding, allowing models to trace citations back to persistent, resolvable identifiers. This interoperability supports dynamic compliance layers, but only if the underlying data pipeline respects the jurisdictional boundaries of each agency.
Key Takeaways
- Planalto hosts only presidential acts; it does not host court decisions or agency regulations.
- LexML is a metadata standard, not a centralized database, though its portal indexes conformant documents.
- ANVISA and BCB regulations must be scraped from their respective domains, not Planalto.
- IBM Granite and RAGJur rely on LexML URIs for verifiable legal grounding in AI models.
- The Planalto API provides JSON-LD with LexML metadata, facilitating automated compliance checks.
The Bottom Line
Stop conflating federal legal infrastructure. Treat Planalto/LexML and agency-specific domains as distinct data sources in your architecture, or your AI agents will hallucinate compliance boundaries.