What it does

PayPilot is an autonomous shopping agent that turns one plain request - "keep my desk cables tidy, cheap" - into a completed, captured PayPal payment. It searches a product catalog, reasons about what fits the request and budget, adds the pick to the cart, creates a PayPal order (Orders v2), captures it, and reports back with the order and capture IDs.

Every decision is visible: the UI streams the agent's thought, each tool call, each tool result, and the final capture receipt.

How we built it

  • Plain-stdlib Python server (http.server), no framework, deploys anywhere
  • LLM tool-use loop (MiniMax M2.7) driven by a strict one-JSON-object-per-turn contract
  • PayPal Orders v2 end to end: OAuth client-credentials token, order create, order capture, on sandbox keys
  • A deterministic rule-based fallback planner: if the LLM loop ever falls short of a completed capture, the run still finishes a valid checkout, so the demo cannot dead-end
  • Live on Render: the button above hits the real sandbox checkout

Challenges we ran into

The reasoning model burns its token budget on its internal think block, which once truncated every response before the JSON appeared - the agent silently fell back instead of reasoning. We raised the token budget, dropped the stop strings, and made the parser (not truncation) handle the model's format. Empty searches now fall back gracefully instead of inventing products.

What we learned

Reliability in agentic checkout comes from making failure modes boring: a bounded loop, a parser that never trusts truncation, and a fallback that still completes a real, captured payment.

Built With

Share this project:

Updates

Submission history