{"_id":"@agent-pulse/sdk","_rev":"2-d219f3d6c0cda51f010eaeafdfa754f0","name":"@agent-pulse/sdk","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@agent-pulse/sdk","version":"0.2.0","keywords":["agent-pulse","liveness","agents","ai-agents","base","ethereum","on-chain","x402","micropayments","heartbeat","uptime","reliability","sdk","web3"],"author":{"name":"Consensus HQ","email":"eng@consensus.so"},"license":"MIT","_id":"@agent-pulse/sdk@0.2.0","maintainers":[{"name":"consensuscli","email":"openclaw@consensus.run"}],"homepage":"https://agent-pulse-nine.vercel.app","bugs":{"url":"https://github.com/consensus-hq/agent-pulse/issues"},"dist":{"shasum":"e82b45ad9225525135896a5f225634475bdfd25c","tarball":"https://registry.npmjs.org/@agent-pulse/sdk/-/sdk-0.2.0.tgz","fileCount":7,"integrity":"sha512-SF2zNzOeXTR6fbQTxM3nftWzHO0YMikqNDq5FDT5E138quF5GWtKtraSvELsAXPyduhctLmiAuTSNrwYgCUoCQ==","signatures":[{"sig":"MEYCIQCnkbDQbzmiN4+TzKTuCoT/UNFWg5hZofUPGEJgl55LEAIhAKOmJJERVhf422zPZOnWCN2n6M9zCLlM42XIGfpEu8u1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":141344},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"76f40c1010a7e828ec219cd3b4646903915acf85","scripts":{"dev":"tsup src/index.ts --format esm,cjs --dts --watch","lint":"eslint src --ext .ts","test":"vitest run","build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"consensuscli","email":"openclaw@consensus.run"},"repository":{"url":"git+https://github.com/consensus-hq/agent-pulse.git","type":"git","directory":"packages/sdk"},"_npmVersion":"10.9.4","description":"TypeScript SDK for Agent Pulse — the on-chain liveness protocol for autonomous AI agents on Base. One-line alive checks, x402 micropayments, bidirectional gating.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"viem":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","vitest":"^1.0.0","typescript":"^5.3.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.2.0_1770510278382_0.0911253286505691","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@agent-pulse/sdk","version":"0.2.1","description":"TypeScript SDK for Agent Pulse — the on-chain liveness protocol for autonomous AI agents on Base. One-line alive checks, x402 micropayments, bidirectional gating.","type":"module","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","dev":"tsup src/index.ts --format esm,cjs --dts --watch","test":"vitest run","test:watch":"vitest","lint":"eslint src --ext .ts","typecheck":"tsc --noEmit"},"dependencies":{"viem":"^2.0.0"},"devDependencies":{"@types/node":"^20.0.0","tsup":"^8.0.0","typescript":"^5.3.0","vitest":"^4.0.0"},"keywords":["agent-pulse","liveness","agents","ai-agents","base","ethereum","on-chain","x402","micropayments","heartbeat","uptime","reliability","sdk","web3"],"license":"MIT","author":{"name":"Consensus HQ","email":"eng@consensus.so"},"homepage":"https://agent-pulse-nine.vercel.app","repository":{"type":"git","url":"git+https://github.com/consensus-hq/agent-pulse.git","directory":"packages/sdk"},"bugs":{"url":"https://github.com/consensus-hq/agent-pulse/issues"},"engines":{"node":">=18.0.0"},"sideEffects":false,"_id":"@agent-pulse/sdk@0.2.1","gitHead":"6426e3445e830e80a39ce72bec20266f61a85d23","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-9Qt2Jsu2GbbdGmYSptPeMdBEdE5xqw2B2BqK8pkSAbGr7JZ1FSo7cBzpzyjy75NknB7sjUpcayTA+V4NfYDzCg==","shasum":"46af3eb521f82fb542e918c8e8923e361e30a073","tarball":"https://registry.npmjs.org/@agent-pulse/sdk/-/sdk-0.2.1.tgz","fileCount":7,"unpackedSize":141635,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGg557hwabWmfSFSuHydSH5wPCUH7WIpPQDPUKeR93eWAiBbzZdsf99opP/KcO6lmt+PZFhUqKdN1dm3rttS9T9RvQ=="}]},"_npmUser":{"name":"consensuscli","email":"openclaw@consensus.run"},"directories":{},"maintainers":[{"name":"consensuscli","email":"openclaw@consensus.run"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.2.1_1770520020672_0.6753879836584127"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-08T00:24:38.323Z","modified":"2026-02-08T03:07:01.005Z","0.2.0":"2026-02-08T00:24:38.586Z","0.2.1":"2026-02-08T03:07:00.882Z"},"bugs":{"url":"https://github.com/consensus-hq/agent-pulse/issues"},"author":{"name":"Consensus HQ","email":"eng@consensus.so"},"license":"MIT","homepage":"https://agent-pulse-nine.vercel.app","keywords":["agent-pulse","liveness","agents","ai-agents","base","ethereum","on-chain","x402","micropayments","heartbeat","uptime","reliability","sdk","web3"],"repository":{"type":"git","url":"git+https://github.com/consensus-hq/agent-pulse.git","directory":"packages/sdk"},"description":"TypeScript SDK for Agent Pulse — the on-chain liveness protocol for autonomous AI agents on Base. One-line alive checks, x402 micropayments, bidirectional gating.","maintainers":[{"name":"consensuscli","email":"openclaw@consensus.run"}],"readme":"<p align=\"center\">\n  <strong>@agent-pulse/sdk</strong> 💓\n</p>\n\n<p align=\"center\">\n  TypeScript SDK for <b>Agent Pulse</b> — the on-chain liveness protocol for autonomous AI agents on Base.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@agent-pulse/sdk\"><img src=\"https://img.shields.io/npm/v/@agent-pulse/sdk?color=brightgreen\" alt=\"npm version\"></a>\n  <a href=\"https://www.npmjs.com/package/@agent-pulse/sdk\"><img src=\"https://img.shields.io/npm/dm/@agent-pulse/sdk\" alt=\"npm downloads\"></a>\n  <a href=\"https://github.com/consensus-hq/agent-pulse/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-blue\" alt=\"License\"></a>\n  <a href=\"https://www.typescriptlang.org/\"><img src=\"https://img.shields.io/badge/TypeScript-5.3+-blue?logo=typescript&logoColor=white\" alt=\"TypeScript\"></a>\n  <a href=\"https://base.org\"><img src=\"https://img.shields.io/badge/Base-mainnet-0052FF?logo=ethereum&logoColor=white\" alt=\"Base Chain\"></a>\n</p>\n\n---\n\n## Why Agent Pulse?\n\nOrchestrators route work to agents blind — no way to know if the target is online, responsive, or real. Agent Pulse fixes this: agents burn PULSE tokens to prove liveness on-chain, and anyone can verify for free with a single call.\n\n**Free:** `isAlive(address)` — binary liveness, streak, staleness.  \n**Paid:** Reliability scores, uptime heatmaps, peer reputation — via [x402](https://www.x402.org/) micropayments (USDC on Base).\n\n---\n\n## Installation\n\n```bash\nnpm install @agent-pulse/sdk\n```\n\n```bash\npnpm add @agent-pulse/sdk\n```\n\n```bash\nyarn add @agent-pulse/sdk\n```\n\n> **Peer dependency:** `viem ^2.0.0` (installed automatically).\n\n---\n\n## Quick Start — 5 Lines to Check if an Agent Is Alive\n\n```typescript\nimport { AgentPulse } from \"@agent-pulse/sdk\";\n\nconst pulse = new AgentPulse();\nconst alive = await pulse.isAlive(\"0x9508752Ba171D37EBb3AA437927458E0a21D1e04\");\nconsole.log(alive ? \"💓 Agent is alive\" : \"💀 Agent is dead\");\n```\n\nThat's it. No API key. No wallet. No config. The SDK reads directly from the Base mainnet PulseRegistry contract.\n\n---\n\n## Core Concepts\n\n### 1. Liveness (Free — On-Chain Reads)\n\nEvery agent that integrates Agent Pulse calls `pulse()` periodically, burning PULSE tokens. The PulseRegistry records each pulse timestamp. If an agent's last pulse is within the TTL window (default 24 hours), it's alive.\n\n```typescript\nconst pulse = new AgentPulse();\n\n// Binary check\nconst alive = await pulse.isAlive(\"0x...\");\n\n// Full status (streak, hazard score, TTL)\nconst status = await pulse.getStatus(\"0x...\");\nconsole.log(`Streak: ${status.streak} days | Hazard: ${status.hazardScore}`);\n```\n\n### 2. Pulsing (On-Chain Write — Requires PULSE Tokens)\n\nAgents prove liveness by calling `pulse()`, which burns 1 PULSE token and updates their on-chain record.\n\n```typescript\nconst pulse = new AgentPulse({\n  wallet: {\n    address: \"0xYourAgentAddress\",\n    privateKey: \"0xYourPrivateKey\",\n  },\n});\n\nconst { txHash, streak } = await pulse.beat();\nconsole.log(`💓 Pulsed! tx: ${txHash} | streak: ${streak}`);\n```\n\n> **Requirements:** Your agent address needs PULSE tokens (available on [Uniswap V4 / Base](https://dexscreener.com/base/0x21111B39A502335aC7e45c4574Dd083A69258b07)) and a small amount of ETH on Base for gas.\n\n### 3. Gating (Bidirectional Liveness Checks)\n\nProtect your agent by requiring proof-of-life from peers before interacting.\n\n```typescript\nconst pulse = new AgentPulse();\nconst gate = pulse.createGate({\n  mode: \"strict\",       // \"strict\" | \"warn\" | \"log\"\n  gateIncoming: true,   // reject requests from dead agents\n  gateOutgoing: true,   // refuse to call dead agents\n  threshold: \"24h\",     // custom liveness window\n});\n\n// In your request handler:\ntry {\n  await gate.checkInbound(requesterAddress);\n  // Agent is alive — proceed\n} catch (err) {\n  // err.error === \"PULSE_REQUIRED\"\n  return res.status(403).json(err);\n}\n```\n\n### 4. Paid Insights via x402 (USDC Micropayments)\n\nAdvanced analytics endpoints are protected by the [x402 payment protocol](https://www.x402.org/). When you call a paid endpoint, the SDK:\n\n1. Makes the initial request → receives `402 Payment Required`\n2. Parses the x402 challenge (price, recipient, asset)\n3. Signs a USDC `transferWithAuthorization` (EIP-3009) — no approve tx needed\n4. Retries the request with the `X-Payment` header\n5. Server settles via Thirdweb facilitator → you get data\n\n```\nAgent SDK                    Agent Pulse API              Thirdweb Facilitator\n    │                              │                              │\n    ├─── GET /reliability ────────►│                              │\n    │◄── 402 + x402 challenge ─────┤                              │\n    │                              │                              │\n    ├─── sign USDC EIP-3009 ──────►│                              │\n    │    (X-Payment header)        ├─── settle payment ──────────►│\n    │                              │◄── payment confirmed ────────┤\n    │◄── 200 + reliability data ───┤                              │\n```\n\n```typescript\nconst pulse = new AgentPulse({\n  wallet: {\n    address: \"0x...\",\n    signMessage: async (msg) => wallet.signMessage(msg),\n  },\n  x402: {\n    serverWalletAddress: \"0xdf42EC5803518b251236146289B311C39EDB0cEF\",\n  },\n});\n\nconst reliability = await pulse.getReliability(\"0x...\");\nconsole.log(`Score: ${reliability.score}/100`);\n```\n\n### 5. Peer Attestation (On-Chain Reputation)\n\nAgents can vouch for each other's behavior. The PeerAttestation contract records success/failure/timeout outcomes, building an on-chain reputation.\n\n```typescript\n// Wrap any inter-agent call with automatic attestation\nconst result = await pulse.getClient().attestation.withAttestation(\n  \"0xTargetAgent\",\n  async () => {\n    return await callAgent(\"0xTargetAgent\", task);\n  },\n  { timeoutMs: 30000 }\n);\n// ✅ success → positive attestation recorded on-chain\n// ❌ failure → negative attestation recorded on-chain\n// ⏱ timeout → timeout attestation recorded on-chain\n```\n\n---\n\n## API Reference\n\n### `AgentPulse` — Main Class\n\nThe simplified entry point. Wraps `AgentPulseClient` for common operations.\n\n```typescript\nimport { AgentPulse } from \"@agent-pulse/sdk\";\nconst pulse = new AgentPulse(config?: AgentPulseClientConfig);\n```\n\n| Method | Returns | Cost | Description |\n|--------|---------|------|-------------|\n| `pulse.beat()` | `Promise<PulseResponse>` | PULSE token + gas | Send a heartbeat (burns 1 PULSE) |\n| `pulse.pulse(amount?)` | `Promise<PulseResponse>` | PULSE token + gas | Send pulse with custom amount |\n| `pulse.isAlive(address)` | `Promise<boolean>` | **Free** | Binary liveness check (on-chain) |\n| `pulse.getStatus(address)` | `Promise<AgentStatus>` | **Free** | Full status: alive, streak, hazard, TTL |\n| `pulse.getReliability(address)` | `Promise<ReliabilityScore>` | $0.01 USDC | Reliability score 0-100 |\n| `pulse.getLivenessProof(address)` | `Promise<LivenessProof>` | $0.005 USDC | Signed liveness proof |\n| `pulse.getGlobalStats()` | `Promise<GlobalStats>` | $0.03 USDC | Protocol-wide statistics |\n| `pulse.getPeerCorrelation(address)` | `Promise<PeerCorrelation>` | $0.02 USDC | Peer cluster analysis |\n| `pulse.getConfig()` | `Promise<ProtocolConfig>` | **Free** | Contract addresses, chain config |\n| `pulse.getHealth()` | `Promise<ProtocolHealth>` | **Free** | Protocol health status |\n| `pulse.getBalance(address?)` | `Promise<bigint>` | **Free** | PULSE token balance (on-chain) |\n| `pulse.getClient()` | `AgentPulseClient` | — | Access underlying client |\n| `pulse.createGate(options?)` | `AgentPulseGate` | — | Create a liveness gate |\n\n### `AgentPulseClient` — Full Client\n\nLower-level client with direct access to all protocol operations.\n\n```typescript\nimport { AgentPulseClient } from \"@agent-pulse/sdk\";\nconst client = new AgentPulseClient(config?: AgentPulseClientConfig);\n```\n\n**Additional methods beyond AgentPulse:**\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `client.getAgentStatus(address)` | `Promise<AgentStatus>` | Full on-chain agent status |\n| `client.getProtocolConfig()` | `Promise<ProtocolConfig>` | Protocol configuration from API |\n| `client.getProtocolHealth()` | `Promise<ProtocolHealth>` | Protocol health from API |\n| `client.getAllowance(owner?)` | `Promise<bigint>` | PULSE allowance for PulseRegistry |\n| `client.attestation.attest(addr, outcome)` | `Promise<AttestResponse>` | Submit peer attestation |\n| `client.attestation.getReputation(addr)` | `Promise<Reputation>` | Get reputation (paid) |\n| `client.attestation.getAttestations(addr)` | `Promise<AttestationList>` | List attestations (paid) |\n| `client.attestation.withAttestation(addr, fn)` | `Promise<T>` | Auto-attest wrapper |\n\n### `AgentPulseGate` — Bidirectional Gating\n\n```typescript\nconst gate = new AgentPulseGate(client, options?: GateOptions);\n```\n\n| Method | Returns | Description |\n|--------|---------|-------------|\n| `gate.checkInbound(address)` | `Promise<void>` | Check requester liveness (throws `PulseRequiredError` in strict mode) |\n| `gate.checkOutbound(address)` | `Promise<void>` | Check target liveness before calling |\n| `gate.status()` | `GateStatus` | Current gate stats (mode, rejection counts) |\n| `gate.setThreshold(threshold)` | `void` | Update liveness threshold |\n\n**Gate Modes:**\n\n| Mode | Dead Agent Behavior |\n|------|-------------------|\n| `\"strict\"` | Rejects with `PulseRequiredError` |\n| `\"warn\"` | Logs warning, allows through |\n| `\"log\"` | Silent log, always allows |\n\n### x402 Payment Utilities\n\n```typescript\nimport {\n  signX402Payment,\n  encodeX402PaymentHeader,\n  decodeX402PaymentHeader,\n  createTransferAuthorization,\n  priceToMicroUsdc,\n  microUsdcToPrice,\n  generateNonce,\n  X402PaymentHandler,\n} from \"@agent-pulse/sdk\";\n```\n\n| Function | Description |\n|----------|-------------|\n| `signX402Payment({ from, to, price, sign })` | Create a signed USDC transfer authorization for x402 |\n| `encodeX402PaymentHeader(auth)` | Base64-encode authorization for the `X-Payment` header |\n| `decodeX402PaymentHeader(header)` | Decode a base64 `X-Payment` header |\n| `createTransferAuthorization(params)` | Low-level EIP-3009 authorization creation |\n| `priceToMicroUsdc(price)` | Convert `\"$0.01\"` → `10000n` (6 decimals) |\n| `microUsdcToPrice(amount)` | Convert `10000n` → `\"$0.010000\"` |\n| `generateNonce()` | Random 32-byte hex nonce |\n\n### Types\n\n```typescript\nimport type {\n  AgentStatus,\n  AgentPulseClientConfig,\n  SDKConfig,\n  WalletConfig,\n  ProtocolConfig,\n  ProtocolHealth,\n  PulseParams,\n  PulseResponse,\n  ReliabilityScore,\n  LivenessProof,\n  GlobalStats,\n  PeerCorrelation,\n  TransferAuthorization,\n  GateMode,\n  GateOptions,\n  GateStatus,\n  PulseRequiredError,\n} from \"@agent-pulse/sdk\";\n```\n\n### Constants\n\n```typescript\nimport { DEFAULTS, ENDPOINT_PRICES, USDC_ADDRESSES, DEAD_ADDRESS } from \"@agent-pulse/sdk\";\n\nDEFAULTS.BASE_URL        // \"https://agent-pulse-nine.vercel.app\"\nDEFAULTS.CHAIN_ID        // 84532 (Base Sepolia — configure for Base mainnet)\nDEFAULTS.PULSE_TOKEN     // \"0x21111B39A502335aC7e45c4574Dd083A69258b07\"\nDEFAULTS.PULSE_REGISTRY  // \"0xe61C615743A02983A46aFF66Db035297e8a43846\"\nDEFAULTS.TTL_SECONDS     // 86400 (24 hours)\n\nENDPOINT_PRICES.RELIABILITY      // \"$0.01\"\nENDPOINT_PRICES.LIVENESS_PROOF   // \"$0.005\"\nENDPOINT_PRICES.GLOBAL_STATS     // \"$0.03\"\nENDPOINT_PRICES.PEER_CORRELATION // \"$0.02\"\n\nUSDC_ADDRESSES[8453]   // Base mainnet USDC\nUSDC_ADDRESSES[84532]  // Base Sepolia USDC\n\nDEAD_ADDRESS // \"0x000000000000000000000000000000000000dEaD\"\n```\n\n### Error Handling\n\n```typescript\nimport { AgentPulseError } from \"@agent-pulse/sdk\";\n\ntry {\n  await pulse.beat();\n} catch (err) {\n  if (err instanceof AgentPulseError) {\n    console.error(`[${err.code}] ${err.message}`);\n    // err.code: \"PAYMENT_REQUIRED\" | \"INVALID_ADDRESS\" | \"INSUFFICIENT_BALANCE\"\n    //           | \"TRANSACTION_FAILED\" | \"API_ERROR\" | \"NETWORK_ERROR\"\n    //           | \"TIMEOUT\" | \"NOT_IMPLEMENTED\" | \"UNKNOWN\"\n    // err.statusCode: HTTP status (if API error)\n    // err.cause: Original error\n  }\n}\n```\n\n---\n\n## Configuration\n\n```typescript\nconst pulse = new AgentPulse({\n  // API base URL (default: production)\n  baseUrl: \"https://agent-pulse-nine.vercel.app\",\n\n  // Chain ID: 8453 = Base Mainnet, 84532 = Base Sepolia\n  chainId: 8453,\n\n  // Custom RPC endpoint (optional — uses chain default otherwise)\n  rpcUrl: \"https://mainnet.base.org\",\n\n  // Contract overrides (optional — uses verified defaults)\n  contracts: {\n    pulseToken: \"0x21111B39A502335aC7e45c4574Dd083A69258b07\",\n    pulseRegistry: \"0xe61C615743A02983A46aFF66Db035297e8a43846\",\n  },\n\n  // Wallet for transactions (optional — only needed for pulse/attest/paid calls)\n  wallet: {\n    address: \"0x...\",\n    privateKey: \"0x...\",               // Direct signing\n    // OR\n    signMessage: async (msg) => \"0x...\", // External signer\n    signTypedData: async (...) => \"0x...\",\n  },\n\n  // x402 payment config (optional — only for paid endpoints)\n  x402: {\n    facilitatorUrl: \"https://api.thirdweb.com/v1/payments/x402\",\n    serverWalletAddress: \"0xdf42EC5803518b251236146289B311C39EDB0cEF\",\n  },\n});\n```\n\n---\n\n## Protocol Details\n\n### Contracts (Base Mainnet — All Verified on BaseScan)\n\n| Contract | Address |\n|----------|---------|\n| **PULSE Token** (Clanker V4) | [`0x21111B39A502335aC7e45c4574Dd083A69258b07`](https://basescan.org/address/0x21111B39A502335aC7e45c4574Dd083A69258b07) |\n| **PulseRegistryV2** | [`0xe61C615743A02983A46aFF66Db035297e8a43846`](https://basescan.org/address/0xe61C615743A02983A46aFF66Db035297e8a43846) |\n| **PeerAttestation** | [`0x930dC6130b20775E01414a5923e7C66b62FF8d6C`](https://basescan.org/address/0x930dC6130b20775E01414a5923e7C66b62FF8d6C) |\n| **BurnWithFee** | [`0xd38cC332ca9755DE536841f2A248f4585Fb08C1E`](https://basescan.org/address/0xd38cC332ca9755DE536841f2A248f4585Fb08C1E) |\n\n### Free API Endpoints\n\n| Endpoint | Description |\n|----------|-------------|\n| `GET /api/v2/agent/{address}/alive` | Binary liveness + staleness + streak |\n| `GET /api/status/{address}` | Full status with hazard score |\n| `GET /api/protocol-health` | Protocol health (KV, RPC, pause) |\n| `GET /api/config` | Chain config + contract addresses |\n\n### Paid API Endpoints (x402 — USDC on Base)\n\n| Endpoint | Price | Description |\n|----------|-------|-------------|\n| `GET /api/v2/agent/{address}/reliability` | $0.01 | Reliability score, tier, streak analysis |\n| `GET /api/v2/agent/{address}/streak-analysis` | $0.008 | Streak consistency, MTBD |\n| `GET /api/v2/agent/{address}/uptime-metrics` | $0.01 | Uptime heatmaps, historical availability |\n\n### How Pulsing Works\n\n```\nAgent → approve(PULSE, Registry) → PulseRegistryV2.pulse(amount)\n                                          │\n                                          ├── Burns PULSE to 0x...dEaD\n                                          ├── Updates lastPulseAt + streak\n                                          └── Emits PulseV2 event\n\nAnyone → PulseRegistryV2.isAlive(agent) → true/false (free read)\n```\n\n---\n\n## Badge & Status Embed\n\nUse the free alive endpoint to build status badges or monitoring dashboards:\n\n```bash\n# Check any agent (returns JSON)\ncurl https://agent-pulse-nine.vercel.app/api/v2/agent/0x9508752Ba171D37EBb3AA437927458E0a21D1e04/alive\n```\n\n```json\n{\n  \"address\": \"0x9508752ba171d37ebb3aa437927458e0a21d1e04\",\n  \"isAlive\": true,\n  \"lastPulseTimestamp\": 1770505235,\n  \"streak\": 1,\n  \"staleness\": 2641,\n  \"ttl\": 86400,\n  \"checkedAt\": \"2026-02-07T23:44:36.085Z\"\n}\n```\n\n**Markdown badge example:**\n\n```markdown\n![Agent Status](https://img.shields.io/endpoint?url=https://agent-pulse-nine.vercel.app/api/v2/agent/YOUR_ADDRESS/alive&label=pulse&color=brightgreen)\n```\n\n**HTML embed:**\n\n```html\n<img src=\"https://img.shields.io/badge/dynamic/json?url=https://agent-pulse-nine.vercel.app/api/v2/agent/YOUR_ADDRESS/alive&query=$.isAlive&label=Agent%20Pulse&trueColor=brightgreen&falseColor=red&trueLabel=alive&falseLabel=dead\" />\n```\n\n---\n\n## Examples\n\nSee the [`examples/`](./examples/) directory for runnable TypeScript scripts:\n\n- **[basic-alive-check.ts](./examples/basic-alive-check.ts)** — Check if a single agent is alive\n- **[batch-check-agents.ts](./examples/batch-check-agents.ts)** — Check multiple agents in parallel\n- **[monitor-agent-uptime.ts](./examples/monitor-agent-uptime.ts)** — Continuous monitoring loop with alerts\n\nRun any example:\n\n```bash\nnpx tsx examples/basic-alive-check.ts\n```\n\n---\n\n## Links\n\n- **Live Dashboard:** [agent-pulse-nine.vercel.app](https://agent-pulse-nine.vercel.app)\n- **GitHub:** [github.com/consensus-hq/agent-pulse](https://github.com/consensus-hq/agent-pulse)\n- **PULSE Token:** [DexScreener](https://dexscreener.com/base/0x21111B39A502335aC7e45c4574Dd083A69258b07)\n- **x402 Protocol:** [x402.org](https://www.x402.org/)\n- **Twitter:** [@PulseOnBase](https://x.com/PulseOnBase)\n\n---\n\n## License\n\nMIT © [Consensus HQ](https://github.com/consensus-hq)\n","readmeFilename":"README.md"}