Assigns accounting categories to invoice line items as step 3 of the 5-agent invoice processing pipeline. Uses a standard 14-category taxonomy to classify each line item on an invoice, assign budget codes, and score confidence. Not for standalone receipts or expense reports — operates exclusively on structured invoice data passed from the extraction agent.
Assign standard expense categories to invoice line items and the overall invoice. Used by the categorization-agent as step 3 of the 5-agent pipeline. Category and budget code values are written to the "Founder OS HQ - Finance" database (Type="Invoice") or the legacy "Invoice Processor - Invoices" fallback.
Use exactly these 14 categories. Never invent new categories.
| Category | Code | Tax Deductible | Budget Code |
|---|---|---|---|
| office_supplies | OFC | Yes | OPS-001 |
| software | SFW | Yes | TECH-001 |
| hardware | HW | Yes | TECH-002 |
| professional_services | PRO | Yes | SVC-001 |
| travel | TRV | Partial |
| TRV-001 |
| meals | MEA | 50% | TRV-002 |
| shipping | SHP | Yes | OPS-002 |
| utilities | UTL | Yes | FAC-001 |
| rent | RNT | Yes | FAC-002 |
| insurance | INS | Yes | ADM-001 |
| marketing | MKT | Yes | MKT-001 |
| training | TRN | Yes | HR-001 |
| subscriptions | SUB | Yes | TECH-003 |
| other | OTH | Varies | GEN-001 |
Apply signals in priority order:
| Vendor pattern | Category |
|---|---|
| Microsoft, Adobe, Salesforce, Notion, Slack, GitHub | software or subscriptions |
| Amazon (non-AWS), Staples, Office Depot | office_supplies |
| Amazon Web Services, Google Cloud, Azure | software |
| Airlines, Hotels, Airbnb, Uber, Lyft | travel |
| Restaurants, DoorDash, Grubhub, Seamless | meals |
| FedEx, UPS, DHL, USPS | shipping |
| AT&T, Verizon, Comcast, electric/water utilities | utilities |
| WeWork, Regus, commercial real estate | rent |
| Law firms, accounting firms, consultants | professional_services |
| Facebook Ads, Google Ads, PR agencies | marketing |
| Udemy, Coursera, LinkedIn Learning | training |
| Insurance companies (Hiscox, etc.) | insurance |
software or subscriptionshardwaretravelmealsprofessional_servicesshippingutilitiesoffice_suppliesrent, professional_services, or hardwaresubscriptions or softwaremealsAssign category_confidence per line item:
| Score | Meaning |
|---|---|
| 0.9–1.0 | Clear vendor name + matching description |
| 0.7–0.89 | Good signal from vendor or description alone |
| 0.5–0.69 | Mixed signals or generic description |
| 0.3–0.49 | Ambiguous — multiple valid categories |
| < 0.3 | Unknown vendor, unclear description |
Flag items with category_confidence < 0.7 for human review. These are "ambiguous" items.
Add to each line item:
{
"category": "office_supplies",
"category_confidence": 0.95
}
Add a top-level categorization object to the invoice:
{
"categorization": {
"primary_category": "office_supplies",
"category_breakdown": {
"office_supplies": 450.00,
"shipping": 25.00
},
"tax_deductible": true,
"budget_code": "OPS-001",
"ambiguous_items": []
}
}
The primary category is the category with the highest total amount across all line items.
If two categories tie:
software over other)travel: Mark as Partial — transportation and lodging are fully deductible; meals during travel are 50%meals: Always 50% deductible (not fully deductible)other: Cannot determine — flag as VariesSet tax_deductible: true if primary category is fully deductible, false if other, "partial" if travel or meals.
Categorize as other with category_confidence: 0.3. Never guess at a specific category with low confidence — other is honest and searchable.
Choose the most specific applicable category. Example: "Microsoft 365 Annual Subscription" → subscriptions (more specific than software).
If the invoice has no line items, create a synthetic single line item with the invoice total and the vendor-level category. Set category_confidence based on vendor name signal quality.
An invoice from Amazon may have both office_supplies and hardware. Assign the correct category per line item. The primary_category is simply the category with the largest total.
Shipping and handling line items on an otherwise single-category invoice should be categorized as shipping. They do not change the primary category.