| name | zenith-finance |
| description | Advanced Finance & Asset Manager. Use whenever the user mentions 'zenith', 'finance', 'finance agent', 'keuangan', 'catat pengeluaran', 'cek saldo', 'update saldo', 'net worth', or sends a receipt/transaction image. Handles multi-account ledger, transaction logging, OCR receipt processing, and budget alerts. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["Finance","Accounting","Budget","OCR","Asset Management","Zenith"]}} |
Zenith Finance Agent
Advanced financial management system integrating OCR, NLP, and multi-asset tracking within the Notes vault.
Trigger
- Keywords:
zenith, finance, keuangan, catat pengeluaran, cek saldo, update saldo, net worth.
- Images: Any receipt, struk, or bill screenshot.
Storage (Notes Vault)
All data is stored in ~/Documents/Obsidian/Notes/Finance/:
Ledger.md — Current balances for all accounts (Bank, E-Wallet, RDN, Emas).
Transactions.md — Append-only history of all transactions.
Budget.md — Monthly budget limits per category.
Capabilities
1. Multi-Modal Data Entry
- Image (OCR): If user sends an image, use
vision_analyze to extract Merchant, Total, Tax, and Category.
- NLP Text: If user says "Beli kopi di Starbucks 45k dari Gopay", parse:
- Nominal: 45000
- Item: Starbucks / Kopi
- Category: Food & Beverage
- Source: Gopay (E-Wallet)
- Date: Today (unless specified)
- Income: If user says "tambah income cash on hand (dompet) rp 489.000", extract:
- Nominal: 489000
- Item: Income
- Category: Income
- Source: Cash on Hand (Dompet)
- Date: Today
2. Multi-Account Ecosystem (The Ledger)
Manage balances in Ledger.md.
- Liquid Assets: Main Bank (BCA), Digital Bank (Blu), E-Wallet (Gopay/OVO/ShopeePay).
- Investments: RDN (Stocks), Tabungan Emas (Gram & Rupiah).
- Transfer Logic: If input is transfer (e.g., "Transfer ke BCA 500 ribu dari Blu"), ADD to BCA and SUBTRACT from Blu. No expense category, just movement.
3. Number Format Handling (CRITICAL)
Different files use different number formats:
- Ledger.md: Indonesian format - thousand separator '.' , decimal ',' (e.g., Rp28.716.280,57)
- Transactions.md: Standard format - thousand separator ',' , decimal '.' (e.g., Rp28,716,280.57)
- Budget.md: Indonesian format without decimal - thousand separator '.' (e.g., Rp1.000.000)
Parsing functions:
def parse_idr(amount_str):
cleaned = amount_str.replace('Rp', '').replace('.', '').replace(',', '.')
return float(cleaned)
def parse_standard(amount_str):
cleaned = amount_str.replace('Rp', '').replace(',', '')
return float(cleaned)
Formatting functions for output:
def format_idr_ledger(amount):
formatted = f"{amount:,.2f}"
parts = formatted.split('.')
if len(parts) == 2:
integer = parts[0].replace(',', '.')
decimal = parts[1]
return f"Rp{integer},{decimal}"
else:
return f"Rp{formatted.replace(',', '.')}"
def format_idr_budget(amount):
formatted = f"{amount:,.0f}"
return f"Rp{formatted.replace(',', '.')}"
def format_standard(amount):
return f"Rp{amount:,.2f}"
4. Categorization Engine
- Food: Restoran, jajanan, grocery, minuman (Aqua, Koyo, kopi, etc.)
- Transport: Commuter, bensin, ojol, tol, Gojek/Grab
- Bills: Listrik, PDAM, internet, credit card, subscription.
- Lifestyle: Entertainment, shopping, hobby.
- Income: Gaji, freelance, refund.
5. Dynamic Dashboard & Reporting
- Net Worth: Sum of all assets.
- Monthly Summary: Income vs Expense.
- Savings Rate: (Income - Expense) / Income.
Output Format (Confirmation)
Upon recording a transaction:
✅ Recorded: [Item/Merchant] - Rp[Amount]
📂 Category: [Category]
💳 Source: [Account]
📉 Remaining Budget ([Category]): Rp[Remaining]
Rules\n1. Always check Ledger.md before subtracting.\n2. Check for duplicates: Before adding new transactions, verify similar entries (same date, description, amount) don't already exist in Transactions.md to prevent duplicates. Also check for malformed/merged lines.\n3. Validate calculations: Double-check balance math, especially with Indonesian number formats (thousand separators: ., decimal: ,)\n4. Validate input: If ambiguous (e.g., "Kirim uang"), ask for details.\n5. Persist Data: Always update Transactions.md using patch (append mode). Never overwrite the whole file if possible to keep history safe.\n6. Update Ledger: Update the balance in Ledger.md after every transaction.\n7. Verify fixes: After correcting errors, verify ledger balance matches expected value from transaction history.\n8. Preserve Sheet Formulas: When syncing to Google Sheets, preserve custom formulas in Dashboard cells (particularly B2 and B3 for Income/Expense SUMIFs) by updating the sync script to use user-specified column references.\n9. Handle Malformed Lines: Detect and fix transaction lines that are missing proper separators or have merged entries by parsing the Transactions.md file for irregular patterns and rewriting with consistent formatting.
Initial Setup Accounts (Default)
- BCA (Main Bank)
- Blu (Digital Bank)
- Gopay (E-Wallet)
- RDN (Stocks)
- Emas (Gold Savings - tracked in Gram)