A privacy-first MCP-based RAG AI agent for personal finance. Abi connects to your Actual Budget data and uses OpenAI-compatible LLMs to answer questions, generate visualizations, forecast spending, and manage your budgetβall while keeping your financial data local and secure.
Key Highlights:
- π Privacy-First: Merchant names are hashed before AI processing; your raw data never leaves your machine
- π οΈ MCP Tool Calling: 13 specialized tools for querying, analyzing, and modifying your financial data
- π Local RAG: Retrieval-augmented generation over your encrypted SQLite database
- π€ Multi-Model: Works with GPT-4o, GPT-4o-mini, o4-mini, or local LLMs (Ollama, LM Studio)
To run Abi, you need an AI Key and a Budget (from Actual Budget).
1. Actual Budget (Your Financial Data) Abi is an assistant for Actual Budget, a free and private local budgeting app.
- Get the App: Download Actual Budget and run it on your machine.
- Connect:
- Server URL: Use your local URL (typically
http://localhost:5006). - Sync ID: Go to Settings β Show Advanced Settings in Actual to find this.
- Password: Your login password (if set).
- Server URL: Use your local URL (typically
2. OpenAI API Key (The Brains) Abi uses OpenAI's intelligence to understand your questions.
- Sign up at platform.openai.com.
- Add $5 of credit (Abi is very cheap to run, but requires a funded account).
- Go to API Keys β Create new secret key.
- Copy this key (starts with
sk-...).
The AI agent uses MCP-style function calling with 13 tools organized by capability:
| Tool | Description |
|---|---|
get_account_balances |
Get current balances of all accounts and credit cards |
get_spending_category |
Breakdown of spending by category for a month |
search_transactions |
Search transactions by merchant, category, or date range |
get_monthly_budget |
Get budgeted amounts vs. actual spending |
get_all_categories |
List all available budget categories |
detect_recurring_payments |
Identify subscriptions and recurring charges |
| Tool | Description |
|---|---|
generate_chart |
Create donut or bar chart visualizations |
simulate_purchase |
Check if a purchase fits within your budget |
forecast_expenses |
Predict future spending based on historical patterns |
| Tool | Description |
|---|---|
update_category_budget |
Set or update a category's budget amount |
create_transaction |
Add a new transaction (expense or income) |
| Tool | Description |
|---|---|
create_execution_plan |
Break down complex requests into step-by-step plans |
web_search |
Search the web for financial context (rates, comparisons, advice) |
| Feature | Description |
|---|---|
| No Cloud Storage | All financial data stays on your machine in a local encrypted database |
| Merchant Masking | Real merchant names are hashed (e.g., "Starbucks" β "Merchant_A1B2C3") before being sent to the AI. Unmasked only in final display. |
| Encrypted Database | Uses SQLCipher encryption with your Actual Budget password |
| Local Charts | Visualizations are generated locally and embedded as Base64 images |
| Hybrid Web Search | Web searches are for general knowledge onlyβyour financial numbers are never included in queries |
| No Credential Logging | API keys and passwords are never logged or included in AI context |
| Build-Time Cleaning | The build script removes .env and db.sqlite automatically |
| User Data Isolation | In packaged app, user data is stored in %AppData%/Abi Financial Assistant/, separate from app files |
The application consists of four main components working together locally:
- Frontend (Electron/React): Provides the chat interface, settings management, and renders interactive charts.
- Backend (Python/FastAPI): The central intelligence that manages the AI context, executes MCP tools, and orchestrates the workflow.
- Privacy Guard (Python): A middleware layer that hashes sensitive data (like merchant names) before it reaches the AI and unmasks it for the user.
- Data Bridge (Node.js): A specialized service that handles synchronization and SQLCipher encryption to securely talk to your Actual Budget data.
- Python 3.13+ (Managed via
uv) - Node.js 18+
- Actual Budget: A running instance (local or hosted) and your Sync ID.
- uv: Fast Python package manager (
pip install uv).
Navigate to the backend folder to install dependencies:
cd backend
uv syncNavigate to the bridge folder:
cd bridge
npm installNavigate to the frontend folder:
cd frontend
npm installCreate a .env file in the root directory (c:\Coding\Financial Assistant\). You can also configure these settings later via the Settings UI in the app.
# AI Provider
OPENAI_API_KEY=your_key_here
OPENAI_MODEL=gpt-4o-mini
OPENAI_BASE_URL=
# Actual Budget Configuration
ACTUAL_SERVER_URL=http://localhost:5006
ACTUAL_PASSWORD=your_password
ACTUAL_SYNC_ID=your_sync_idThe project includes a launcher script that starts both the Python backend and the Electron frontend.
# From root directory
node launch.jsIf you prefer identifying issues in specific services:
- Backend:
cd backend && uv run server.py - Frontend:
cd frontend && npm start
To create a standalone Windows installer:
# From root directory
node build.jsThis will:
- Build the Python backend into a standalone
.exe - Install bridge dependencies
- Build the React frontend
- Package everything with Electron Builder
Output: The installer will be in frontend/dist-electron/.
POST /chat: Interact with the agent.GET /settings: Retrieve current configuration (masked, no secrets exposed).POST /settings: Update API keys or Model preferences.POST /sync: Trigger a manual sync from Actual Budget.
MIT License - See LICENSE file for details.