Stip
agent skillHand this to an agent: pay APIs under the human's Stip policy. The agent EOA signs EIP-3009. Stip never takes custody. Never paste a seed or private key into a chat.
The human has a paid seat and a policy (agent, caps, allowlist, expiry). An API returns HTTP 402. Charge native Circle USDC only, and only to a payTo on the allowlist.
Import from lib/client/agent.ts. Load the agent key from local env — the human keeps it. A short local script is scripts/demo-agent.ts. Pass operator so paidFetch dry-runs Stip policy before signing. A single-network 402 (Tavily on Base) needs no preferredNetwork. Dual-network Stip dummy still defaults to Avalanche C-Chain; set preferredNetwork to eip155:8453 to pick Base.
import { paidFetch } from "../lib/client/agent";
const key = process.env.AGENT_PRIVATE_KEY as `0x${string}`;
const { response, settlement } = await paidFetch(
"https://example.com/paid",
{ method: "GET" },
{
privateKey: key,
operator: process.env.STIP_OPERATOR,
fundingUrl: "https://usestip.com/fund",
},
);- Read the policy caps and allowlist. Stop if PAUSED, REVOKED, or EXPIRED.
- Fund the agent EOA with native USDC on Avalanche C-Chain or Base. Not USDC.e, not USDT, not Stip.
- Call the API with paidFetch. On 402 it checks policy, then signs and retries.
- On OVER_PER_TX, OVER_DAILY, PAYTO_NOT_ALLOWED, AGENT_MISMATCH, or BAD_ASSET: stop and show the human the code. Do not spend off the allowlist.
Home · Operator desk · Charge an API · Terms