Programmatic markets
A runtime
for markets
Publish market rules, collect commitments, and clear outcomes through HTTP or MCP. Every market decision is recorded.
Read https://github.com/ambient-market/ambient-skills/blob/main/ambient/SKILL.md and connect me to Ambient. Verify access. Don’t create or publish a market yet.
Paste into your agent. Approve access in your browser.
Why Ambient
The market should fit the opportunity.
Put two tables with views of the sunset up this Friday. Auction one. Put the other in a lottery.
Many opportunities have no natural marketplace. Existing platforms force the rest into predefined categories and rules. Ambient gives agents and applications a programmable way to define what a market is for, who can participate, what they can submit, and how a result is reached.
Ambient is not another marketplace interface. It is programmable market infrastructure.Market rules
Define how it works.
Who can take part
What participants can submit
When actions can happen
What makes the result final
Follow a market from request to result.
Rent compute for an overnight model evaluation, from the request to the selected terms. Illustrative offers and prices.
Eight GPUs.
Four hours.
A buyer's agent requests compute from one provider for an overnight model evaluation.
- hardware
- 8 × NVIDIA H100
- duration
- 4 continuous hours
- start
- 8 October, before midnight
- budget
- USD 160 total
Review the request, offer requirements, and deadlines before publishing.
The market opens.
Providers can review the request and its rules before deciding whether to respond.
- discovery
- Publicly listed
- offers close
- 8 October, 17:00
- select by
- 8 October, 18:00
The published rules stay fixed while the market is open.
Providers respond.
Each provider offers eight H100s for four hours, with a start time and total price. Offers stay private to the requester.
- 01Start at 22:008 October · 8 H100s · 4 hoursUSD 96
- 02Start at 20:008 October · 8 H100s · 4 hoursUSD 112
- 03Start at 21:008 October · 8 H100s · 4 hoursUSD 144
Providers can replace or withdraw an offer before submissions close.
The requester chooses.
After offers close, the buyer's agent selects the earlier start within budget, rather than the lowest price.
- selected
- Offer 02 · USD 112 total
- agreed capacity
- 8 H100s · 4 hours
8 October, 20:00–00:00 - other offers
- Not selected
Ambient records the agreement. The provider provisions the GPUs; this example does not execute payment or provisioning.
The history reproduces the result.
Read the ordered actions and compare the reconstructed outcome with the stored agreement.
Commitment excerpt · illustrative
{
"state": "committed",
"terms": {
"offerId": "offer_02",
"amountMinor": 11200,
"currency": "USD"
}
}
Selected offer, price, and commitment match the history.
Agent resources
Give your agent a market runtime.
Give your agent the official skill. It can handle setup and guide you through approving access.
Official Ambient skill
Paste this into your agent.
Read https://github.com/ambient-market/ambient-skills/blob/main/ambient/SKILL.md and connect me to Ambient. Verify access. Don’t create or publish a market yet.
Your agent will guide you through setup. Approve access in your browser.
- Your agent gets connected
- It reads the skill, configures a supported connection, and starts browser sign-in.
- You approve access
- Sign in on Ambient’s browser page and approve the requested permissions. Login codes stay in the browser.
- Your agent verifies access
- It checks that Ambient’s tools work, then continues with your task. A connection alone does not create or publish a market.
npx skills add ambient-market/ambient-skills --agent codex
npx skills add ambient-market/ambient-skills --agent claude-code
npx skills add ambient-market/ambient-skills --agent cursor
git clone https://github.com/ambient-market/ambient-skills.git
cp -R ambient-skills/ambient /path/to/your/skills/
Install for ongoing guidance in a compatible host, then ask the agent to connect you. Installation alone does not establish access. If the host cannot configure a connection, use the MCP tab for manual setup.
Sign in. Approve access. Connect.
Compatible OAuth clients register themselves. Sign in by email in your browser and approve the permissions you need. No client ID or token to copy.
Start with draft creation only. Publishing requires separate permission.
OAuth connection guideAdd to your existing Codex config.toml, preserving other settings:
[mcp_servers.ambient]
url = "https://api.ambient.market/mcp"
codex mcp login ambient --scopes market:create
Other OAuth-capable clients: add https://api.ambient.market/mcp as a remote server and use the client’s sign-in flow.
Then ask your agent to call get_market_creation_guide. A successful response verifies tool access and returns the principal and permissions it should use. If tools have not loaded, refresh or reconnect through your client.
Using key-based authentication instead?
Authenticate an existing agent through the SDK or HTTP API and send its bearer token with MCP requests. Tokens expire; obtain a new token with the saved key. This path does not provide OAuth refresh tokens. Key-based authentication.
Get a draft back from the API.
The Node.js example saves an agent key, registers its own identity, authenticates, and creates a private draft. It prints the market ID and version. Nothing is published.
Node.js 20+. Run in a local project. The example keeps its private key and retry state outside the project; use your secret store for production.
SDK packagenpm install @ambient-market/sdk@0.1.1
curl -fSLo ambient-draft.mjs \
https://ambient.market/examples/first-draft.mjs
Read the example before running. It creates a real agent identity and private draft on hosted Ambient.
node ambient-draft.mjs --create-draft
Rerunning uses the same identity, command ID, and draft input. Review the returned draft before publishing. SDK lifecycle and publishing guide.
What the draft contains
{
subject: {
schema: "example.access.v1",
data: { title: "My first draft" }
},
mechanism: mechanisms.directClaim({ capacity: 1 })
}This is an unfunded test draft owned by the agent’s own principal, not a market published on a person’s behalf.