← All field notes

Automating Financial Management with a CFO Agent

Invoicing, expense tracking, revenue reports, and tax prep are handled by an autonomous AI agent that runs on a schedule and reports back to me every morning.

When you run a company alone, finances are easy to postpone. I'm usually writing code, so a subscription renewing next week can slip my mind, as can a higher monthly burn rate after I add a new service.

I work without an accountant or QuickBooks. Instead, I built a system that tracks everything, runs automatically, and tells me when something needs attention.

The Source of Truth: A Spreadsheet

The whole thing starts with an Excel file. It has two tabs: one for expenses and one for subscriptions. I edit it by hand whenever I add an expense or change a subscription.

That is enough for this volume. There is no app, Notion database, or fintech SaaS behind it. With a handful of expenses per month, I need a spreadsheet that opens instantly, works offline, and costs nothing. An ERP would be unnecessary.

The Sync Pipeline

A Python script called sync_finanze.py reads the Excel file and generates 5 JSON files. Those files bridge the data I edit by hand and the data the rest of the system can read.

expenses.json stores every recorded expense. Its fields are date, description, category, vendor, amount, VAT, total, project, and a recurring flag. Each expense is tagged to a project, which lets me track costs per client.

subscriptions.json lists active subscriptions with renewal dates and notes. The notes field matters because I can write things such as "temporary, cancel after project delivery" there. The system can then flag them accordingly.

projects.json contains financials for each project: how much each project has cost so far, how much revenue has come in, and how much is still pending. It gives me a quick view of which projects are profitable.

dashboard.json holds aggregated KPIs: total expenses, monthly recurring costs, revenue received, and revenue pending. It also includes renewal alerts for any subscription renewing in the next 30 days.

trends.json calculates burn rate and projections: daily and monthly burn rates, plus a projection covering three months of expenses versus expected revenue.

Once the script runs, the JSON files update and everything downstream picks them up automatically.

The Virtual CFO

The virtual CFO is a Claude Code agent. Its configuration lives in a .md file with a role definition, permissions, and instructions, following the same pattern I use for all my agents.

It reads all 5 JSON files and handles the checks I would expect from a finance person:

  • Burn rate analysis tracks how quickly money is going out and whether that pace is accelerating or staying stable
  • Runway calculation estimates how long current funds last at current spend rates
  • P&L by project shows which projects are profitable and which cost more than they bring in
  • Anomaly detection looks for unexpected expense growth, subscriptions renewing soon, late payments, and savings opportunities
  • Trend analysis covers changes from one month to the next and seasonal patterns

The output is a structured markdown report. It also creates tasks in the shared task system when something needs action, such as an upcoming renewal or a late payment from a client.

The key constraint is that the CFO agent can only read. It can inspect files and run commands, but it cannot modify anything. It analyzes and produces output, and it never touches the data or the code. That boundary is intentional. Agents that both analyze and modify fall outside what I trust for this work.

The Dashboard

SubraLabs has a local ops dashboard, a Node.js server running on localhost:4000. The finance section is one of its 7 pages.

The Finances page shows:

  • KPI cards at the top show total expenses, monthly recurring costs, and annual projection
  • Expense table with columns for Date, Description, Vendor, Category, Project, and Amount. Rows are grouped by month with subtotals
  • Subscription cards with renewal dates and notes

The main Dashboard page has a bar chart showing expenses versus revenue by month, plus an upcoming renewals section.

Everything runs locally, so the server costs nothing. The dashboard also has AI features, including a "Summarize with AI" button on reports. It uses the Claude API to generate quick summaries of lengthy financial analyses.

Scheduled Reports and the Task System

The CFO agent runs automatically every week via Cowork, Anthropic's desktop app for scheduling autonomous tasks. It produces a markdown report that lands in the ops dashboard. I can view it from the Reports page and filter by the "Finanze" category.

Every report uses the same structure: executive summary, detailed analysis, alerts, and recommendations. Reports appear chronologically, with filters by category and search.

The task system connects analysis to action. When the CFO finds something that needs my attention, it creates a task in tasks.json. That can be a renewal coming up, a payment that should have arrived, or an expense that seems off. The task then appears on the Dashboard page.

Only I can close tasks from the dashboard. Agents can create them, but they cannot resolve them. That's deliberate. Agents flag issues; the human decides what to do. An AI never gets to mark a financial task as "done" because it thinks the situation resolved itself.

What This Costs: Nothing Extra

The finance system adds zero cost to my infrastructure. The sync script is plain Python, the dashboard is a local Node.js server, and the AI runs on my existing Claude Max subscription.

Is this overkill for a small number of expenses per month? Probably. But the pipeline does not care whether there are 3 expenses or 300. As SubraLabs grows, with more clients, subscriptions, and projects, the same system handles it. I just keep updating the spreadsheet.

The practical payoff is simple: I get a renewal warning the week before it happens. No subscription charge surprises me because the CFO has already told me about it.