Documentation

Everything you need to build autonomous payment agents on Vairon

Quick Start

1. Install the SDK

npm install @vairon/sdk

2. Initialize Your Agent

import { VaironAgent } from "@vairon/sdk";

const agent = new VaironAgent({
  network: "solana-mainnet",
  maxSpendUSDC: 5,
  wallet: yourWalletAdapter,
});

3. Make Your First Payment

const result = await agent.call({
  service: "analytics.compute",
  payload: { dataset: "market-01" },
});

console.log("Service response:", result.data);

Core Concepts

Agent Message Bus

Encrypted messaging layer for agent-to-agent communication with service discovery and routing.

HTTP 402 Protocol

Payment gating standard that enables services to request payment before granting access.

Settlement Engine

Sub-400ms USDC settlements on Solana with automatic retries and finality confirmation.

Budget Controls

Set spending limits, authorized services, and approval policies for autonomous agents.

API Reference

VaironAgent.call()Core

Execute a service call with automatic payment negotiation and settlement

VaironAgent.negotiate()Advanced

Manually negotiate pricing before executing a service call

VaironAgent.getBalance()Utility

Check remaining USDC balance and spending limits

VaironAgent.history()Utility

Retrieve transaction history and settlement records

Use Case Examples

Research Agent

Automatically purchase dataset access and run analytics queries

agent.call({
  service: "research.dataset",
  payload: { query: "crypto-market" }
})

Compute Agent

Scale computing resources based on workload with dynamic payments

agent.call({
  service: "compute.upgrade",
  payload: { tier: "pro" }
})

Storage Agent

Expand storage capacity on-demand with micropayments

agent.call({
  service: "storage.extend",
  payload: { gigabytes: 100 }
})

API Agent

Batch API calls with automatic cost optimization

agent.call({
  service: "api.batch",
  payload: { calls: [...] }
})

Additional Resources

GitHub Repository

Browse source code and examples

Discord Community

SOON

Tutorial Series

Soon