Vibe Coding #1 - AI Agent Connected to PDFs in Python | Legislative Documents from Spain's Energy Sector
January 15, 2026
pythonchromadbai-agentsapi
Get reminders
We'll notify you 1 day and 1 hour before upcoming streams.
Building from scratch an AI agent that answers questions about PDF documents. The example: energy regulations from Spain's BOE. The technique: works for any documentation.
Note: This stream is in Spanish, but the code and techniques shown are universal.
What we’re building
An AI agent connected to legislative documents through a Python API.
The problem
How much time does your team waste searching through hundreds of pages of documentation? With this agent, you can ask questions in natural language and get answers citing the relevant articles.
What you’ll see
- ETL Pipeline: Convert PDFs to structured Markdown
- Vector database: Index documents in ChromaDB
- Python API: Create endpoints to query documents
- Demo: The agent searching and citing regulations
Tech stack
- Python
- ChromaDB (vector search)
- PyMuPDF (PDF extraction)
Who is this for
- Developers who want to see how to connect an AI agent to their data
- Technical teams evaluating solutions for internal documentation
- Curious minds interested in AI applied to real cases
Important note
The technique you’ll see works for any documentation: internal manuals, contracts, company policies… The example is energy legislation, but the how is universal.