Xenodia Docs
Capability Marketplace

Governance And Billing

Billing, idempotency, availability, health, and review rules for Xenodia marketplace capabilities.

Capabilities run through Xenodia's existing account, credit, and audit layer. Agents do not pay providers directly at invoke time; they call Xenodia, Xenodia reserves or charges credit, and the call is logged with capability-specific dimensions.

Billing Modes

Capability descriptors expose funding_modes. Current modes can include:

ModeMeaning
owner_onlyCharge the owner account.
self_onlyCharge the calling account.
self_then_ownerPrefer self-funded credit, then fall back to owner-funded credit when policy allows.

The response billing object shows the actual actor and payer selected for a call.

Price Units

Prices use micro USDC:

ValueMeaning
10.000001 USDC
100000.01 USDC
10000001 USDC

For multi-operation capabilities, read operations[].pricing.unit_price_micro_usdc. Root-level pricing may be omitted from list responses when operations have distinct prices.

Funds And Failure Behavior

The capability runtime distinguishes between blocked calls and admitted calls:

CaseFunds behavior
Hidden, disabled, unpublished contract, contract drift, or runtime not ready before invokeNo funds are locked.
Provider becomes unavailable after funds are reservedReserved funds are released when execution fails.
Successful admitted paid callActual amount is committed in the billing summary.
Idempotent replayThe stored result is returned without double-charging the same intent.

Idempotency Policy

Require Idempotency-Key for:

  • Paid operations.
  • Async operations.
  • Operations with idempotency_key_required: true.

Agents should use deterministic retry keys for the same user intent and different keys for new user intents. A conflicting payload returns 409 idempotency_conflict.

Availability States

StateMeaning
activeListing, detail, and invoke are allowed.
hiddenCapability should not be visible to consumers.
disabledCapability is intentionally unavailable.
not_configuredRuntime adapter or execution path is missing.
contract_unpublishedA versioned runtime snapshot has not been published yet.
contract_driftRuntime contract differs from the frozen snapshot.
suppressedHealth checks are suppressing new traffic.

Blocked responses include reason, retryable, effective_status, and no_funds_locked when available.

Health And Suppression

Provider health checks can suppress new traffic without hiding the documentation. Some helper operations may remain allowed while the main operation is suppressed so agents can inspect freshness and coverage.

Agents should treat suppressed or degraded health as a trust signal, not just a retry condition.

Audit Fields

Capability calls are recorded with capability-specific dimensions:

FieldPurpose
request_idIdempotent request and billing correlation.
modelStored as capability/{slug} for gateway call records.
capability_slugCapability identifier.
capability_operationOperation identifier.
capability_versionPublished contract version.
execution_modesync or async.
actorCalling account.
payerCharged account.
blocked_before_invokeWhether the call was rejected before funds were locked.

Review Rules

A capability should not become consumer-visible unless:

  • It has a versioned contract snapshot.
  • Runtime readiness checks pass.
  • Pricing is visible before invoke.
  • Paid operations require idempotency.
  • Health failures do not silently charge users.
  • Provider-facing names do not expose private routing internals.
  • Agent docs explain the safest flow in operational language.

このページ