• Elevator pitch
    PayPilot helps small businesses get paid on time with AI-drafted invoice reminders—always approved by the owner before sending.

Project Story

  • About the project

Inspiration
Freelancers and small businesses rarely struggle to send invoices. They struggle to get paid on time. Following up can be awkward, repetitive, and easy to put off, which can hurt cash flow. I wanted to explore how an AI agent could help with the follow-ups and number-crunching while keeping the owner in control.

What it does
PayPilot connects to PayPal Invoicing (sandbox) and acts as an accounts-receivable assistant. You can ask questions about invoices and client risk, review overdue invoices each morning, and get a 30-day cash forecast. It calculates client risk from payment history and drafts reminders in a friendly, firm, or final tone based on how overdue an invoice is and the client’s risk.

The agent can propose reminders and invoices, but it cannot send them on its own. Each proposal waits for approval and includes its reasoning and, when available, a payment link with a QR code. PayPilot also includes an invoice table and an audit log.

How I built it
I built PayPilot with Python and FastAPI, using SQLite for data storage and the PayPal Invoicing API v2 sandbox for invoices and reminders. A local Llama 3.2 model served by Ollama powers the agent and drafts messages. The agent uses read tools for invoice and cash-flow information, and proposal tools for reminders and invoices. Only the approval flow can execute actions through PayPal. Sentence-transformers supports search over the collections playbook.

Challenges

  • Trust: I made the boundary between proposing and executing part of the application design, so actions require owner approval—not just an instruction in the AI prompt.
  • Small local models: I used rules to select reminder tone and validate invoice details, with built-in templates as a fallback.
  • Realistic demos: PayPilot includes mock invoice data so the core workflow can be tried without connecting a PayPal account.

What I learned
I learned how to design an AI agent around human approval, work with PayPal’s invoicing workflow, and build graceful fallbacks for local AI. I also explored how to make risk scores and cash forecasts explainable rather than opaque.

What’s next
Dispute triage, multi-user accounts, and learning the best reminder timing for each client.

  • Built with
    Python, FastAPI, SQLite, PayPal Invoicing API v2, Ollama, Llama 3.2, sentence-transformers, AG Grid, Docker.

Built With

Share this project:

Updates

Submission history