What happens when multiple AI agents start making independent buying decisions in the same marketplace?
That question inspired PayPal Commerce Wind Tunnel: Agent Driven Commerce Simulator.
I wanted to explore what happens when individual AI agents interact with shared merchants, products and inventory. Each agent may make a decision that is perfectly reasonable for itself but together their decisions can create unexpected effects across the entire marketplace.
My goal is to make those effects visible, measurable and easier to understand.
What it does
The project creates a small simulated economy with five autonomous buyer agents and three merchants. Each buyer has a different personality and purchasing strategy. Some focus on price, others on reliability, loyalty or speed. I can run experiments that introduce problems into the marketplace and observe how the agents respond. My first experiment Stale Inventory introduces a difference between the inventory a merchant displays and the inventory actually available.
I then observe how buyers react, whether they switch merchants, how demand moves and what happens to the overall marketplace. The platform also provides visualizations, event records, experiment comparisons and AI assisted analysis. A separate PayPal Sandbox checkout demonstrates how the simulated commerce environment can connect to real payment infrastructure through a human approved checkout flow.
How I built it
I built the application using TypeScript, React and Next.js. The simulation uses five different agent behaviours, three merchants, shared inventory and an event driven architecture. I designed the experiments to be reproducible so that we can compare different runs under controlled conditions. For AI capabilities, I integrated the Groq API with an OpenAI GPT-OSS model. This adds model based reasoning to the application while keeping the core simulation structured and controllable.
For payments, I integrated the PayPal Developer Platform using Sandbox authentication and the Orders API to create test orders and provide a buyer approval workflow. I also built an interactive interface to make the simulation easier to observe instead of hiding everything behind logs and technical output.
Challenges we ran into
One of our biggest challenges was making different agents behave differently while still operating inside the same marketplace. Another challenge was understanding the difference between an individual failure and a system wide effect. A buyer switching merchants is one event. Many buyers switching merchants can change the entire distribution of demand. I also had to make experiments repeatable, record what happened and avoid presenting assumptions as proven results.
Integrating PayPal introduced another challenge: keeping simulated purchases separate from actual Sandbox payment workflows and handling the approval process correctly. Finally, I had to bring simulation, AI, payment integration and visualization together into one working application.
Accomplishments to be proud of
- Built a working multi agent commerce simulation.
- Created five buyers with different purchasing strategies.
- Connected three merchants through a shared marketplace.
- Developed a controlled inventory disruption experiment.
- Added repeatable simulation runs and event recording.
- Integrated Groq API with a GPT-OSS model.
- Integrated PayPal Sandbox authentication and order creation.
- Created an interactive interface for exploring agent behaviour and market outcomes.
Most importantly, I built something that goes beyond helping an individual AI agent make a purchase. It lets us explore the effects of many agents making decisions together.
What I learned
I learned that individually reasonable decisions do not always produce good collective outcomes. An agent may optimize for its own budget, speed or reliability without considering the wider marketplace. When many agents behave this way, their combined actions can create unexpected patterns. I also learned that AI systems need more than intelligence. They need observability, controlled testing and ways to understand the consequences of their actions.
That is the bigger reason I built this project.
What's next for PayPal Commerce Wind Tunnel: Agent Driven Commerce Simulator
This is the beginning not the end. i want to introduce more experiments, more merchant behaviours and more diverse autonomous agents. Future directions include studying demand concentration, coordinated agent behaviour, inventory pressure, merchant resilience and cascading marketplace failures. I want to improve experiment comparison, AI generated insights and the connection between autonomous purchasing decisions and real commerce infrastructure.
Long term goal is to create a place where developers and researchers can experiment with autonomous commerce before these systems operate at a much larger scale.
Test the economy before the economy runs itself.
Built With
- agent-based-modeling
- artificial-intelligence
- autonomous-agents
- commerce-simulation
- emergent-behavior
- event-driven-architecture
- groq
- llm
- market-simulation
- multi-agent-systems
- next.js
- node.js
- paypal
- paypal-orders-api
- paypal-sandbox
- react
- simulation
- typescript