View Source Code
Check out the full source code for this example on GitHub.
Overview
The Personal Finance Manager consists of two main agents:- Finance Analyzer Agent: Parses PDF statements, extracts transactions, categorizes them using Claude, and stores them in a database.
- 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.
Running Locally
-
Set up your environment variables:
-
Run the application: