{"_id":"@otonix/sdk","_rev":"8-4d17c9e975d17e8e667b3e99687b06db","name":"@otonix/sdk","dist-tags":{"latest":"1.7.0"},"versions":{"1.0.0":{"name":"@otonix/sdk","version":"1.0.0","keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc"],"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","_id":"@otonix/sdk@1.0.0","maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"homepage":"https://github.com/otonix-ai/sdk","bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"dist":{"shasum":"f673dcf2e915ed37479f4024589ea9f3c087ddaf","tarball":"https://registry.npmjs.org/@otonix/sdk/-/sdk-1.0.0.tgz","fileCount":6,"integrity":"sha512-8E0drgKSIwuAbBWs5xxveUm8Sin1CjV6SdhN5WixB5/Z14aK4j6Vw/nSCZ0ekNvXbSCCX4KtDawxBpQhhXKFhw==","signatures":[{"sig":"MEQCIECrYgKORFySskMORusK9dIclsub0+38xhbwAHOtpI0CAiBRLMZ3sdSrfpi53Z2A8qcNwGxCqtoEJ7XKadsmrIkSbg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22331},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"gitHead":"327e073c4c6618f4604a3f8850991129e716ad4b","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"echo 'already built'"},"_npmUser":{"name":"otonix-ai","email":"otonixtech@gmail.com"},"repository":{"url":"git+https://github.com/otonix-ai/sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS programmatically.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.0_1772211911428_0.1177190175147187","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@otonix/sdk","version":"1.1.0","keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc"],"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","_id":"@otonix/sdk@1.1.0","maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"homepage":"https://github.com/otonix-ai/sdk","bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"dist":{"shasum":"8b318f16133d54af03a2ce2157c94a8efbe7e665","tarball":"https://registry.npmjs.org/@otonix/sdk/-/sdk-1.1.0.tgz","fileCount":6,"integrity":"sha512-BZXl5b3Th380GILpWDOFilwPumKD7zXmBzEW4W72YDxxSUPr/lsfeDYeHpt16N2AuL20SPNe/df1qIwx33Xzmg==","signatures":[{"sig":"MEQCIH25gsrRJ4TDFioYeEEdt4oUb9jkMQiW4nYIaCzZQ7z2AiAeKj9l8g6hTGFXxOqjHQUZs0R/TvDJCyc2/u41QLkhTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23945},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"gitHead":"c6a1a01c9ae253c1386ff26779318a9cb51c5db3","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"echo 'already built'"},"_npmUser":{"name":"otonix-ai","email":"otonixtech@gmail.com"},"repository":{"url":"git+https://github.com/otonix-ai/sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS programmatically.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.1.0_1772371946370_0.9234623116581673","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@otonix/sdk","version":"1.2.0","keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc","bankr","llm-gateway","multi-model"],"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","_id":"@otonix/sdk@1.2.0","maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"homepage":"https://github.com/otonix-ai/sdk","bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"dist":{"shasum":"4bbe5a0b99fa36c7081f37634e4fd829480797fb","tarball":"https://registry.npmjs.org/@otonix/sdk/-/sdk-1.2.0.tgz","fileCount":6,"integrity":"sha512-xzsWznug+pWfI0GhFVhw4eIPm7Rtu5+mg5ryJClgcb7etKcnbxjWJxJ5cWPvB2AAuTA4F43wsqWU1BVQc3TAzw==","signatures":[{"sig":"MEQCIGCOtUoDgytpolI5HCcDb3CecQOMGuhZRTmpmsOixIgDAiBvQ2ZEgx5krdUihTKMk+NfOpoa9ULHxZzNRT1kT5KrfA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32104},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"gitHead":"61f59ecddb3affc3044d2661d9a1b7b77375d1cc","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"echo 'already built'"},"_npmUser":{"name":"otonix-ai","email":"otonixtech@gmail.com"},"repository":{"url":"git+https://github.com/otonix-ai/sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS, and access the Bankr LLM Gateway programmatically.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.2.0_1772415820278_0.11711112098374743","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@otonix/sdk","version":"1.2.1","keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc","bankr","llm-gateway","multi-model"],"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","_id":"@otonix/sdk@1.2.1","maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"homepage":"https://github.com/otonix-ai/sdk","bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"dist":{"shasum":"f8981da5154caa824edaaebd2588f9f72035d069","tarball":"https://registry.npmjs.org/@otonix/sdk/-/sdk-1.2.1.tgz","fileCount":6,"integrity":"sha512-VUGZeLu+/D7DM8TMRayRU4dX34JYXa1f21uJA5/0lEZTe4LYuqNTqo0dsEFLpvMK/O1mYgOpGlZL+GvbDLvCVQ==","signatures":[{"sig":"MEUCIDGU0CSnJ/yrlR1AR18qunADd6iMjpqFvGc/VZ7WVKtcAiEA61/Az8T64xO7P+/y10TczBFvZsNkf/oFDZkfnFzVlpU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":35473},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"gitHead":"798da98e18065f424341d229b621295343c0d6df","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"echo 'already built'"},"_npmUser":{"name":"otonix-ai","email":"otonixtech@gmail.com"},"repository":{"url":"git+https://github.com/otonix-ai/sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS, and access the Bankr LLM Gateway programmatically.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.2.1_1772416176119_0.5247616389632062","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@otonix/sdk","version":"1.3.0","keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc","bankr","llm-gateway","multi-model"],"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","_id":"@otonix/sdk@1.3.0","maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"homepage":"https://github.com/otonix-ai/sdk","bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"dist":{"shasum":"0303051d353e24b5c13978ea7afb75a14a04efc8","tarball":"https://registry.npmjs.org/@otonix/sdk/-/sdk-1.3.0.tgz","fileCount":6,"integrity":"sha512-sLKvZEtpvg5bnntPoK5QDrtBNQRGtJshX/Dej9fxpMaV0l9jp9Sibvd98Dps+jp+GYWshDVAwng8RKLHVnVsgA==","signatures":[{"sig":"MEUCIDbfemXLPBIhg0ByvjilmwZLrFBKGvkj/4Xhkr/L8r0NAiEA2qxuDtDM0/8/OQ/x7Yik8Mnvng/EjBvXsnfX4V2hlQE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":40893},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"gitHead":"fd41224cc4990b8895ddb0dfc5e66c910743c5bb","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"echo 'already built'"},"_npmUser":{"name":"otonix-ai","email":"otonixtech@gmail.com"},"repository":{"url":"git+https://github.com/otonix-ai/sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS, and access the Bankr LLM Gateway programmatically.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.3.0_1772542112004_0.6866527532910462","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@otonix/sdk","version":"1.4.0","keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc","bankr","llm-gateway","multi-model"],"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","_id":"@otonix/sdk@1.4.0","maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"homepage":"https://github.com/otonix-ai/sdk","bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"dist":{"shasum":"57eaa12d66076868809e9f51bc78a285c64d3a8f","tarball":"https://registry.npmjs.org/@otonix/sdk/-/sdk-1.4.0.tgz","fileCount":6,"integrity":"sha512-TNCfoiFTBKKpcPCA613G0YCWj21nZePrjjm6F4eKepZTTM0cIKNMKMdYjjaX432lrhp6PjzSfy+CWP4zfNfUdQ==","signatures":[{"sig":"MEUCIGhlogTYDk18Oij0+SgWbO6QxQNkGxy3hY9Js7ttx8l2AiEA7JpsjU3bUAmVtflvU3PWP8gBDGLWeuIHSAr8tr2cVUQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50875},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"gitHead":"e58e655d67285ff5212957adcc9c31cab7e1eedd","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"echo 'already built'"},"_npmUser":{"name":"otonix-ai","email":"otonixtech@gmail.com"},"repository":{"url":"git+https://github.com/otonix-ai/sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS, BV-7X mothership/satellite orchestration, webhook events, and access the Bankr LLM Gateway programmatically.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.4.0_1772883498678_0.07391812203469605","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@otonix/sdk","version":"1.5.0","keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc","bankr","llm-gateway","multi-model"],"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","_id":"@otonix/sdk@1.5.0","maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"homepage":"https://github.com/otonix-ai/sdk","bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"dist":{"shasum":"d6f1ab6ae101343dc79f079556a82c63ca065e50","tarball":"https://registry.npmjs.org/@otonix/sdk/-/sdk-1.5.0.tgz","fileCount":6,"integrity":"sha512-LR0tXshh04L4xKP22oBn25DzdiU+gjhX9BQct/oGpKRvUcjJK6LG19RKdBAUT7NVGisp9Mxh+VcgMyren4JGHQ==","signatures":[{"sig":"MEUCIQCMGlHddbugprzFh92o7axJP4A6XkSG4gnjniuzzngaygIge1db8PSQbLiMciMNLaci++9OjCl/+4/HEH3hCZvVu/c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57857},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"gitHead":"c1a27e2410475c893f4afec5614a9e2a01d6cc0d","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","build":"tsup src/index.ts --format cjs,esm --dts --clean","prepublishOnly":"echo 'already built'"},"_npmUser":{"name":"otonix-ai","email":"otonixtech@gmail.com"},"repository":{"url":"git+https://github.com/otonix-ai/sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS, BV-7X mothership/satellite orchestration, webhook events, and access the Bankr LLM Gateway programmatically.","directories":{},"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.5.0_1772984924071_0.5849854387405369","host":"s3://npm-registry-packages-npm-production"}},"1.7.0":{"name":"@otonix/sdk","version":"1.7.0","description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS, BV-7X mothership/satellite orchestration, webhook events, and access the Bankr LLM Gateway programmatically.","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --clean","dev":"tsup src/index.ts --format cjs,esm --dts --watch","prepublishOnly":"echo 'already built'"},"keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc","bankr","llm-gateway","multi-model"],"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","homepage":"https://github.com/otonix-ai/sdk","repository":{"type":"git","url":"git+https://github.com/otonix-ai/sdk.git"},"bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"engines":{"node":">=18"},"devDependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_id":"@otonix/sdk@1.7.0","gitHead":"de339aa91b18c2840d34abfe8a54edd09e3e1801","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-CcFFz6vwbkeyRyYQ5M5XGy5IPXYIopIp+455fRuCONUd0eXJjmLVMl/vuP+RG8etMd1YdVyFHJFac5QCMnDUUw==","shasum":"b46661b612dd5b2cf7a3c9162a99b9f2e038db2d","tarball":"https://registry.npmjs.org/@otonix/sdk/-/sdk-1.7.0.tgz","fileCount":6,"unpackedSize":62587,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDXXsekcen5ZtCqNP5Mb0xFiUVNhRZE0H87wL7MO9pCJAiAvi44AGsArx9cw2bj5Zmct6Ksrht6SRPzBkPfZAtvCQg=="}]},"_npmUser":{"name":"otonix-ai","email":"otonixtech@gmail.com"},"directories":{},"maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.7.0_1773406052043_0.45683726652253376"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-27T17:05:11.360Z","modified":"2026-03-13T12:47:32.346Z","1.0.0":"2026-02-27T17:05:11.563Z","1.1.0":"2026-03-01T13:32:26.529Z","1.2.0":"2026-03-02T01:43:40.441Z","1.2.1":"2026-03-02T01:49:36.275Z","1.3.0":"2026-03-03T12:48:32.142Z","1.4.0":"2026-03-07T11:38:18.828Z","1.5.0":"2026-03-08T15:48:44.238Z","1.7.0":"2026-03-13T12:47:32.213Z"},"bugs":{"url":"https://github.com/otonix-ai/sdk/issues"},"author":{"name":"Otonix","email":"dev@otonix.tech"},"license":"MIT","homepage":"https://github.com/otonix-ai/sdk","keywords":["otonix","autonomous-agents","web4","x402","sovereign-compute","ai-agents","base-chain","usdc","bankr","llm-gateway","multi-model"],"repository":{"type":"git","url":"git+https://github.com/otonix-ai/sdk.git"},"description":"TypeScript SDK for the Otonix sovereign compute platform — register agents, send heartbeats, log actions, manage domains and VPS, BV-7X mothership/satellite orchestration, webhook events, and access the Bankr LLM Gateway programmatically.","maintainers":[{"name":"otonix-ai","email":"otonixtech@gmail.com"}],"readme":"# @otonix/sdk\n\nTypeScript SDK for the [Otonix](https://otonix.tech) sovereign compute platform.\n\nRegister autonomous AI agents, send heartbeats, log actions, manage infrastructure, and access multi-model AI inference via the Bankr LLM Gateway — all programmatically.\n\n## Install\n\n```bash\nnpm install @otonix/sdk\n```\n\n## Quick Start\n\n```typescript\nimport { OtonixClient } from '@otonix/sdk'\n\nconst client = new OtonixClient({\n  apiKey: 'otonix_your_api_key_here',\n  endpoint: 'https://app.otonix.tech' // default\n})\n\n// Register an agent\nconst agent = await client.register({\n  name: 'my-agent',\n  model: 'claude-opus-4-6',\n  vpsIp: '10.0.1.1',\n  walletAddress: '0x...',\n  heartbeatInterval: 60\n})\n\nconsole.log(`Agent registered: ${agent.id}`)\n\n// Start heartbeat loop (sends every 60s)\nconst hb = client.createHeartbeatLoop(agent.id, 60)\n\n// Log an action\nawait client.logAction(agent.id, {\n  action: 'Task completed: data processing',\n  category: 'compute',\n  details: 'Processed 1000 records in 2.3s'\n})\n\n// Stop heartbeat when done\nhb.stop()\n```\n\n## Bankr LLM Gateway\n\nThe SDK includes a built-in client for the [Bankr LLM Gateway](https://bankr.bot/llm), providing access to multiple AI models (Claude, GPT, Gemini, Kimi, Qwen) through a single unified API. This makes it easy to build agents that can reason, plan, and act autonomously.\n\n### Setup\n\nGet your Bankr API key from [bankr.bot/api](https://bankr.bot/api) — make sure LLM Gateway access is enabled.\n\n```typescript\nimport { BankrLLM } from '@otonix/sdk'\n\nconst llm = new BankrLLM({ apiKey: 'bk_YOUR_API_KEY' })\n```\n\n### Chat Completions\n\n```typescript\nconst response = await llm.chat({\n  model: 'claude-haiku-4.5',\n  messages: [\n    { role: 'system', content: 'You are an autonomous trading agent.' },\n    { role: 'user', content: 'Analyze BTC/USDC market conditions.' }\n  ],\n  temperature: 0.7,\n  max_tokens: 1024\n})\n\nconsole.log(response.choices[0].message.content)\nconsole.log(`Tokens: ${response.usage.prompt_tokens} in / ${response.usage.completion_tokens} out`)\n```\n\n### List Available Models\n\n```typescript\nconst models = await llm.listModels()\nfor (const model of models) {\n  console.log(`${model.id} — ${model.owned_by}`)\n}\n```\n\n### Usage Summary\n\n```typescript\nconst usage = await llm.getUsage(30) // last 30 days\nconsole.log(`Total requests: ${usage.totals.totalRequests}`)\nconsole.log(`Total cost: $${usage.totals.totalCost.toFixed(2)}`)\n\nfor (const m of usage.byModel) {\n  console.log(`  ${m.model}: ${m.requests} requests, $${m.totalCost.toFixed(2)}`)\n}\n```\n\n### Health Check\n\n```typescript\nconst health = await llm.checkHealth()\nconsole.log(`Gateway: ${health.status}`)\n```\n\n### BankrLLM Configuration\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `apiKey` | `string` | Yes | — | Bankr API key (`bk_xxx`) |\n| `baseUrl` | `string` | No | `https://llm.bankr.bot` | Gateway URL |\n| `timeout` | `number` | No | `60000` | Request timeout in ms |\n\n### Building Agents with LLM\n\nCombine the Otonix platform client with Bankr LLM to create fully autonomous agents:\n\n```typescript\nimport { OtonixClient, BankrLLM } from '@otonix/sdk'\n\nconst client = new OtonixClient({ apiKey: 'otonix_xxx' })\nconst llm = new BankrLLM({ apiKey: 'bk_xxx' })\n\n// Register agent\nconst agent = await client.register({\n  name: 'sentinel-01',\n  model: 'claude-haiku-4.5',\n  vpsIp: '10.0.1.1'\n})\n\n// Start heartbeat\nconst hb = client.createHeartbeatLoop(agent.id, 60)\n\n// Agent reasoning loop\nasync function agentLoop() {\n  const response = await llm.chat({\n    model: 'claude-haiku-4.5',\n    messages: [\n      { role: 'system', content: 'You are sentinel-01, an autonomous infrastructure agent.' },\n      { role: 'user', content: 'Check system health and report status.' }\n    ]\n  })\n\n  const result = response.choices[0].message.content\n  await client.logAction(agent.id, {\n    action: result,\n    category: 'system',\n    details: `model: ${response.model}, tokens: ${response.usage.total_tokens}`\n  })\n}\n\nsetInterval(agentLoop, 300_000) // every 5 min\n```\n\n## API Reference\n\n### `new OtonixClient(config)`\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `apiKey` | `string` | Yes | — | Your Otonix API key (`otonix_xxx`) |\n| `endpoint` | `string` | No | `https://app.otonix.tech` | API endpoint URL |\n| `timeout` | `number` | No | `30000` | Request timeout in ms |\n\n### Agent Methods\n\n```typescript\n// Register a new agent\nclient.register({ name, model?, vpsIp, walletAddress?, genesisPrompt?, heartbeatInterval? })\n\n// Send heartbeat\nclient.heartbeat(agentId)\n\n// Log an action\nclient.logAction(agentId, { action, category?, details?, autonomous? })\n\n// Get agent details\nclient.getAgent(agentId)\n\n// List all agents\nclient.listAgents()\n\n// Get agent action log\nclient.getAgentActions(agentId)\n\n// Auto heartbeat loop (returns { stop: () => void })\nclient.createHeartbeatLoop(agentId, intervalSeconds?)\n```\n\n### Credit Methods\n\n```typescript\n// Get agent credit balance\nclient.getCreditBalance(agentId)\n// Returns: { agentId, name, credits, survivalTier }\n\n// Transfer credits between agents\nclient.transferCredits({\n  fromAgentId: 'agent-1-id',\n  toAgentId: 'agent-2-id',\n  amount: 10.00,\n  description: 'Payment for data processing'\n})\n// Returns: { success, transferred, from, to }\n\n// Get credit transaction history for an agent\nclient.getCreditHistory(agentId)\n// Returns: Transaction[]\n```\n\n### Template Methods\n\n```typescript\n// List all available agent templates\nclient.listTemplates()\n// Returns: AgentTemplate[]\n\n// Get a specific template by slug\nclient.getTemplate('trading-bot')\n// Returns: AgentTemplate\n\n// Deploy an agent from a template\nclient.deployTemplate({\n  templateSlug: 'trading-bot',\n  name: 'my-trading-agent',\n  vpsIp: '10.0.1.1',          // optional\n  walletAddress: '0x...',      // optional\n  customConfig: { pair: 'ETH/USDC' } // optional\n})\n// Returns: { success, agent, template }\n```\n\nBuilt-in templates: `trading-bot`, `infra-monitor`, `data-pipeline`, `custom-agent`.\n\n### Infrastructure Methods\n\n```typescript\n// Sandboxes (VPS)\nclient.listSandboxes()\nclient.getSandbox(sandboxId)\n\n// Domains\nclient.listDomains()\nclient.getDomain(domainId)\nclient.checkDomain('example.com')\n\n// Transactions\nclient.listTransactions()\n\n// Marketplace\nclient.listMarketplaceServices()\nclient.getMarketplaceService(serviceId)\n```\n\n### Platform Methods\n\n```typescript\n// Autonomic engine status\nclient.getAutonomicStatus()\n\n// x402 payment config\nclient.getX402Config()\n\n// Auth status\nclient.getAuthStatus()\n```\n\n### `createClient(config)`\n\nShorthand for `new OtonixClient(config)`:\n\n```typescript\nimport { createClient } from '@otonix/sdk'\nconst client = createClient({ apiKey: 'otonix_xxx' })\n```\n\n### `createBankrLLM(config)`\n\nShorthand for `new BankrLLM(config)`:\n\n```typescript\nimport { createBankrLLM } from '@otonix/sdk'\nconst llm = createBankrLLM({ apiKey: 'bk_xxx' })\n```\n\n## Action Categories\n\n| Category | Description |\n|----------|-------------|\n| `system` | Tier changes, status updates |\n| `infra` | VPS operations, reboots |\n| `domain` | Domain registration, renewal |\n| `compute` | AI inference, data processing |\n| `trading` | Trading operations |\n\n## Error Handling\n\n```typescript\nimport { OtonixClient, OtonixError } from '@otonix/sdk'\n\ntry {\n  await client.heartbeat('invalid-id')\n} catch (err) {\n  if (err instanceof OtonixError) {\n    console.error(`API Error ${err.status}: ${err.message}`)\n  }\n}\n```\n\n## Generating an API Key\n\nFrom your VPS:\n\n```bash\ncurl -s -X POST https://app.otonix.tech/api/keys/generate \\\n  -H \"Content-Type: application/json\" \\\n  -H \"X-Dashboard-Token: YOUR_SESSION_SECRET\" \\\n  -d '{\"name\": \"my-agent-key\"}' | jq .key\n```\n\n## Links\n\n- [Platform](https://app.otonix.tech)\n- [Website](https://otonix.tech)\n- [GitHub](https://github.com/otonix-ai)\n- [CLI Tool](https://www.npmjs.com/package/@otonix/cli)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}