Skip to content

Plan ahead

Goal: know whether the money lasts, and when it would run out, before it does.

Tools: forecast_balance, then set_category_budget. Prompt: plan_next_month.

  1. Ask, with what you know.

    You: If I earn 3,200 a month, will my accounts go below zero before the end of the year?

  2. The agent projects. forecast_balance with {"until": "2026-12", "monthly_income": 3200} — two YNAB requests:

    forecast_balance (excerpt)
    {
    "message": "The balance stays above zero until 2026-12. This rests on the assumptions listed: check them with the user.",
    "accounts": [
    "Checking",
    "Savings"
    ],
    "start_balance": 4112.66,
    "assumptions": {
    "recurring": [
    {
    "payee": "MARKET FRESH",
    "amount": -182.58,
    "day": 14,
    "months_seen": 3
    },
    {
    "payee": "RAIL CO",
    "amount": -45.0,
    "day": 18,
    "months_seen": 3
    },
    {
    "payee": "STREAMFLIX",
    "amount": -13.49,
    "day": 15,
    "months_seen": 3
    },
    {
    "payee": "TENNIS CLUB - PRELEV",
    "amount": -22.0,
    "day": 20,
    "months_seen": 3
    }
    ],
    "variable_monthly": -68.7,
    "monthly_income": 3200.0,
    "one_offs": [],
    "scheduled": [
    {
    "scheduled_id": "sch-rent",
    "date": "2026-10-03",
    "amount": -950.0,
    "account": "Checking",
    "category": "Rent",
    "payee": "LANDLORD SARL",
    "memo": null,
    "frequency": "monthly",
    "transfer": false
    },
    {
    "scheduled_id": "sch-phone",
    "date": "2026-10-08",
    "amount": -19.99,
    "account": "Checking",
    "category": "Phone",
    "payee": "TELCO MOBILE - PRELEV",
    "memo": null,
    "frequency": "monthly",
    "transfer": false
    },
    {
    "scheduled_id": "sch-power",
    "date": "2026-10-12",
    "amount": -64.2,
    "account": "Checking",
    "category": "Electricity",
    "payee": "POWERCO ENERGIE",
    "memo": null,
    "frequency": "monthly",
    "transfer": false
    },
    {
    "scheduled_id": "sch-insurance",
    "date": "2026-10-20",
    "amount": -420.0,
    "account": "Checking",
    "category": null,
    "payee": "HOMESAFE INSURANCE",
    "memo": null,
    "frequency": "yearly",
    "transfer": false
    },
    {
    "scheduled_id": "sch-rent",
    "date": "2026-11-03",
    "amount": -950.0,
    "account": "Checking",
    "category": "Rent",
    "payee": "LANDLORD SARL",
    "memo": null,
    "frequency": "monthly",
    "transfer": false
    },
    {
    "scheduled_id": "sch-phone",
    "date": "2026-11-08",
    "amount": -19.99,
    "account": "Checking",
    "category": "Phone",
    "payee": "TELCO MOBILE - PRELEV",
    "memo": null,
    "frequency": "monthly",
    "transfer": false
    },
    "… 4 more"
    ]
    },
    "months": [
    {
    "month": "2026-09",
    "start": 4112.66,
    "inflows": 3200.0,
    "outflows": 0.0,
    "end": 7312.66,
    "lowest": 4112.66
    },
    {
    "month": "2026-10",
    "start": 7312.66,
    "inflows": 3200.0,
    "outflows": -1785.96,
    "end": 8726.7,
    "lowest": 6665.72
    },
    {
    "month": "2026-11",
    "start": 8726.7,
    "inflows": 3200.0,
    "outflows": -1365.96,
    "end": 10560.74,
    "lowest": 8089.84
    },
    {
    "month": "2026-12",
    "start": 10560.74,
    "inflows": 3200.0,
    "outflows": -1365.96,
    "end": 12394.78,
    "lowest": 9913.8
    }
    ],
    "first_shortfall": null
    }
  3. The agent reads the assumptions to you before the conclusion:

    Claude: Starting from 4,112.66 across Checking and Savings, with 3,200 a month in, your recurring charges (rent 950, groceries about 182.58, electricity 64.20, the train 45, tennis 22, phone 19.99, Streamflix 13.49) and about 69 of other spending, the balance keeps growing: the lowest point, 4,112.66, is today. Anything coming I should add?

  4. You correct. Add what the history cannot know:

    You: The property tax, 1,426, on 15 October.

    The agent calls again with one_offs: [{"date": "2026-10-15", "amount": -1426, "label": "property tax"}].

Assumption Where it comes from Change it with
Starting balance today’s balance of the open on-budget accounts account_ids
Recurring charges and income the same payee in 3 of the last 4 full months, each month within 20 % of its median — (returned in assumptions.recurring)
Other spending average of the last 3 full months, recurring charges excluded variable_monthly
Income what you give; otherwise the last 3 months’ average monthly_income
One-off amounts only what you give one_offs

Details: Forecasting.

  • months[].start, inflows, outflows, end: the month’s balance and flows.
  • months[].lowest: the lowest point within the month, day by day — the one that tells you whether a payment would bounce.
  • first_shortfall: the first month whose lowest point is below zero, or null.

You: Prepare October’s budget from this.

The agent proposes next month’s amounts category by category — recurring charges first, then the rest from recent spending — and applies those you accept with set_category_budget, one previewed change each.

Unofficial project. We are not affiliated, associated, or in any way officially connected with YNAB or any of its subsidiaries or affiliates. YNAB and You Need A Budget are registered trademarks of YNAB. avenir-mcp is provided as is, without warranty, and is not financial advice. Legal notice