Personal

Skills, Rules and Sub-agents

admin·

#skills #rules #subagent #howtouseai


Use skills + rules as your core, and add sub‑agents only if the logic splits into clearly different “domains”.

Given what you described (bank statement → primary type → detailed expense categories for a Canadian company):

Recommended structure

  1. Main agent: “Transaction Categorizer”
    • Skill: classify_primary_type
      • Input: transaction line (date, description, amount, account, etc.)
      • Output: income | expense | transfer
    • Skill: classify_expense_category
      • Only called when primary_type = expense
      • Output: your Canadian chart-of-accounts / expense categories.

. Rules (Vibe rules engine)

  • Drive when and how to use each skill:
  • Examples:
    • IF description matches /PAYROLL|SALARY|WAGES/ THEN primary_type = income
    • IF amount < 0 AND NOT internal_transfer THEN primary_type = expense
    • IF description matches /INTERAC E-TRANSFER|TRANSFER TO SAVINGS/ THEN primary_type = transfer
    • IF primary_type = expense AND merchant_country = "CA" THEN run classify_expense_category
    • Specific merchant rules:
      • IF merchant = "Amazon Web Services" THEN expense_category = "Cloud Services"
      • IF merchant = "Staples Canada" THEN expense_category = "Office Supplies"
  1. When to add sub‑agents Use sub‑agents only if:
    • You have separate, complex policies that would clutter one agent, for example:
      • A “Canadian Tax Coding Agent” that maps expenses to tax buckets (GST/HST, CCA classes, etc.).
      • A “Compliance Review Agent” that flags suspicious or regulated transactions.
    • Or you need different prompts / knowledge bases per domain (e.g., corporate bookkeeping vs. personal budgeting).

In your current scope (income/expense/transfer + Canadian expense categories for one company), a single agent with well‑defined skills and strong rules is usually simpler, easier to test, and easier to maintain than multiple sub‑agents.