Inspiration
Online shoppers often spend too much time comparing product specs, adding up prices across multiple tabs, and manually checking out. We built CartPilot AI to explore how agentic commerce can turn a single natural-language budget prompt into a curated, mathematically verified cart with seamless PayPal checkout.
What it does
- Budget-Aware Product Discovery: Shoppers describe what they need and their budget in plain English (e.g., "Build me a work-from-home desk bundle under $135"), and CartPilot AI selects matching items from the store catalog with transparent pricing math.
- Human-in-the-Loop Autonomous Checkout: When the buyer confirms purchase intent, the AI autonomously invokes a PayPal tool call (
prepare_paypal_checkout) to create a live PayPal Sandbox Order via the PayPal Orders API v2. - End-to-End Payment Verification: Buyers approve the payment directly in PayPal Sandbox and verify/capture the completed transaction inside the app.
How we built it
- PayPal Developer Platform: Integrated PayPal OAuth2 authentication and Orders API v2 (
/v2/checkout/ordersand/capture) in PayPal Sandbox. - AI Tool Calling: Used Groq LLM function calling to bridge conversational intent with structured PayPal order creation.
- Frontend & Runtime: Built a responsive, real-time conversational storefront in Python and Streamlit.
Challenges we ran into
- LLM Latency & Model Availability: Handling rate limits and deprecated model endpoints during testing, which we solved by implementing dynamic model discovery at runtime and caching PayPal OAuth2 tokens in session state.
- Safe Agentic Execution: Designing strict function-calling guardrails so real PayPal checkout orders are only generated after explicit user confirmation.
What we learned
- How to connect Large Language Model tool-calling schemas directly to real financial APIs like PayPal Orders API v2.
- How human-in-the-loop checkpoints keep autonomous shopping agents reliable, transparent, and trustworthy for buyers.
What's next for CartPilot AI
- Expanding to multi-merchant product catalogs, adding PayPal Vault support for one-click repeat checkouts, and integrating real-time PayPal webhook notifications for order fulfillment.