Data Storage
Overview
Section titled “Overview”Wilson stores all financial data locally in a SQLite database at ~/.agentwilson/data.db. No data leaves your machine unless you explicitly use a cloud LLM provider for AI queries.
Database Location
Section titled “Database Location”~/.agentwilson/data.dbBack up your data by copying this file. Restore by replacing it.
Schema
Section titled “Schema”Transactions Table
Section titled “Transactions Table”The primary table storing all imported transactions:
| Column | Type | Description |
|---|---|---|
id | INTEGER | Auto-incrementing primary key |
date | TEXT | Transaction date (YYYY-MM-DD) |
merchant_name | TEXT | Merchant or payee name |
amount | REAL | Transaction amount (negative = expense, positive = income) |
category | TEXT | Primary spending category |
category_detailed | TEXT | Detailed PFC category code |
description | TEXT | Original transaction description |
external_id | TEXT | Deduplication key (unique index) |
payment_channel | TEXT | Payment method (online, in store, etc.) |
pending | INTEGER | Whether transaction is pending (0/1) |
authorized_date | TEXT | Authorization date if different from posted date |
source | TEXT | Import source (chase, amex, monarch, etc.) |
created_at | TEXT | When the record was imported |
Imports Table
Section titled “Imports Table”Tracks imported files for deduplication:
| Column | Type | Description |
|---|---|---|
id | INTEGER | Primary key |
file_hash | TEXT | SHA-256 hash of the imported file |
file_name | TEXT | Original filename |
record_count | INTEGER | Number of transactions imported |
imported_at | TEXT | Import timestamp |
Amount Convention
Section titled “Amount Convention”Throughout Wilson, amounts follow this convention:
- Negative = expense (money out)
- Positive = income/credit (money in)
This applies to the database, all tool results, and displayed summaries.
Category Taxonomy
Section titled “Category Taxonomy”Wilson uses the Plaid Financial Category (PFC) v2 taxonomy:
- 18 primary categories — Groceries, Dining, Transportation, Entertainment, etc.
- 120+ detailed categories — More specific subcategories for granular tracking
Categories are assigned by the AI during categorization and can be overridden manually.
Migrations
Section titled “Migrations”Schema migrations are idempotent ALTER TABLE statements that run automatically on startup. Your data is preserved across Wilson updates.