Datons Apps #1 - Legal AI Agent for Spanish Official Gazette (BOE) | Skip 200 Pages
Live demo of an AI agent that analyzes Spanish Official Gazette (BOE) documents. Query decrees, regulations, and resolutions in natural language, without reading hundreds of pages.
Get weekly updates
Live coding sessions, Python libraries for energy data, and hands-on tutorials. One email per week, zero fluff.
Result
An AI agent connected to Spain’s Official Gazette (BOE) that navigates, searches, and compares Spanish legislation in natural language — including version comparison across different legislative periods.
The problem
- Spain’s BOE publishes thousands of pages per year across decrees, resolutions, and regulations
- Finding a specific article requires manually navigating lengthy PDFs
- Laws change frequently and tracking what changed between versions is tedious
- No simple way to query the content in natural language
The solution
Structured BOE repository

We start from a web repository on datons.com where BOE laws are structured by units: articles, rules, provisions. It’s not a flat PDF — each unit is navigable, searchable, and linked to the original BOE source.

Search for “almacenamiento” (storage) and it shows exactly which articles mention it, with a direct link to verify on the official BOE.
Version comparison

The most interesting feature: change history. Select two versions of a law and see exactly which words were modified, which articles were added, and which terms were replaced — for example, “comercializadores” changed to “suministradores” in the electricity sector law.

AI agent with MCP

We connected this tool to Claude Desktop using the MCP protocol. Ask “how has energy legislation on self-consumption changed?” and the agent automatically searches across all laws, refining its queries based on context.

The system ranks results by similarity and context — articles, rules, and provisions appear ordered by relevance, not by document order.
Connector setup

Anyone can connect the tool from claude.ai: profile → settings → connectors → add the datons.com URL. Authenticate with a free account and you’re ready to query.
Live queries

We tested with “how has legislation on BESS storage changed?” — the agent searches for storage, energy, batteries, hybridization, and curtailment, navigating between sections and indexes to avoid overloading the context with too much text.
Features
| Feature | Description |
|---|---|
| Web repository | BOE laws structured by units (articles, rules, provisions) |
| Full-text search | Search terms across all laws with direct BOE links |
| Version comparison | Side-by-side diff across legislative periods |
| AI agent (MCP) | Natural language queries from Claude Desktop or claude.ai |
| Semantic ranking | Results ordered by relevance, not by document order |
| Traceability | Every result links directly to the article on the official BOE |
Resources
- BOE - Boletín Oficial del Estado
- Datons LegalDocs MCP — Connector for claude.ai
- Claude Desktop — AI client with MCP support