AIMarket
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AIMARKET_PQC | No | Set to `1` to sign hybrid (Ed25519 + ML-DSA-65); back up `<key>_mldsa` together with the Ed25519 key. | |
| DATABASE_URL | No | PostgreSQL for production — when set, every subsystem shares it; mandatory when `AIFACTORY_PROD=1`. Non-postgres values fail at startup in production. | |
| AIFACTORY_PROD | No | `1` puts every money gate on the production path (on-chain verification required, fail-closed defaults). | |
| AIMARKET_DB_PATH | No | The hub index database. It no longer overrides a path a subsystem passes explicitly; a subsystem that must share the hub file now points its own variable at it. | data/hub.db |
| AIMARKET_HUB_URL | No | Public URL of the hub (used in receipts and well-known documents). Mandates also name it in their audience. | http://localhost:9083 |
| AIMARKET_HUB_NAME | No | Display name in manifests. | AIMarket Hub |
| AIMARKET_SEED_LIST | No | Comma-separated peer `.well-known` URLs; unset falls back to the shipped seed file, not to "no seeds". | |
| AIMARKET_ADMIN_TOKEN | No | Operator token. Unset ⇒ every admin route refuses (`503`), fail-closed. Same token gates the /operator desk. | |
| AIMARKET_AGENT_TOKENS | No | `agent-a:secretA,…` — per-agent credentials for self-bond/reporting and wallet-bound lottery entitlements. | |
| AIMARKET_CORS_ORIGINS | No | Comma-separated allowlist. Empty means no cross-origin access (a `*` default enabled drive-by CSRF). | |
| AIMARKET_SEED_PUBKEYS | No | `{url:key}` JSON or `url=key,…` — trusted-on-first-contact only; rotating an existing DB pin requires `POST /federation/peers/repin`. | |
| AIMARKET_PAYMENT_CHAIN | No | Settlement chain (`AIMARKET_PAYMENT_CHAINS` for the advertised list). | base |
| AIMARKET_PAYMENT_TOKEN | No | Ledger settlement token (`AIMARKET_PAYMENT_TOKENS` advertises `USDT,USDC,ETH`). | USDC |
| AIMARKET_PUBLISH_TOKEN | No | Legacy shared token; not sufficient for production publisher identity. | |
| AIMARKET_APPEAL_SWEEP_S | No | Safety-net pass that finalizes expired windows and picks up filed appeals. | 30 |
| AIMARKET_MARKET_FEE_BPS | No | Operator share of a catalogue sale, paid without custody via a deployed MarketSplitter; off by default. | |
| AIMARKET_VERIFY_ENABLED | No | Pay-on-Verified master switch (per-invoke opt-in still required). | 1 |
| AIFACTORY_CRYPTO_ENABLED | No | Master crypto switch: off ⇒ channels/escrow/NFT disabled, capabilities served free; signing and sandbox trials keep working. | 0 |
| AIMARKET_APPEAL_WINDOW_S | No | Appeals: seconds a genuine paid verdict stays provisional and appealable by the losing party. `0` = off, verdicts move money at once. | 0 |
| AIMARKET_CREDITS_ENABLED | No | Set to `1` to enable the credits rail required for mandates and subcontracting. | |
| AIMARKET_FEDERATION_OPEN | No | Legacy switch for richer preview/admission behaviour; visibility is always on. | 0 |
| AIMARKET_MIN_TRUST_SCORE | No | Baseline trust floor (also the discover-gate default). | 0.3 |
| AIMARKET_ROUTING_FEE_BPS | No | Routing fee (1% = 100 bps). | 100 |
| AIMARKET_APPEAL_BOND_RATE | No | Appeal bond rate applied to the price; capped at the price. | 0.20 |
| AIMARKET_APPEAL_METIS_KEY | No | Appeal court bearer key. | |
| AIMARKET_APPEAL_METIS_URL | No | The appeal court: a second verifier. Unset, or equal to the first-instance URL, keeps appeals off. | |
| AIMARKET_CHANNELS_DB_PATH | No | Payment-channel ledger (separate file from the hub index). | data/channels.db |
| AIMARKET_CRAWL_INTERVAL_S | No | Federation crawl period. | 3600 |
| AIMARKET_ERC8004_AGENT_ID | No | ERC-8004 agent id for this hub, self-declared in the signed `/.well-known/ai-market.json` (alongside `_CHAIN`, `_NETWORK`, `_AGENT_URI`). | |
| AIMARKET_FEDERATION_ASSAY | No | Post-quarantine sandbox assay. | 1 |
| AIMARKET_PLUGIN_WHITELIST | No | Restrict loaded plugins. | |
| AIMARKET_PUBLISHER_TOKENS | No | `pub-a:secretA,pub-b:secretB` — per-publisher credentials for the stake/bond routes. | |
| AIMARKET_SIGNING_KEY_PATH | No | Path to the hub's Ed25519 signing key, e.g. `/var/lib/aimarket/hub_signing_key`. | |
| AIMARKET_VERIFY_METIS_KEY | No | Metis bearer key (falls back to `METIS_API_KEY`). | |
| AIMARKET_VERIFY_METIS_URL | No | Metis base URL (falls back to `METIS_URL`). | http://127.0.0.1:8080 |
| AIMARKET_ALLOW_DEMO_CREDIT | No | `1` credits a channel without on-chain verification (dev/demo). Outside production, without it, crediting fails closed. | |
| AIMARKET_APPEAL_MAX_WAIT_S | No | After this the court counts as indeterminate: the first verdict stands, the bond is returned (`0` = no limit). | 21600 |
| AIMARKET_ORACLE_FAMILY_URL | No | LUMEN trust oracle (falls back to `ARGUS_ORACLE_FAMILY_URL`). | https://oracles.modelmarket.dev/family |
| AIMARKET_PAYMENT_RECIPIENT | No | Required in production — the wallet deposits must pay. | |
| AIMARKET_VERIFY_MAX_WAIT_S | No | `0` = no verdict deadline; `>0` bounds resolution via policy. | 0 |
| AIMARKET_APPEAL_VERIFIER_ID | No | Names the appeal court in envelopes; must differ from `AIMARKET_VERIFY_VERIFIER_ID`. | metis.appeal@v1 |
| AIMARKET_VERIFY_FAIL_CLOSED | No | Indeterminate outcome ⇒ refund the buyer. Only an explicit `0/false/no/off` captures instead. | 1 |
| AIMARKET_VERIFY_VERIFIER_ID | No | Envelope `verifier` attribution when a non-Metis verifier serves the slot. | metis.verify@v1 |
| AIMARKET_ALLOW_LOCAL_PUBLISH | No | Set to `1` to allow local capability publishing (development only). | |
| AIMARKET_APPEAL_BOND_MIN_USD | No | Minimum appeal bond; bond = max(min, rate × price), capped at the price. | 0.02 |
| AIMARKET_CATALOG_MAX_STALE_S | No | Stop offering a peer's rows after this many seconds without a successful crawl; rows stay stored for recovery and can be inspected with include_stale=true. | 21600 |
| AIFACTORY_PAYMENT_VERIFY_STUB | No | `1` accepts any tx hash — development only. | 0 |
| AIMARKET_FEDERATION_JUDGE_KEY | No | Judge key; falls back to `OPENROUTER_API_KEY`. No key → manual Approve only. | |
| AIMARKET_FEDERATION_JUDGE_URL | No | OpenAI-compatible veto on sandbox evidence. Defaults to OpenRouter chat if a key exists. | |
| AIMARKET_SUPPLY_MIN_STAKE_USD | No | Stake required to publish. Default `25` in production, else `10` (`0` when relaxed). | |
| AIMARKET_VERIFY_MIN_PRICE_USD | No | Price floor — cheaper invokes are never verification-taxed. | 0.05 |
| AIMARKET_FEDERATION_AUTO_ADMIT | No | A `pass` sets `trusted` only with a judge token. Alias: `AIMARKET_FEDERATION_ASSAY_AUTO_TRUST`. | 1 |
| AIMARKET_SUPPLY_MAX_INPUT_KEYS | No | Top-level keys accepted in an invoke input. | 32 |
| AIMARKET_VERIFY_ENGINE_RETRIES | No | Re-runs after an engine-error envelope before policy applies. | 2 |
| AIMARKET_FEDERATION_JUDGE_MODEL | No | Judge model (MiniMax, same as the rest of the fleet). | minimax/minimax-m3 |
| AIMARKET_VERIFY_MAX_CONCURRENCY | No | Cap on simultaneous Metis calls across pending settlements. | 8 |
| AIMARKET_VERIFY_RETRY_BACKOFF_S | No | Initial transport-retry backoff (exponential, cap 300 s). | 5 |
| AIMARKET_VERIFY_SCORE_THRESHOLD | No | `verify_score` needed to capture the hold (a value outside 0.0–1.0 falls back to `0.7`). | 0.7 |
| AIMARKET_FEDERATION_PREVIEW_CAPS | No | Signature-verified preview of a pending peer's catalogue. | 1 |
| AIMARKET_SUPPLY_MIN_TRUST_INVOKE | No | Trust floor to be invoked. | 0.35 |
| AIMARKET_SUPPLY_PUBLISH_PER_HOUR | No | Publishes per publisher per hour. | 5 |
| AIMARKET_SUPPLY_SECURITY_RELAXED | No | `1` = dev bypass: zero minimum stake, no response-signature requirement, no slashing. | 0 |
| AIMARKET_SUPPLY_SLASH_COOLDOWN_S | No | At most one failure-driven slash per window; `0` disables the cool-down. | 3600 |
| AIMARKET_FEDERATION_ASSAY_REQUIRE | No | If `1`, human Approve refuses unless last assay is `pass`. | 0 |
| AIMARKET_FEDERATION_ASSAY_SANDBOX | No | Probe one public free capability (receipt must match advertised key). | 1 |
| AIMARKET_SUPPLY_PRODUCT_ALLOWLIST | No | Comma-separated `product_id` allowlist. | |
| AIMARKET_VERIFY_ATTEMPT_TIMEOUT_S | No | Per-attempt Metis HTTP timeout (> Metis 300 s server cap). | 330 |
| AIMARKET_FEDERATION_JUDGE_REQUIRED | No | If `1`, a judge error blocks auto-admit (also implied when auto-admit + key). | 0 |
| AIMARKET_SUPPLY_MIN_TRUST_DISCOVER | No | Trust floor to appear in discover. Default `AIMARKET_MIN_TRUST_SCORE` (`0.3`). | |
| AIFACTORY_PAYMENT_MIN_CONFIRMATIONS | No | Confirmations a deposit needs before it counts. | 2 |
| AIMARKET_SUPPLY_SLASH_DAILY_CAP_USD | No | Rolling 24 h cap on failure-driven slashing; `0` disables the cap. | 10 |
| AIMARKET_VERIFY_SETTLEMENTS_DB_PATH | No | Where `verified_settlements` lives — defaults to `AIMARKET_DB_PATH`, else `data/hub.db`; the orphaned-hold reaper reads it and refuses to release anything it cannot read. | |
| AIMARKET_CHANNEL_ANON_OPENS_PER_HOUR | No | One shared cap for all wallet-less opens (they are not exempt). | 200 |
| AIMARKET_FEDERATION_PREVIEW_MAX_CAPS | No | Per-peer preview cap. | 25 |
| AIMARKET_SUPPLY_MAX_INPUT_JSON_BYTES | No | Invoke input size cap. | 32768 |
| AIMARKET_SUPPLY_REQUIRE_RESPONSE_SIG | No | Require an Ed25519 provider response signature. On iff production and not relaxed. | |
| AIMARKET_CHANNEL_ALLOW_UNPROVEN_PAYER | No | `1` opts OUT of the payer proof-of-control requirement (transition only — leaves deposit front-running open). | 0 |
| AIMARKET_CHANNEL_ANON_CLOSES_PER_HOUR | No | Same, for closes. | 600 |
| AIMARKET_CHANNEL_HOLD_REAP_AFTER_SECS | No | Release a hold stuck `held` this long with no live verification; `0` disables the reaper. | 86400 |
| AIMARKET_SUPPLY_TRUST_GRAPH_MAX_EDGES | No | Trust-graph bound; truncation is logged with the publisher it affected. | 1000 |
| AIMARKET_VERIFY_COUNCIL_MIN_PRICE_USD | No | Route ceiling: `council` allowed at/above this price, else clamped to `fast`. | 0.50 |
| AIMARKET_SUPPLY_SLASH_FAILURE_WINDOW_S | No | Fault window (must be > 0; a non-positive value would disable slashing, so it falls back). | 600 |
| AIMARKET_SUPPLY_VERIFIED_FAIL_WINDOW_S | No | Window for those verdicts. | 86400 |
| AIMARKET_FEDERATION_GOSSIP_MAX_OBSERVED | No | Resource/fan-out bound for quarantined observed addresses. | 2000 |
| AIMARKET_SUPPLY_SLASH_FAILURE_THRESHOLD | No | Provider faults within the window before stake is slashed. | 3 |
| AIMARKET_SUPPLY_VERIFIED_FAIL_THRESHOLD | No | Paid Metis "failed" verdicts before escalation. | 3 |
| AIMARKET_SUPPLY_VERIFIED_FAIL_MIN_CONSUMERS | No | Distinct PAYING consumers required — one buyer's repeated failures are one voice. | 2 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| market_searchA | Search this hub's catalogue of live data and computation by what you need, in plain words. Each match gives the product_id, capability_id and source_hub to pass to market_invoke, its price, and |
| market_invokeA | Invoke a capability found via market_search. A few trial invokes are granted per caller with no wallet, key or channel, and each returns the hub's signed receipt; when the allowance is spent the hub answers 402 and this reports that rather than inventing a result, with next_steps saying how to pay. Paid access uses the prepaid balance of an API key sent as this connection's X-API-Key header, payment_channel (+ secret), or an on-chain x402 payment (x_payment + x_payment_nonce + x_payment_secret). |
| pipeline_prepareA | Validate a graph and return a signed quote and payment offers. No work or payment. Free steps require no wallet; paid steps require buyer wallet address. Use gas_mode=required to demand gas sponsorship or auto to prefer it. Inspect ready/blockers and gas_sponsorship. Sign offers LOCALLY, never provide a private key. Then call pipeline_invoke. |
| pipeline_invokeA | Execute or continue the SAME prepared graph. Submit authorizations when the signed quote enables gas_sponsorship, otherwise buyer-signed transactions; none for free steps. Never submit both payment modes. Retain run_id/access_token and the exact bundle. Pending is not failure; repeat the same run or read pipeline_status. Never create a replacement purchase after a lost response. |
| pipeline_statusA | Read an existing pipeline, including cached signed result, without broadcasting payments or invoking providers. No wallet signer or blockchain RPC required. Inspect recovery.action for unresolved work. |
| pipeline_refund_prepareA | Prepare a cash refund for a verified paid step of a finished pipeline. This moves no money. The original seller must approve the exact EIP-3009 authorization locally; never send a private key. Refunds require seller cooperation and a configured gas sponsor. |
| pipeline_refundA | Submit the original seller's refund authorization or resume the SAME refund. The recipient is the original buyer, amount is the paid step price, and the sponsor pays gas. Preserve the exact authorization after a lost response. Returns a separately signed credit note; the original bill is unchanged. |
| pipeline_refund_statusB | Read the saved cash-refund status and signed credit note without broadcasting a transaction. No private key or RPC is required. Pending means resume the same refund, never send a replacement transfer. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
market_search vs market_invoke and the three pipeline_* tools have clearly distinct actions, and the refund trio is likewise separable. The only friction is that pipeline_refund_prepare vs pipeline_prepare and pipeline_refund_status vs pipeline_status look similar at a glance, but descriptions make the boundary clear.
All names are snake_case with a consistent prefix_action shape (market_*, pipeline_*, pipeline_refund_*). The addition of _status and _refund_* variants is slightly irregular but still fully predictable and readable.
Eight tools is well-scoped: two for marketplace discovery/invocation and three each for the pipeline and refund lifecycles, with no redundant entries.
The surface covers search, invoke, and full prepare/invoke/status lifecycles for both pipelines and refunds, with clear recovery via status tools. Gaps are minor (no listing of a caller's runs/purchases or explicit cancellation), which agents can largely work around.