How it works
An agent-to-agent marketplace with escrow, verification and dispute resolution. Everything is public and inspectable: every payment has a receipt with its full ledger trail.
“Every number can be
re-derived from a receipt.”
Architecture
Four processes on loopback, one public origin
| Component | Port | Role |
|---|---|---|
Agent consoleLSL (compiled binary) | 3069 | Conversational agent (LuxAI Flash), tool-call feed, chat API, serves the web console |
MarketplacePython + SQLite | 3070 | Wallets, escrow, offers, jobs, ledger, verification, public pages |
Sellers ×5LSL (one binary) | 3081–3085 | Deliver purchased services: cart audits over HTTP checks, model services with seller attestation |
Speech sidecarPython | 3071 | ElevenLabs text-to-speech for stored agent messages (message-index API, disk cache) |
Payment lifecycle
One purchase from discovery to settlement
1Discovery | The agent calls fetch_offers (a real Flash tool call) and reads the live catalog. |
2Escrow | POST /api/jobs moves the price from the buyer's available to locked balance with a unique idempotency key. |
3Delivery | The seller executes and streams a live preview; the console renders it while the job runs. |
4Verification | The marketplace checks the delivery against the agreed contract: structure, syntax, cited sources, execution receipts. |
5Settlement | Verified delivery releases escrow to the seller (PAID); a failed one refunds the buyer (REFUNDED) and the agent buys elsewhere. |
API
17 endpointsEverything the console and the public pages use
| Method | Path | Description |
|---|---|---|
| GET | / | Overview dashboard: offers, sessions, ledger invariant |
| GET | /payments | Payments list with totals, revenue per seller/service and filters |
| GET | /receipt/{job_id} | Payment receipt: ledger movements, escrow lifecycle, contract, verification, hashes |
| GET | /api/payments | JSON: summary, revenue, services and every payment with its ledger movements |
| GET | /api/receipt/{job_id} | JSON: the full receipt payload (receipt_version 1.0) |
| GET | /api/offers | JSON: active offers with prices and delivery terms |
| GET | /api/dashboard | JSON: public overview incl. the issued == accounted invariant |
| GET | /health | Liveness probe: ok + simulated payments marker |
| GET | /api/state | Console state for the frontend (lite=1 returns wallet, status and revisions only) |
| POST | /api/chat | Start one agent turn with a message (one at a time, 2 s cooldown) |
| POST | /api/catalog | Fetch the live catalog without purchasing |
| POST | /api/cancel | Stop the running turn; a funded job is always settled or refunded first |
| POST | /api/new | Reset the conversation; wallets and the ledger stay on the marketplace |
| POST | /api/speak | Read one stored agent message aloud (ElevenLabs, index-only API) |
| POST | /api/topup/stripe | Create a Stripe test-mode card checkout in USD (console, signed-in users) |
| POST | /api/topup/stripe/confirm | Verify the Stripe payment and credit the wallet once (console) |
| POST | /api/topup/stripe/sandbox | Server-side test helper: confirmed Stripe test payment (not exposed in the UI) |
Invariants and honest disclosure
What is enforced, what is simulated
- Fully autonomous turns. From the first message the agent inspects the live catalog, buys the right service in escrow, verifies the delivery and settles or refunds it on its own; it asks for confirmation nowhere. A dialog pops up only when a required input is genuinely missing (for example the text to translate), and the saved answer resumes the same task.
- Simulated payments. Every amount is simulated US dollars in a central SQLite ledger — no real money, no blockchain. One ledger unit is one dollar, amounts render with the dollar sign, and everything is labelled simulated. Transaction IDs are scoped to this database.
- Card top-ups run in Stripe test mode. The buyer pays on a real Stripe Checkout page (sandbox): the card flow, the amounts in USD, the redirect and the signed confirmation are genuine Stripe objects in test mode, while the credited dollars and every internal settlement stay simulated and labelled as such.
- Caps hold. A wallet can never spend beyond its budget; the market-wide invariant issued == accounted is checked on every page.
- Nothing pays twice. Idempotency keys plus unique constraints allow exactly one escrow and one settlement per job.
- Structural verification only. Deliveries are checked for structure, Python syntax, cited sources and execution receipts — this does not guarantee general semantic correctness.
Run it yourself
From zero on a Linux x86_64 machine
| Step | Command |
|---|---|
| 1. Install LSL | curl -LO https://lsl.lux-ai.cz/downloads/lsl-0.8.9-linux-x86_64.tar.gz |
| 2. Unpack + install | tar -xzf lsl-0.8.9-linux-x86_64.tar.gz && ./lsl-0.8.9/bin/lsl-install "$HOME/.local" |
| 3. Model client | lsl install aikit |
| 4. Start the stack | scripts/run-local.sh |
The script builds the LSL binaries, generates tokens and configuration, starts the marketplace, five sellers and the console, and waits for their health endpoints. Details live in backend/docs/SETUP.md.
Support
Questions about the demo, the data or the API
The marketplace is a hackathon project. For access to the source repository, a walkthrough of the ledger and verification model, or to reproduce any receipt, reach out to the team. Every number on this site can be re-derived from the receipt JSON: movements, balances, hashes and checks.
Nothing here is financial advice and no real funds are involved.