Lucky Cookie

Inspiration

Lucky Cookie is an AI financial review agent that transforms messy financial spreadsheets into review-ready working papers for accountants and auditors.

The idea came from my own experience. After leaving my accounting role, I started looking for freelance bookkeeping and accounting work online. I realized that many small businesses and independent accountants spend hours cleaning spreadsheets before they can even begin reviewing the numbers.

Most of these bookkeeping jobs are one-off projects, making it difficult to justify paying for expensive accounting software subscriptions. I wanted to build a lightweight AI workflow that combines my accounting and auditing experience with GPT-5.6 to automate the repetitive preparation work while keeping accountants in control.

How I built it

I built Lucky Cookie using Python, Streamlit, Pandas, and the OpenAI Responses API with GPT-5.6.

The workflow begins by creating an engagement and defining the reporting period, jurisdiction, reporting currency, and VAT settings.

Users upload raw spreadsheets from banks or accounting systems. Lucky Cookie standardizes transactions, calculates VAT, generates journals, builds the General Ledger and Trial Balance, and automatically classifies transactions using deterministic accounting rules.

Only transactions that cannot be classified confidently are sent to GPT-5.6. The AI generates structured accounting suggestions, which accountants can review, approve, or reject before any accounting records are created.

Challenges I ran into

Financial software cannot simply "guess."

One of the biggest challenges was ensuring reliability while using an LLM. I implemented structured outputs with Pydantic validation, snapshot checking to prevent stale AI suggestions, fail-safe error handling, and a human approval process so AI never modifies accounting records automatically.

Balancing automation with trust was much harder than simply calling an LLM.

What I learned

This project taught me that AI works best as a professional assistant rather than a replacement for professional judgment.

GPT-5.6 helped me move much faster throughout the build. It supported me in designing the workflow, reviewing code, identifying edge cases, improving validation, and thinking more carefully about how an AI agent should behave in a financial environment.

More importantly, I learned that using a powerful model is not enough on its own. In financial workflows, the surrounding system matters just as much as the model. Structured outputs, deterministic rules, validation, snapshot checks, fail-safe handling, and human approval are what make the AI useful and trustworthy.

Building Lucky Cookie also gave me practical experience with the OpenAI Responses API, prompt design, Pydantic schemas, AI-assisted development with Codex, and integrating LLM reasoning into a real accounting workflow.

Built With

  • accounting
  • agent
  • ai
  • api
  • bookkeeping
  • codex
  • duckdb
  • financial
  • github
  • gpt-5.6
  • human-in-the-loop
  • json
  • mypy
  • numpy
  • openai
  • openpyxl
  • pandas
  • pydantic
  • python
  • responses
  • ruff
  • streamlit
Share this project:

Updates