agentsupply

2026-04-02

How AI Agents Buy Their Own Compute

A deep dive into the mechanics of autonomous agent purchasing — API keys, credits, and zero-touch provisioning.

How AI Agents Buy Their Own Compute

The idea sounds weird at first: an AI agent, autonomously purchasing a server. No human clicking "Deploy." No approval workflow. Just an API call and a credit card on file.

But this is exactly how agent infrastructure needs to work. Agents operate at machine speed. If they need a VPS to run a build, test a deployment, or host a service, waiting for a human to provision it defeats the purpose of having an agent in the first place.

Here's how it actually works on Agent Supply.

The Trust Model

Agent Supply separates the human and agent responsibilities cleanly:

Humans handle money and access. You create an account, add credits, set spending caps, and generate API keys. You decide how much your agent can spend and revoke access anytime.

Agents handle procurement. With an API key and a credit balance, the agent can browse products, compare pricing, and place orders. No human approval step. The spending cap is your safety net.

This is the same model you use with any employee or contractor: set a budget, delegate the work, review the receipts.

The Agent's Workflow

When an agent needs infrastructure, here's what happens:

Step 1: Read the Skill File

The agent fetches the skill file, which describes the entire API surface in a format optimized for LLM consumption:

curl https://www.agentsply.com/skill.md

This returns a structured document that tells the agent: here's how to authenticate, here are the endpoints, here are the product types, here's how ordering works. One read, full context.

Step 2: Check the Budget

Before buying anything, a well-behaved agent checks its credit balance:

curl -H "Authorization: Bearer as_your_api_key" \
  https://www.agentsply.com/api/v1/account/balance
{
  "ok": true,
  "data": {
    "credits": 5000
  }
}

5000 credits = $50.00. Enough for a few hundred hours of VPS time.

Step 3: Browse Products

The agent lists available products to find what it needs:

curl -H "Authorization: Bearer as_your_api_key" \
  https://www.agentsply.com/api/v1/products

The response includes product slugs, names, base prices in credits, and config schemas describing what options are available (regions, instance types, duration).

Step 4: Place an Order

The agent places an order with an idempotency key to prevent duplicate purchases:

curl -X POST \
  -H "Authorization: Bearer as_your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: build-server-run-42" \
  https://www.agentsply.com/api/v1/orders \
  -d '{
    "product": "vps",
    "config": {
      "region": "us-east-1",
      "type": "t4g.micro",
      "duration_hours": 2
    }
  }'

Credits are deducted atomically. If the balance is too low, the order fails immediately — no partial charges, no pending states.

Step 5: Poll and Get Credentials

The order starts as status: "pending". The agent polls GET /orders/:id until status becomes "fulfilled" and instance_status becomes "running". Then it fetches credentials:

curl -H "Authorization: Bearer as_your_api_key" \
  https://www.agentsply.com/api/v1/orders/ord_abc123/credentials

The response includes SSH credentials — host, port, username, and a private key. The agent can connect and start working immediately. No human hand-off required.

Why Idempotency Matters

Agents retry things. Network calls fail. LLMs sometimes repeat actions. Without idempotency, an agent could accidentally buy three servers when it only wanted one.

Every order on Agent Supply requires an Idempotency-Key header. Same key = same result. If the agent retries with the same key, it gets back the original order — no duplicate charge. If it genuinely needs a new server, it uses a new key.

This is the same pattern Stripe uses, and for the same reason: programmatic clients need safe retries.

Why Credits Instead of Subscriptions

Agents don't think in monthly billing cycles. They think in tasks: "I need a server for 2 hours to run this build." Credits map naturally to this model:

  • Predictable: 1 credit = 1 cent. No variable pricing, no surge fees.
  • Bounded: spending caps prevent runaway costs.
  • Immediate: balance checks are instant. No invoice surprises.
  • Granular: pay for exactly what you use, down to the hour.

What This Enables

When agents can buy their own compute, new workflows become possible:

  • Self-scaling pipelines: an agent spins up workers as needed, tears them down when done
  • Exploratory research: an agent provisions test environments to validate hypotheses
  • Continuous deployment: an agent manages staging servers for every PR
  • Multi-region testing: an agent launches instances across regions to test latency

The human sets the budget and the goals. The agent handles the rest.

Try It

Set up your account at agentsply.com, check the pricing, and read the docs for the full API reference. Give your agent an API key and watch it work.