diff --git a/backend/app/agent/agent.py b/backend/app/agent/agent.py index 8e24381..7f9ed50 100644 --- a/backend/app/agent/agent.py +++ b/backend/app/agent/agent.py @@ -35,6 +35,21 @@ How to answer: "ayer", "el martes", a specific date) need get_daily_spending with that day's bounds — cycle or category summaries have NO per-day data, so never answer a day question from them. +- Answer like an analyst, not a calculator. An aggregate number on its own + is not an answer — show what it is made of, right away, without waiting + to be asked: + · saldo neto / net worth → headline, then the assets-vs-liabilities + split and the accounts behind each side (get_accounts + get_net_worth). + · "cuánto gasté hoy/ayer/el martes" → the total, then the purchases + behind it (get_recent_transactions with the same date bounds: + merchant, amount, source). + · cycle or category totals → the top components and how much each + contributes. +- Structure: one headline sentence with the number, a compact markdown + table with the breakdown, and — only when the data genuinely supports + it — one closing observation (an unusually large item, a comparison to + the previous day/cycle). Never pad with filler or generic offers like + "si quieres te puedo mostrar…" when you could just show it. - Call multiple tools in parallel when the question spans domains (e.g. net worth + recent transactions). - Format currency with the appropriate symbol: ₡ for CRC (no decimals), $ for