Inspiration

Teams run out of basics like paper, cables and markers, and then lose time comparing stores for the best price. Letting an AI buy things for you is the obvious fix, but giving an AI a payment method is risky. I wanted an AI buyer that does all the shopping work, while a person always keeps the payment button.

What it does

ProcureAI watches your inventory, or takes a request like "2 wireless keyboards under $30". The agent (Gemini, with tool calling) searches live listings through Channel3, compares merchants, skips out-of-stock items, and puts a proposal with a one-line reason in an approval queue. Nothing is bought until a person approves it and pays through PayPal. The server then captures the payment and issues a printable invoice.

The Insights tab is a live dashboard built with AG Studio, with a custom theme and your own proposals as data. Its AI Assistant (Studio Agent Framework) lets you ask in plain language, for example "Add a column chart of total savings by merchant", and builds the chart for you.

How we built it

  • Agent: Gemini with tool calling, with an automatic fallback to a scripted agent when the AI is busy or over its daily cap.
  • Safety: limits are enforced in server code, not in the prompt: maximum unit price, per-purchase cap, total budget, no overbuying, and a quantity the user typed cannot be overridden.
  • Payments: PayPal Orders v2 in sandbox, with multi-currency checkout and location-based currency.
  • Accounts: email OTP, with per-user data in PostgreSQL (Neon).
  • Dashboard: Next.js, React, AG Grid and AG Studio. I connected the Studio AI Assistant to Gemini through my own server route, so the API key never reaches the browser.
  • Hosting: Render (Node and Express API, Next.js dashboard)

Challenges we ran into

  • Gemini was often busy. Some calls returned a "high demand" error or stalled. I added per-attempt timeouts and an automatic switch to a second Gemini model.
  • Studio's agents need tool calls to round-trip correctly. I had to handle Gemini's thought signatures and tool schemas with shared definitions before the Studio agents could build charts.
  • PayPal cannot charge in INR, so Indian buyers are charged in USD with an INR estimate.
  • Render's free plan blocks SMTP, so on the hosted demo OTP codes are shown on screen and there is a one-click demo login.

Accomplishments that we're proud of

  • A complete, real shopping loop. The agent searches live listings through Channel3, compares merchants, proposes a purchase, and a person approves and pays through PayPal. The server captures the payment and issues a printable invoice. Every step runs against real services, not a mock.
  • Safety that lives in code, not in the prompt. Maximum unit price, per-purchase cap, total budget, no overbuying, and an exact quantity typed by the user that the AI cannot override are all enforced on the server.
  • It keeps working when the AI does not. When Gemini is busy, slow or over its daily cap, the app falls back to a second model or a scripted agent, and the activity log says why. The demo never just freezes.
  • AG Studio with a real AI Assistant. The Insights tab uses a custom theme and live data from the user's own proposals. I connected the Studio Agent Framework to Gemini through my own server route, so the API key never reaches the browser, and users can ask for new charts in plain language.
  • A demo anyone can try in one click. A hosted site with a demo login, per-user data in PostgreSQL, email OTP, multi-currency checkout and open-source code under the MIT licence. ## What we learned Keep the model out of anything that moves money. Prompts are not a safety system, so the limits live in code. I also learned how much real-world AI work is handling failures: busy models, timeouts and fallbacks.

What's next for ProcureAI

  • Real merchant checkout. Today the sandbox payment goes to the app's own PayPal sandbox account. Next is integrating real merchant checkouts, so an approved proposal turns into an actual order.
  • Real negotiation. Catalog APIs cannot negotiate, so the "merchant" currently answers with a volume-discount rule. I want the agent to request quotes from suppliers that support it.
  • Payment confirmation with PayPal webhooks, so a payment is confirmed even if the buyer closes the tab.
  • SMS OTP and more sign-in options, since email OTP does not reach everyone.
  • Scale beyond one server. Move from one JSON document per user to normalised database tables that work with several server instances.
  • A dashboard that remembers. Save the charts people build with the Insights AI Assistant, so they are still there after a refresh.

Built With

Share this project:

Updates

Submission history