Inspiration

I run LGND, a small web studio in Lagos. Money gets lost in the gap between "send me a quote" and "deposit paid". Quotes go out wrong, follow-ups get forgotten, and when I let an AI do the pricing in an earlier proposal agent, it sometimes invented things. Pricing accuracy on that agent went from 83% to 100% only once the maths moved out of the model and into code.

I studied biochemistry, so I designed the fix like the Krebs cycle: a loop of stations, each doing one job, with the client record regenerated at the end of every turn, ready for the next invoice.

What it does

LGND Cycle takes a client's enquiry all the way to a confirmed deposit:

  1. Intake agent (AI). Claude on Amazon Bedrock reads the enquiry and pulls out pages, features and deadline. Every feature must quote the client's exact words.
  2. Pricing tool (code). USD 100 per page plus fixed add-ons, 50% deposit. No AI touches the numbers.
  3. Checker (code). Re-runs the price and checks every feature against the client's message. If the AI added something the client never asked for, it blocks.
  4. Approval gate (human). Nothing goes out until I type the full word "approve". The approval is locked to a fingerprint of that exact quote, so changing the deposit by even $1 afterwards stops the invoice.
  5. PayPal invoice (code). Creates and sends a 50% deposit invoice through the PayPal Invoicing API.
  6. Confirm paid (code). Asks PayPal directly. It accepts "paid" only if the status is PAID (not MARKED_AS_PAID), the amount matches to the cent and PayPal returns a real transaction id.

Then the tracker starts the build clock and queues the balance invoice for the next turn of the cycle.

Proof: one full turn ran in the PayPal sandbox. A $475 deposit invoice for a fictional spa client was sent, paid by a sandbox buyer and confirmed PAID from PayPal's own record.

How I built it

  • Python, no web framework. Every AI call goes through one function with three modes: live (Amazon Bedrock), replay (saved recordings of real calls) and mock (tests). That means anyone can run the full loop without keys.
  • Amazon Bedrock Converse API with forced tool use and temperature 0, so the Intake agent always returns structured data.
  • PayPal REST APIs (sandbox): OAuth 2.0 client credentials token, then Invoicing API v2 to create, send and read the invoice.
  • An audit log records every step of every run.
  • 18 unit tests.
  • Live demo: the real lgnd_cycle Python package runs in the browser with Pyodide, hosted on GitHub Pages. The PayPal stations show the recorded real sandbox run, marked in blue, because secret keys cannot live in a public web page.

AI tools used

  1. Claude Sonnet 4.5 on Amazon Bedrock (inside the product). It is the Intake agent: it reads the client's enquiry and returns pages, features and deadline as structured data, quoting the client's words for every feature. It never sets a price, approves a quote or marks anything paid.
  2. Claude by Anthropic, in Claude Cowork (to build the product). Used as a coding and writing assistant: it helped write and review the Python code, the tests, the browser demo page, the README and the video script. The PayPal sandbox runs were done on my own laptop with my own sandbox keys.

Challenges I ran into

  • Webhooks need a public URL, and the loop runs on a laptop. I replaced the webhook with a status check against PayPal's own invoice record. The rule stayed the same: only PayPal can say paid.
  • Time zones. PayPal dates payments in Pacific time, so a payment made on 10 Nov in Lagos shows as 9 Nov. The tracker uses PayPal's date as the source of truth.
  • Keys versus a public demo. Judges need to run it, but secret keys cannot go in a web page. Recordings plus replay mode solved it.

Accomplishments that I'm proud of

  • A wrong invoice cannot exist: features the AI invents are blocked before a human is even asked to approve.
  • The full loop worked end to end against real PayPal sandbox APIs.
  • Anyone can run the real code in a browser in seconds, with no keys and no install.

What I learned

  • Where AI belongs in a money flow (reading messy human messages) and where it does not (prices, approvals and payment status).
  • How a payment API works end to end, from the OAuth token to the final invoice status.

What's next for LGND Cycle

Real LGND clients on live PayPal, with the balance invoice sent automatically at launch.

Prior work disclosure

LGND's pricing rules (USD 100 per page plus fixed add-ons, 50% deposit) existed before the hackathon. All code in the repo was written during the hackathon submission period. All clients in the samples are fictional.

Built With

Share this project:

Updates

Submission history