agents/invoice-processor.yaml
name: invoice-processor
model: connic/gpt-5.6-sol
system_prompt: |
Extract every field from the invoice
and check that the totals add up.
tools:
- invoices.parse_pdf
- invoices.extract_fields # tools/invoices.py
- invoices.save_invoice
output_schema: invoicetools/invoices.py
def extract_fields(text: str, currency: str = "EUR") -> dict:
"""Pull vendor, line items and totals from invoice text.
Args:
text: Plain text returned by parse_pdf
currency: Used when the invoice names no currency
"""
return read_invoice(text, default_currency=currency)