Inspiration
AI needs power. Power needs AI.
We're living through the decade of AI's emergence. The largest AI models ever created demand energy. Every datacenter, every GPU must connect to the most complex machine humanity has ever built: the electrical grid.
The electrical grid is a living machine, constantly evolving. Every time a datacenter connects or a power plant changes, the protection system must be recalibrated. Power flows redistribute in new patterns, creating cascading effects across the network.
AI improves itself. Each day it becomes more capable, more autonomous. But there's one thing it can't do alone: plug itself in.
What it does
D.N. is an agent that understands the Chilean* electrical system. It has access to blueprints, simulation tools, image generation, blueprint interpretation, and over 50 specialized tools.
Why Chile? I'm Chilean, I know the system deeply, and Chile publishes all its electrical infrastructure data openly, the ideal proving ground for an AI electrical agent.
With these capabilities, D.N. can perform tasks that would take electrical engineers weeks to complete, such as power flow studies, short-circuit analysis, and protection coordination.
Examples
Blueprint reading
A single-line diagram of a 110kV electrical system modeled in PowerFactory DIgSILENT.
Fault detection and annotation
The agent detects a de-energized line (L3) and annotates the fault directly on the blueprint.
Power flow study with ReAct
Full powerflow study workflow: from data gathering to simulation execution and report generation.
How I built it
Tech Stack:
- Gemini 3.0 Flash as the base model for reasoning and orchestration
- Gemini 3.0 Pro for planning and blueprint analysis
- PowerFactory API for electrical simulations (power flows, short-circuits)
- Python for simulation backend
- Node.js for agent backend
- Next.js for frontend
- Google Cloud infrastructure:
- Firestore for database
- Compute Engine for backend machines
- Cloud Run for backend and frontend deployment
Architecture
Plan-and-Execute with DAG parallelization
For complex tasks, a Plan-and-Execute architecture is used. The planner generates a DAG (Directed Acyclic Graph) to enable parallel task execution. A replanner adapts the plan as results come in.
Plan-and-Execute loop: the planner creates tasks, the agent executes them, and a replanner adapts.
Using this architecture, the agent went from completing a study in 60 minutes to just 20 minutes with parallelization.
A DAG generated by the planner to run 5 short-circuit simulations in parallel across different VMs.
5 simulation machines in the cloud
It can run simulations for hours because it has access to 5 machines running PowerFactory DIgSILENT, professional electrical simulation software.
5 PowerFactory instances running in parallel on Google Cloud Compute Engine.
Challenges I ran into
1. Integration with industrial software
PowerFactory wasn't designed to be controlled by AI. I spent days doing intensive QA to build reliable tools.
2. Electrical data acquisition
Chile has its electrical data publicly available, but I had to build scraping agents to extract information from sites like Acceso Abierto, Infotécnica, and PGP.
D.N. autonomously scraping electrical data from Infotécnica, Chile's official grid database.
3. Blueprint interpretation
While I believe Gemini 3.0 Pro's image reading capabilities are incredible, it still struggles somewhat with electrical blueprints. To improve accuracy, I implemented a second validation pass where the agent cross-references the visual interpretation with the simulation model data.
What I learned:
Building an AI agent for a domain as specialized as electrical engineering taught me that the hardest part isn't the AI — it's the integration with real-world tools and data. The electrical grid doesn't have clean APIs. Every data source has a different format. Every simulation tool has its own quirks.
What's next for D.N.
- Sell the first AI-powered electrical study — launching an AI-native consulting firm with D.N. as the core electrical agent. Already have meetings scheduled with interested clients.
- Expand beyond Chile's National Electric System to other grids
- Support for more simulation scenarios
The electrical grid is humanity's most complex machine. It's time it had AI-native tools to match.
If you want to know more about how this project was built, you can read the full series on my blog: Building D.N. - The Complete Series
Built With
- claudecode
- cloud-storage
- compute-engine
- computeengine
- firestore
- google-cloud
- nextjs
- node.js
- python
- tailwind
- typescript



Log in or sign up for Devpost to join the conversation.