Files
simbarag/docs/TASKS.md
ryan 8f02318542 Mirror YNAB budget into Postgres with delta sync and change log
YNAB has no event feed, so keep a local copy in ynab_* tables synced via
server_knowledge delta requests: full download on first run, deltas every
YNAB_SYNC_INTERVAL seconds and on demand before each tool call, full
resync daily. Each sync diffs against the mirror and appends real edits
(transactions, assignments, renames) to ynab_changes, the edit history
YNAB doesn't keep.

Agent YNAB tools now answer from the mirror: budget summary (spending
computed from transactions, since YNAB's month activity nets in credit
card payment categories), account balances, transaction search with
splits expanded, spending reports by category/payee/account/month,
category budget, and recent changes. Adds an admin-only read-only
ynab_sql tool guarded by a sqlglot allowlist (scope-resolved tables, no
dangerous functions), a READ ONLY transaction, a timeout, and a row cap.

Replaces utils/ynab_service.py and drops the unused ynab SDK.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:32:38 -04:00

1.9 KiB

Tasks & Feature Requests

Feature Requests

YNAB Integration (Admin-Only)

  • Description: Integration with YNAB (You Need A Budget) API to enable financial data queries and insights
  • Requirements:
    • Admin-guarded endpoint (requires lldap_admin group)
    • YNAB API token configuration in environment variables
    • Sync budget data, transactions, and categories
    • Store YNAB data for RAG queries
  • Endpoints:
    • POST /api/admin/ynab/sync - Trigger YNAB data sync
    • GET /api/admin/ynab/status - Check sync status and last update
    • GET /api/admin/ynab/budgets - List available budgets
  • Implementation Notes:
    • Use YNAB API v1 (https://api.youneedabudget.com/v1)
    • Consider rate limiting (200 requests per hour)
    • Store transaction data in PostgreSQL with appropriate indexing
    • Index transaction descriptions and categories in ChromaDB for RAG queries

Money Insights

  • Description: AI-powered financial insights and analysis based on YNAB data
  • Features:
    • Spending pattern analysis
    • Budget vs. actual comparisons
    • Category-based spending trends
    • Anomaly detection (unusual transactions)
    • Natural language queries like "How much did I spend on groceries last month?"
    • Month-over-month and year-over-year comparisons
  • Implementation Notes:
    • Leverage existing LangChain agent architecture
    • Add custom tools for financial calculations
    • Use LLM to generate insights and summaries
    • Create visualizations or data exports for frontend display

Backlog

  • YNAB API client module
  • YNAB data models (Budget, Transaction, Category, Account)
  • Database schema for financial data
  • YNAB sync background job/scheduler
  • Financial insights LangChain tools
  • Admin UI for YNAB configuration
  • Frontend components for money insights display

Technical Debt

To be added

Bugs

To be added