← Articles

Financials using agents

Creating financials is actually possible in excel end-to-end using agents


As an experiment, I wanted to try building financials using the pi agent, with the agent writing the Python scripts, primarily using Openpyxl for excel workbook manipulation.

The agent can only do four things:

Fun fact: an Excel file is just a bunch of zip files put together. I was deep into openpyxl while doing this. I love the project, and I hope to contribute to it one day.

The setup

I used my TB extractor to pull the trial balance out of Tally. Then I put the previous year's final financials file in the path (with all the confidential data obfuscated, of course).

This is when the fun (and the frustration) began.

I started by asking the model for a plan for how it would build the financials. I think the model I was using back then was DeepSeek V4 Flash. After about 30 minutes of back and forth, the plan was fixed.

Then I made something nobody else is doing right now. I took out a physical notebook, and I actually started writing the incremental steps that I would be comfortable with. I remember the first step being the classification of ledgers on the basis of the previous year's classification, and the classification of new ledgers, and so on and so forth.

One by one, I started ticking things off.

The really helpful side of agents was that it was super fast. Fast enough, with good intelligence, that I could clearly see the moments of magic when things went right. That doesn't mean things didn't go wrong. I was super diligent doing this exercise.

One example

While doing a SUMIFS formula, I wanted the criteria upon which you give the SUMIFS in the schedule to be present as text in a column right next to the notes (and not inside the formula of the SUMIFS itself).

This problem was hard for the agent to grasp. So I had to slow down a bit. I explained it in text and showed the same in Excel. Then it got an understanding. Then the same was implemented for all the other schedule items.

What actually changed

Overall, it is very clear that the speed at which the agents work is something humans cannot match. This means that the cognitive load we have to stuff ourselves (with minute details) gets reduced.

At the same time, the attention we need for structure, and for directing the agent to the way and the process in which the output gets delivered, definitely doubled.

The change in how we do work is crystal clear in my eyes.

Next: TB Extractor → | All articles