AI demo

Invoice agent

MCP · AI SDK · Zod · pdf-lib

Ask for an invoice in plain language. An agent with tools looks up the seller, collects the client name, and returns a PDF. The form below is the same invoice without the model.

  • Tool calling

    The model fetches the seller, then generates the PDF. It only asks for the client name.

  • MCP

    Same tools at /api/mcp for Claude or ChatGPT: get_issuer, generate_invoice.

  • One invoice model

    Chat, MCP, and the form all go through the same Zod schema and PDF renderer.

Ask the agent

Write your own request, or copy this example. The seller is already known, so the agent only needs who to bill.

Make an invoice with these lines: Development, qty 10, $150 each; Notion license, qty 1, $20

Or fill the invoice

React 19 useActionState and a Server Action. Qty and price are editable; amount and total are calculated.

Make an invoice with these lines: Development, qty 10, $150 each; Notion license, qty 1, $20

From (demo seller)
Bill to
Lines
DescriptionQtyPriceAmount
$0.00

Total $0.00