Inspiration

We were inspired by the idea of agentic commerce: a future where AI agents can independently negotiate and facilitate transactions on behalf of people. Traditional price negotiation can be time-consuming, so we wanted to explore how AI could make this process smarter, faster, and more efficient while keeping humans in control of financial decisions.

What it does

PayPal Haggler is an AI-powered agent-to-agent negotiation platform featuring three AI components: -Buyer Agent: Negotiates within the buyer's maximum budget. -Seller Agent: Protects the seller's minimum acceptable price. -AI Referee: Evaluates the negotiation and generates a deal assessment. When an agreement is reached, both participants must approve the proposed price before checkout. PayPal Orders API then facilitates payment through the PayPal Sandbox environment. The platform also displays a negotiation transcript, Fair Deal Score, buyer savings, seller margin, and transaction receipt.

How we built it

We built PayPal Haggler using HTML, CSS, and JavaScript for the frontend, with Node.js and Express.js powering the backend. We integrated Llama 3.2(3B) through Ollama to run local AI inference for generating negotiation offers and responses. The negotiation engine manages alternating buyer and seller turns, validates offers, and enforces financial boundaries. We implemented the referee evaluation and integrated the PayPal Orders API v2 for order creation, payment capture, and transaction verification in the Sandbox environment.

Challenges we ran into

One of our biggest challenges was making AI-generated responses consistent and structured enough for the negotiation engine to process. We worked on JSON response parsing, validation, and handling unexpected model outputs. Another challenge was ensuring that buyer and seller agents respected their private financial limits while maintaining realistic negotiations. Integrating the negotiation workflow with participant approvals and PayPal payment processing also required careful coordination between frontend and backend components.

Accomplishments that we're proud of

We successfully built a working prototype that brings AI-driven negotiation and digital payments into one experience. We are particularly proud of:

  • Implementing autonomous buyer and seller negotiation.
  • Running the AI model locally using Ollama.
  • Building a third-agent referee evaluation system.
  • Enforcing financial boundaries through backend validation.
  • Integrating PayPal Sandbox checkout.
  • Completing an end-to-end demonstration from negotiation to payment receipt.

What we learned

We learned how to integrate local language models into a full-stack application, design multi-agent interactions, validate AI-generated outputs, and connect AI-driven workflows with payment APIs. We also learned that AI autonomy must be balanced with transparency, financial safeguards, and meaningful human approval.

What's next for Paypal haggler

We plan to introduce independent buyer and seller sessions, persistent database storage, more advanced negotiation strategies, and improved referee evaluation. We also aim to strengthen authentication, transaction recovery, and production-grade security while exploring how agentic commerce can support more complex real-world transactions.

Built With

Share this project:

Updates

Submission history