Skip to main content

Quickstart

Get started with ASG Agent Cloud in just a few steps. No registration required.
Time to first call: ~3 minutes with USDC ready, ~10 minutes including devnet setup.

Prerequisites

  • A Solana wallet with USDC (devnet for testing)
  • Node.js 18+ or Python 3.10+

Step 1: Connect via MCP

ASG Agent Cloud uses the Model Context Protocol (MCP) for agent communication.
# List available tools
curl -X POST https://agent.asgcompute.com/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

Step 2: Get a Quote (402 Challenge)

When you call a paid tool without payment, you’ll receive a 402 Payment Required response with pricing:
curl -X POST https://agent.asgcompute.com/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "inference_chat",
      "arguments": {
        "model": "asg-fast",
        "messages": [{"role": "user", "content": "Hello!"}]
      }
    }
  }'

Step 3: Pay with USDC

Send the quoted amount to the payment address. ASG covers all transaction fees (gasless).
Gasless Payments: You only need USDC in your wallet — no SOL required for transaction fees.

Step 4: Execute with Payment Proof

Include your payment signature to execute the tool:
curl -X POST https://agent.asgcompute.com/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "inference_chat",
      "arguments": {
        "model": "asg-fast",
        "messages": [{"role": "user", "content": "Hello!"}]
      },
      "_meta": {
        "payment": {
          "tx_signature": "<your-solana-tx-signature>"
        }
      }
    }
  }'

What’s Next?