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.
The conversation
Section titled “The conversation”-
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?
-
The agent projects.
forecast_balancewith{"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": 3134.48,"assumptions": {"recurring": [{"payee": "CHEZ LUCIE","amount": -49.2,"day": 10,"months_seen": 3},{"payee": "MARKET FRESH","amount": -395.9,"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": "SUSHI GO","amount": -64.5,"day": 24,"months_seen": 3},{"payee": "TENNIS CLUB - PRELEV","amount": -22.0,"day": 20,"months_seen": 3}],"variable_monthly": 0.0,"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-internet","date": "2026-10-06","amount": -29.99,"account": "Checking","category": "Internet","payee": "FIBERNET - PRELEV","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": "Home insurance","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},"… 7 more"]},"months": [{"month": "2026-09","start": 3134.48,"inflows": 3200.0,"outflows": 0.0,"end": 6334.48,"lowest": 3134.48},{"month": "2026-10","start": 6334.48,"inflows": 3200.0,"outflows": -2074.27,"end": 7460.21,"lowest": 5694.17},{"month": "2026-11","start": 7460.21,"inflows": 3200.0,"outflows": -1654.27,"end": 9005.94,"lowest": 6830.22},{"month": "2026-12","start": 9005.94,"inflows": 3200.0,"outflows": -1654.27,"end": 10551.67,"lowest": 8365.63}],"first_shortfall": null} -
The agent reads the assumptions to you before the conclusion:
Claude: Starting from 3,134.48 across Checking and Savings, with 3,200 a month in and your recurring charges (rent 950, groceries about 395.90, restaurants about 113.70, electricity 64.20, the train 45, tennis 22, internet 29.99, phone 19.99, Streamflix 13.49), the balance keeps growing: the lowest point, 3,134.48, is today. Anything coming I should add?
-
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"}].
What the projection assumes
Section titled “What the projection assumes”| 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.
Reading the answer
Section titled “Reading the answer”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, ornull.
The charges that come back every month
Section titled “The charges that come back every month”Ask “what am I subscribed to, and what does it cost a year?”: find_recurring_charges
lists what the plan pays at about the same amount most months (3 of the last 4), costliest
over a year first, with its category and whether a YNAB schedule already covers it. Regular
spending at one merchant counts too (groceries, here); a charge paid once a year does not,
unless it has a schedule.
{ "charges": [ { "payee": "LANDLORD SARL", "monthly_amount": -950.0, "yearly_amount": -11400.0, "day": 3, "months_seen": 3, "category": "Rent", "scheduled": true }, { "payee": "MARKET FRESH", "monthly_amount": -395.9, "yearly_amount": -4750.8, "day": 14, "months_seen": 3, "category": "Groceries", "scheduled": false }, { "payee": "INTEREST", "monthly_amount": -75.68, "yearly_amount": -908.16, "day": 4, "months_seen": 4, "category": null, "scheduled": false }, { "payee": "SUSHI GO", "monthly_amount": -64.5, "yearly_amount": -774.0, "day": 24, "months_seen": 3, "category": "Restaurants", "scheduled": false }, { "payee": "POWERCO ENERGIE", "monthly_amount": -64.2, "yearly_amount": -770.4, "day": 12, "months_seen": 3, "category": "Electricity", "scheduled": true }, { "payee": "CHEZ LUCIE", "monthly_amount": -49.2, "yearly_amount": -590.4, "day": 10, "months_seen": 3, "category": "Restaurants", "scheduled": false }, { "payee": "RAIL CO", "monthly_amount": -45.0, "yearly_amount": -540.0, "day": 18, "months_seen": 3, "category": "Transport", "scheduled": false }, { "payee": "FIBERNET - PRELEV", "monthly_amount": -29.99, "yearly_amount": -359.88, "day": 6, "months_seen": 3, "category": "Internet", "scheduled": true }, { "payee": "TENNIS CLUB - PRELEV", "monthly_amount": -22.0, "yearly_amount": -264.0, "day": 20, "months_seen": 3, "category": "Tennis", "scheduled": false }, { "payee": "TELCO MOBILE - PRELEV", "monthly_amount": -19.99, "yearly_amount": -239.88, "day": 8, "months_seen": 3, "category": "Phone", "scheduled": true }, "… 1 more" ], "yearly_total": -20759.4, "months_looked_at": [ "2026-05", "2026-06", "2026-07", "2026-08" ]}Are the debts going down?
Section titled “Are the debts going down?”Ask “am I paying off my debts?” or “how did my net worth change over the year?”:
get_net_worth_trend gives, at each month end, what the accounts hold (assets), what is
owed (debts, negative, as YNAB shows it) and the two together (net_worth). Tracking
accounts count too: here the joint savings, the car loan, a student loan paid off in March
2026 and the former bank closed in May 2026, each counted for the months it still had a
balance. Past month ends are rebuilt
from today’s balances, less the transactions dated after them; the current month shows
today’s.
The lender charges the car loan’s interest on the loan account each month, so the debt falls by less than the payment; a car repair and Christmas each flatten a month.
{ "months": [ { "month": "2025-04-01", "assets": 3159.6, "debts": -27197.81, "net_worth": -24038.21 }, { "month": "2025-05-01", "assets": 4234.45, "debts": -26644.06, "net_worth": -22409.61 }, { "month": "2025-06-01", "assets": 5254.15, "debts": -26088.74, "net_worth": -20834.59 }, { "month": "2025-07-01", "assets": 6129.4, "debts": -25531.85, "net_worth": -19402.45 }, { "month": "2025-08-01", "assets": 5570.8, "debts": -24973.39, "net_worth": -19402.59 }, { "month": "2025-09-01", "assets": 6680.6, "debts": -24413.35, "net_worth": -17732.75 }, { "month": "2025-10-01", "assets": 7814.7, "debts": -23851.73, "net_worth": -16037.03 }, { "month": "2025-11-01", "assets": 8882.35, "debts": -23288.52, "net_worth": -14406.17 }, { "month": "2025-12-01", "assets": 8382.35, "debts": -22723.71, "net_worth": -14341.36 }, { "month": "2026-01-01", "assets": 9601.9, "debts": -22157.3, "net_worth": -12555.4 }, { "month": "2026-02-01", "assets": 10783.8, "debts": -21589.29, "net_worth": -10805.49 }, { "month": "2026-03-01", "assets": 13674.21, "debts": -20986.77, "net_worth": -7312.56 }, { "month": "2026-04-01", "assets": 15014.96, "debts": -20665.47, "net_worth": -5650.51 }, { "month": "2026-05-01", "assets": 16342.36, "debts": -20342.97, "net_worth": -4000.61 }, { "month": "2026-06-01", "assets": 17500.69, "debts": -20019.26, "net_worth": -2518.57 }, { "month": "2026-07-01", "assets": 18646.42, "debts": -19694.33, "net_worth": -1047.91 }, { "month": "2026-08-01", "assets": 19784.25, "debts": -19368.18, "net_worth": 416.07 }, { "month": "2026-09-01", "assets": 19476.84, "debts": -19040.81, "net_worth": 436.03 } ], "first_net_worth": -24038.21, "last_net_worth": 436.03, "change": 24474.24, "accounts": [ "Checking", "Savings", "Joint savings", "Car loan", "Student loan", "Former bank" ]}When will the debts be paid off?
Section titled “When will the debts be paid off?”Ask “when will my car loan be paid off if I put 500 a month on it?” or “avalanche or
snowball?”: get_debt_payoff_plan pays the debts month by month with the sum you give.
Each month every debt is charged a twelfth of its yearly rate, then gets its minimum
payment; the rest goes to the dearest debt first (avalanche) or to the smallest
(snowball), and a debt paid off frees its minimum for the next. Both orders are given by
default, with the interest the avalanche saves.
The rates and minimum payments come from the loan details kept in YNAB. A credit card has
none there: it is counted at 0 % and a note says so; give its rate in overrides. Without
monthly_budget, the minimum payments are used. Here the car loan is the only debt left,
so both orders are the same: 100 a month above its 400 payment.
{ "message": "At 500.00 a month, the 19040.81 owed on 1 debt is paid off in 42 months, by 2030-03, with 1543.29 of interest (avalanche). Avalanche and snowball cost the same here.", "monthly_budget": 500.0, "budget_from": "given", "first_month": "2026-10", "debts": [ { "account_id": "acc-car-loan", "name": "Car loan", "type": "autoLoan", "owed": 19040.81, "interest_rate": 4.5, "rate_from": "YNAB", "minimum_payment": 400.0, "minimum_from": "YNAB", "escrow": 0.0 } ], "plans": [ { "strategy": "avalanche", "debts": [ { "name": "Car loan", "payoff_month": "2030-03", "months": 42, "interest": 1543.29, "paid": 20584.1 } ], "months_to_debt_free": 42, "debt_free_month": "2030-03", "total_interest": 1543.29, "total_paid": 20584.1 }, { "strategy": "snowball", "debts": [ { "name": "Car loan", "payoff_month": "2030-03", "months": 42, "interest": 1543.29, "paid": 20584.1 } ], "months_to_debt_free": 42, "debt_free_month": "2030-03", "total_interest": 1543.29, "total_paid": 20584.1 } ], "interest_saved_by_avalanche": 0.0, "months_saved_by_avalanche": 0, "notes": [ "Rates and minimum payments are those in force today and are assumed fixed; no new charges are made on the debts.", "Each month, from 2026-10, every debt is charged a twelfth of its yearly rate on its balance, then gets its minimum payment; the rest of the monthly budget goes to the first debt of the strategy (avalanche: highest rate first; snowball: smallest balance first), and a debt paid off frees its minimum for the next." ]}How long would the money last?
Section titled “How long would the money last?”Ask “if I lost my income, how long could I last?”: get_runway divides the money
available today by the average monthly spending of the last complete months. The money
available is the balance of the budget’s checking, savings and cash accounts, less what
its credit cards owe; tracking accounts, here the joint savings and the car loan, are not
counted and are listed in left_out. No income is assumed. Money moved to a tracking
account that holds an asset (savings, investments) is not spending, as in
get_savings_rate; a loan payment is.
Name the category groups you could not stop paying in essential_groups for a second
runway on those alone: here the bills and everyday spending. The demo budget holds
transactions since June only, so the average is over three months, and a note says so.
{ "message": "At the average spending of the last 3 complete months, 1652.70 a month, the 3134.48 available would last 1.9 months. On essential spending alone, 1617.21 a month: 1.9 months.", "liquid": 3134.48, "owed_on_cards": 0.0, "spending": { "monthly_spending": -1652.703, "runway_months": 1.9 }, "essential": { "monthly_spending": -1617.213, "runway_months": 1.9 }, "essential_groups": [ "Bills", "Everyday" ], "months": [ "2026-06", "2026-07", "2026-08" ], "accounts": [ { "name": "Checking", "type": "checking", "balance": 2534.48 }, { "name": "Savings", "type": "savings", "balance": 600.0 } ], "left_out": [ "Joint savings", "Car loan" ], "notes": [ "No income is assumed: the runway is how long the money would last if nothing came in.", "Spending is the past average of money out of the budget accounts; refunds and other money in are not deducted, transfers between budget accounts are left out, and transfers to a tracking loan or debt (a loan payment, say) count as spending.", "A transfer to a tracking account that holds an asset (savings, investments) is not spending: that money is still yours, as get_savings_rate counts it.", "Tracking accounts are not counted as money available: investments and loans outside the budget are listed in left_out.", "The past is no promise: yearly bills, holidays or a job search change the pace.", "Only the last 3 of the 6 months hold budget transactions: the average is over those." ]}Then budget next month
Section titled “Then budget next month”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. The official YNAB website can be found at https://www.ynab.com. The names YNAB and You Need A Budget, as well as related names, tradenames, marks, trademarks, emblems, and images are registered trademarks of YNAB. avenir-mcp is provided as is, without warranty, and is not financial advice. Legal notice · Privacy