# Provision Stack

> The infrastructure execution layer for autonomous software engineers.
> Agents request outcomes ("deploy a production web application") and receive
> verified infrastructure on their own cloud account (AWS, GCP, Azure, or
> Oracle), paid via metered microtransactions. Failed deployments are free.
> The provider bills the customer's own cloud account — the platform never
> absorbs cloud fees.

## Endpoints

- MCP (Streamable HTTP, 12 tools): https://api.provision-stack.com/mcp
- REST API: https://api.provision-stack.com/api/v1
- **Free sandbox** (mock infra, free billing, no signup needed):
  https://sandbox.provision-stack.com (+ /mcp)
- OpenAPI 3.1: https://api.provision-stack.com/openapi.json
- Agent card (A2A): https://api.provision-stack.com/.well-known/agent.json
- Capability manifest: https://api.provision-stack.com/api/v1/capabilities
- Health: https://api.provision-stack.com/health

## Quickstart (agent, sandbox — free, no cloud account needed)

1. Create a token: POST https://api.provision-stack.com/auth/tokens {"agentId":"my-agent","scopes":[]}
2. Top up sandbox credits: POST https://api.provision-stack.com/api/v1/billing/topup/sandbox {"amountUsd":25}
3. Suggest tiers: POST https://api.provision-stack.com/api/v1/suggestions {"outcome":"...","region":"us-east-1"}
4. Quote: POST https://api.provision-stack.com/api/v1/quote {"outcome":"...","region":"us-east-1","tier":"starter"}
5. Deploy: POST https://api.provision-stack.com/api/v1/deployments {"quoteId":"q-..."}
6. Poll: GET https://api.provision-stack.com/api/v1/deployments/:id until status=active (verification included)
7. Destroy when done: DELETE https://api.provision-stack.com/api/v1/deployments/:id (free)

## Guided flow (MCP tools)

detect_providers → generate_suggestions (optional provider) → present tiers →
user picks → deploy → (402? top_up and retry) → poll get_deployment_status →
verified outcome.

Tools: generate_suggestions, get_pricing, list_credentials, detect_region,
detect_providers, deploy, get_deployment_status, destroy, list_deployments,
teardown_latest, get_balance, top_up.

Providers: aws · gcp · azure · oracle

## Pricing (platform fees, USD)

- Suggestions / pricing / balance / destroy: free
- Quote: $0.01 · Deployment status/list: $0.001
- Deployment: $5.00 held from balance, captured only after verification passes
  (failed deployments are free)
- Sandbox (demo mode): everything free
- Customer maxMonthlyCostUsd cap honored at suggest/quote/deploy

## Payments

- XRP testnet (agents): POST /api/v1/billing/topup/xrp {"amountUsd":20}
  → deposit address; credited automatically on ledger confirmation.
- Stripe (humans): POST /api/v1/billing/topup/stripe {"amountUsd":20}
  → Checkout URL.
- HTTP 402 responses include machine-readable top-up instructions.

## Docs

- Guides + billing + credentials: https://docs.provision-stack.com
- Share your deployment: https://docs.provision-stack.com/share.html
- Launch plan + decisions: see /api/v1/capabilities constraints
- Support: escalation contact in error payloads
