Skip to main content

View Source Code

Check out the full source code for this example on GitHub.
This tutorial demonstrates how to build a Personal Finance Manager using Tensorlake and Claude. This application can parse PDF bank statements, categorize transactions using LLMs, store them in a PostgreSQL database, and answer natural language questions about your spending.

Overview

The Personal Finance Manager consists of two main agents:
  1. Finance Analyzer Agent: Parses PDF statements, extracts transactions, categorizes them using Claude, and stores them in a database.
  2. Finance Query Agent: Translates natural language questions (e.g., “How much did I spend on groceries?”) into SQL queries, executes them, and visualizes the results.

Prerequisites

  • Python 3.11+
  • Tensorlake Account and CLI installed.
  • Anthropic API Key
  • PostgreSQL Database (e.g., Neon, Supabase, or local)

Project Structure

Implementation (app.py)

Here is a simplified view of the core logic for the Finance Analyzer Agent.
And the Finance Query Agent:

Running Locally

  1. Set up your environment variables:
  2. Run the application:

Deploying to Tensorlake

Deploy your finance manager to the cloud securely.
Your personal finance assistant is now ready to help you track your spending!