Back to list
Jürgen Schwind 8 Jul 2026 AI, Agent, Browser Automation, Playwright, Invoices, Bookkeeping, Automation
Invoices on Autopilot: How an AI Agent Collects Your Receipts

Invoices on Autopilot: How an AI Agent Collects Your Receipts

A problem most people know

Anyone who wants to keep their receipts tidy knows the daily routine: sometimes the invoice is in the mailbox of an online shop, sometimes buried in the settings of an AI platform, sometimes you have to dig through your bank's online banking to get the monthly statements. And then there are B2B portals, digital magazines and streaming services, each hiding their receipts in a different place – if they even offer a PDF at all.

The result is constant clicking through a wide variety of interfaces, a search for the right login, and a manual save into scattered folders. And right when tax time comes around and the receipts are needed, it's always the one invoice that's missing.


The idea: let an agent do the clicking

The interesting part: the agent doesn't work with secret API endpoints – it works exactly the way a human would, clicking, reading, filtering and saving. That makes the approach work for providers that don't even offer an official API.


What the agent can do

The agent is deliberately modular: for each provider there is a small set of rules describing the concrete flow. New providers can be added without touching the agent's core.

Typical tasks the agent takes over:

  • Check the login state and, if needed, politely wait for a manual login.
  • Browse order or invoice histories – including filters for time ranges like "last 3 months" or "year 2025".
  • Print or download PDFs and place them in a clean folder structure such as ./pdf/2026-06/In/....
  • Unify file names so that "OrderConfirmation_2026-05-19.pdf" becomes a consistent, searchable name.
  • Avoid duplicates – existing receipts are never overwritten without asking first.

Real-world examples (generic)

To make this tangible, here are a few typical provider categories that can be covered by the agent – without claiming to be a definitive list:

  • Streaming & subscription services: monthly subscription invoices from the account or payment area, available through the account settings.
  • Online shops: order confirmations and invoices from the order history, usually filterable by year and status.
  • AI platforms: billing and usage records that live in the billing or wallet area of the respective provider.
  • Banks: account statements and transactions from online banking, often exportable as PDF, CSV or MT940.
  • Digital newspapers & magazines: receipts from the purchase history of a reading subscription.
  • B2B portals: invoices from ERP or customer portals that are only accessible to logged-in users.
  • Aggregation step "tax": a higher-level workflow that merges all the sources above and prepares them for the tax return.

How does it work technically?

At its core, it uses modern browser automation. Instead of curl, fetch or fragile scripts, an MCP-driven browser is used that integrates seamlessly into the AI agent environment.

The key building blocks:

  • MCP browser server as the interface between the agent and Chromium.
  • A real browser session instead of headless scripts – so logins, cookies and 2FA flows behave exactly like a normal user visit.
  • Provider-specific AGENTS.md as a declarative workflow description that the agent works through step by step.
  • Local secrets in a .env, so tokens and login credentials never end up in the repository.
  • Configurable triggers like "invoices May", "all Amazon orders 2025" or "Sparkasse statement Q2" – the agent knows which workflow is meant.

Three things to keep in mind when designing such an agent

  1. "Not logged in" is a normal state. The agent should never force logins on its own, but communicate transparently and wait for the user's confirmation.
  2. Receipts are sensitive. Invoices contain personal data. A local browser, clear folder structures and no cloud requirement are mandatory.
  3. Selectors are short-lived. UIs change. Provider workflows should be documented, versioned and easy to adapt – a giant spaghetti script is more expensive in the long run than a declarative set of rules.

Conclusion

An AI agent for invoice collection isn't rocket science, but it's a surprisingly effective tool: it takes over monotonous, error-prone clicking work and delivers a clean, searchable archive in the end – month after month, provider after provider.

Once you've experienced the agent independently fetching all last month's receipts and sorting them into the right folder structure, you won't want to miss that time savings.


Interested? Let's work together

Got a similar challenge, want to build your own agent workflow, or need help integrating your providers? Feel free to get in touch:

Let's work together.


This post describes the concept of a local AI agent for invoice workflows. The concrete technical implementation may vary depending on the toolchain – the basic principle remains: one browser, one rule set, a lot of time saved.