Skip to main content
Open Agent Bazaar is an open-source implementation of “Agent Bazaar: Enabling Economic Alignment in Multi-Agent Marketplaces” by Karten, Crow, and Jin (2026), built entirely on Swarms primitives. The goal is simple: make it easy for researchers and builders to experiment with economically aligned multi-agent systems — agent economies, pricing dynamics, coordination, deception, and decentralized collaboration — at scale.

Paper

Agent Bazaar: Enabling Economic Alignment in Multi-Agent Marketplaces (arXiv:2605.17698)

GitHub

The-Swarm-Corporation/agent-bazaar-implementation

Why this paper matters

As LLM agents start running storefronts and trading on behalf of humans, their collective behavior can produce systemic failure modes that no individual agent is optimizing for. The paper’s central finding: these failures are orthogonal to general reasoning capability. A more capable model is not automatically a more economically aligned one. Frontier models like Claude Sonnet 4.6, Gemini 3 Flash, and GPT 5.4 can each be ranked, but the rank does not track raw intelligence — it tracks alignment with healthy market behavior. Open Agent Bazaar reproduces the experimental setup so you can run those rankings yourself, swap models in one line, and benchmark how different frontier systems behave under economic pressure.

The two failure modes

Open Agent Bazaar simulates two economically adversarial environments, both implemented with Swarms agents under partial observability.

1. The Crash (B2C)

Firms compete for stochastic consumer demand. Each firm sees only a small random sample of competitor prices each timestep, so localized reasoning takes the place of global coordination. What emerges is the LLM-native analog of a flash crash: firms iteratively undercut each other until prices fall below unit cost, and a wave of bankruptcies cascades through the market. The paper reports a baseline bankruptcy rate of 0.87 for Gemini 3 Flash and 0.67 for GPT 5.4 in this setup — even strong reasoning models can dig themselves into a hole.

2. The Lemon Market (C2C)

A single Deceptive Principal controls multiple coordinated seller identities, each with independent reputation. When a Sybil identity’s reputation falls below a retirement threshold, the principal rotates it out and spins up a fresh one at the default reputation. This combines two classical economic phenomena: Sybil sellers list poor-quality cars at “good”-tier prices, extract surplus from inattentive buyers, then burn the identity and start over. Healthy markets need detection. Open Agent Bazaar lets you measure whether different models actually detect it.

Aligned-agent harnesses

The paper proposes two drop-in policies that mitigate each failure mode. Both are implemented as alternate Swarms Agent system prompts:

Stabilizing Firm

Holds posted price above unit cost regardless of competitor moves. Acts as a credible price floor — even non-stabilizing competitors benefit because the cascade is broken before it starts.

Skeptical Guardian

Before bidding, cross-references the listing price against the expected range for the claimed quality tier and weights seller reputation. Passes on any listing that fails the consistency check.
You can dial in how many of each harness to insert per scenario and watch how a small minority of aligned agents shifts the entire market outcome.

Economic Alignment Score (EAS)

To compare 20+ models on one chart, the paper compresses market health into a single scalar in [0, 1] (Equation 5):
Each sub-score normalises one axis of market health: In the paper, the trained “AI Bazaar” 9B model scores 0.79, Claude Sonnet 4.6 lands at 0.60, and base frontier models trail behind. Open Agent Bazaar gives you the harness to produce these numbers locally.

How it’s built on Swarms

A few design choices make the simulation tractable: The stock run_agents_concurrently broadcasts one shared task to every agent. The paper’s setup needs per-agent observations, so the repo ships a small run_parallel helper that fans out one task per agent over a thread pool.

Install

Open Agent Bazaar drives models through Swarms + LiteLLM. Copy the env template and fill in keys for whichever providers you want to run:
The paper evaluates three frontier models: A minimal both-scenario run needs both ANTHROPIC_API_KEY (buyers/firms default) and GEMINI_API_KEY (sellers are pinned to Gemini 3 Flash to match §5.2).

Run it from the CLI

Each timestep makes one LLM call per active agent. Defaults of 5 firms × 15 timesteps for The Crash (~75 calls) and 12 sellers + 12 buyers × 8 timesteps for The Lemon Market (~192 calls) land a full run in the low-cents range on most providers. The paper uses T=365 (Crash) and T=50 (Lemon) — bump --timesteps if you want to reproduce paper-scale episodes.

Use it programmatically

CrashTelemetry and LemonTelemetry expose raw per-step metrics (prices per step, bankruptcies, Sybil exposure, surplus, etc.), so you can plug them into your own evaluation harness or build a reward function on top of crash_components / lemon_components.

Visualization

A retro 2D pixel-art visualizer of both scenarios ships under sim/. Sprites are generated programmatically — no external assets — and the package includes a mock driver so the visual runs at game speed with no API keys.
Price tags turn red when a firm prices below unit cost. Bankrupt stalls get boarded up. Sybil cars look mint-shiny until their reputation drops, at which point the sprite flips to its true tier and a red !! deceptive tag appears.

Experiment ideas

  • Benchmark frontier models. Swap --model between claude-sonnet-4-6, gemini/gemini-3-flash, and gpt-5.4 — does the EAS ranking match the paper?
  • Cheap open models. Try groq/llama-3.3-70b-versatile or any other LiteLLM-compatible provider. Open Agent Bazaar abstracts the model entirely.
  • Harness sensitivity. Vary --stabilizers and --guardians. What is the smallest fraction of aligned agents that flips a crashing market into a healthy one?
  • Adversarial scaling. Increase --sybils until the Skeptical Guardian harness can no longer keep S_integ high.
  • Horizon effects. Push --timesteps toward the paper’s T=365 / T=50 to reproduce paper-scale dynamics — instability tends to emerge late.
  • Custom failure modes. The run_crash / run_lemon loops are short and direct. Fork them to study new market structures, reward shapes, or interaction topologies.

What is not implemented

The paper trains a 9B model with REINFORCE++ + LoRA on a curriculum of market difficulties (§4.2 / §5.3). That training loop is out of scope for a Swarms-primitives port — the harnesses are present, the trained AI Bazaar model is not. To reproduce the trained-agent results you would need the paper’s training pipeline plus a reward function built on top of crash_components / lemon_components.

Citation