{"_id":"@agentbill-sdk/sdk","_rev":"13-d9ec645a4837c53baa5868ab77ed8f68","name":"@agentbill-sdk/sdk","dist-tags":{"latest":"7.17.3"},"versions":{"1.0.1":{"name":"@agentbill-sdk/sdk","version":"1.0.1","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@1.0.1","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/Agent-Bill/Node#readme","bugs":{"url":"https://github.com/Agent-Bill/Node/issues"},"dist":{"shasum":"59d287115328aebba71c2d8764ba3522e73ad701","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-1.0.1.tgz","fileCount":9,"integrity":"sha512-rIhY3LFdVWabZ7Qq0M64Sq2XBm6b2gmi5CvOXdMiVNwg/gtDcRZ/z/EsWx2Ptc5HHN4/2YBeLlS5WuLbOadQJw==","signatures":[{"sig":"MEQCICWoExe3X6prs/9viJ2pVK3iiGbvasUFzS5Qwrksm9+1AiAzOzbrfn7jH5QjrkP7+OcArx4eddsTVl5jDyiwnLEucw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":241419},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"1f78405d08be0669abcf931595269535dbb61e5b","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/Agent-Bill/Node.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.1_1761327767430_0.17950147123245985","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@agentbill-sdk/sdk","version":"1.0.2","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@1.0.2","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/Agent-Bill/Node#readme","bugs":{"url":"https://github.com/Agent-Bill/Node/issues"},"dist":{"shasum":"2f19380841008ded2fb1a9661b8e59910cac8192","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-1.0.2.tgz","fileCount":9,"integrity":"sha512-3tTjdxWTx/4BItRSR5gbAAxQ/fGIzb/8PW1ZnWObtsgijD3IUXXJsXgmg4MnX1uJcmpvYRJk13V8t307LTgjNA==","signatures":[{"sig":"MEUCIH0wxaLZnrFNaQ+lKmuY98QI63kbSbFzIyQNYpnTX9PvAiEA4eUdm0rnKZsz7N39/Cvf0yKDdQbAlU0tWsNaGT5pjpk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":250864},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"70514f02502cc60a5113182193a9e688451524ee","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/Agent-Bill/Node.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.2_1761561410562_0.10856146421914614","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@agentbill-sdk/sdk","version":"1.0.3","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@1.0.3","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/Agent-Bill/Node#readme","bugs":{"url":"https://github.com/Agent-Bill/Node/issues"},"dist":{"shasum":"c9ed64a1e185a7c259c4339356cbd9c3b0d6a95c","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-1.0.3.tgz","fileCount":9,"integrity":"sha512-tecK3QvYRkwqFomkO6JAxzbhvb4iXJEpD/dF1k0jWefvZ8fZ/Qtk3NneUnOei9ggtOLasDQgb6Q5l1ZCbm9+sw==","signatures":[{"sig":"MEUCIQCfuF3EQf4Darl3P0sMSenhvXKrw1cBbaDBKKB5GzzX6AIgH59XXWpgKrmacF+8/O0ae0dEsdddNrwfmC4EKmRgVsI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":325248},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"9f19974ec389563d5bae89b1729e822981afc3f8","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/Agent-Bill/Node.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.3_1761913202247_0.35321163791062427","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@agentbill-sdk/sdk","version":"2.0.0","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@2.0.0","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/Agent-Bill/Node#readme","bugs":{"url":"https://github.com/Agent-Bill/Node/issues"},"dist":{"shasum":"5daf53ee20d8a71a6b945b5cfeae079279b70384","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-2.0.0.tgz","fileCount":9,"integrity":"sha512-wAH0wzkVBim/fhbw4wDpGEREZL8mIIsJXnvb8X7JWszUPdh288D5Udon9RZ97JxTcYLSIJHUEEcnElI3seDBtg==","signatures":[{"sig":"MEUCIEGalRlTpBwi6tisevxJ7sBdO6MD1FEVjs9mffhohOhoAiEAxRfzvzJg8VwYGeJc1YPXcscYlenRHcx7x1IFGXxvuvc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":325248},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"ea6006aaae882cf8cbdae73e53f6a409b7204bb9","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/Agent-Bill/Node.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_2.0.0_1761914352595_0.8735118765623147","host":"s3://npm-registry-packages-npm-production"}},"5.0.1":{"name":"@agentbill-sdk/sdk","version":"5.0.1","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@5.0.1","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/yourusername/agentbill-typescript-sdk#readme","bugs":{"url":"https://github.com/yourusername/agentbill-typescript-sdk/issues"},"dist":{"shasum":"822274c4315119a83f747ad81959716633dd5c81","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-5.0.1.tgz","fileCount":9,"integrity":"sha512-IozjCiUEA6K4BpN5aJoMC/uxg4qf7BPx0nVuGUg3ODNmwNCEEXgpqhYi3kv2F4m+/QiHBwwt0aENlprEQzbeFg==","signatures":[{"sig":"MEUCID7OLk74x19iFRv0NFF6IIrRbRPJXTMEtEED5eSVdpeZAiEAjGe69kPgx2etGCNZOsdvP10iV50PPskLRjqVJs2NNIA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":336038},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"1d762a56b5968427552fdd80c129748270cab073","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-typescript-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_5.0.1_1762458387814_0.16515528957341497","host":"s3://npm-registry-packages-npm-production"}},"5.0.2":{"name":"@agentbill-sdk/sdk","version":"5.0.2","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@5.0.2","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/yourusername/agentbill-typescript-sdk#readme","bugs":{"url":"https://github.com/yourusername/agentbill-typescript-sdk/issues"},"dist":{"shasum":"c69106add41208fd7fc7bd902526684db9ec1b8d","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-5.0.2.tgz","fileCount":9,"integrity":"sha512-ayWSepn89c87pc0JQ8OeyQrbuca7Nzr0JS8ZiPwHhFsYRXEOdhCotBOa/JDPinv9iTPXshJGVTlcuQirrO0wMg==","signatures":[{"sig":"MEYCIQDM0EdnfMYBbjBXXHSDzycrhATWB47Zds96obgEYd99uAIhAJNefnDHjOlozLJoscM5OL6U1xGCM5/9ZweYZLHjWFfG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":336038},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"7b025cdc2a70f4c77ae2e8324a1ed886bfe35eb8","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-typescript-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_5.0.2_1762459197061_0.8658589877793677","host":"s3://npm-registry-packages-npm-production"}},"6.5.0":{"name":"@agentbill-sdk/sdk","version":"6.5.0","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@6.5.0","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/yourusername/agentbill-typescript-sdk#readme","bugs":{"url":"https://github.com/yourusername/agentbill-typescript-sdk/issues"},"dist":{"shasum":"b645a2f8fee81aeda9baf10d48bde3b314160c1c","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-6.5.0.tgz","fileCount":9,"integrity":"sha512-BLPTAn5+30BOTYhzO3C9drI0S1GGXklR1zbpeXzZbfQx4sTQZ2QQHCuNJCuBPIP13My3zbBVefOzxIV2XMM/7Q==","signatures":[{"sig":"MEYCIQD4YCyOXx5ltpKYn7OrYpssCCmtj4FJE8Ob5+c1Qjp9YgIhAM8rd6FyV57D/AxTacf5gFV5PuarenPbw1ttawz1MIQ7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":564838},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"c7e1cafe60a78ff67ee5ccef6f722e9494065d81","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-typescript-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.5","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_6.5.0_1764346393128_0.34719471420559866","host":"s3://npm-registry-packages-npm-production"}},"7.17.0":{"name":"@agentbill-sdk/sdk","version":"7.17.0","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@7.17.0","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/yourusername/agentbill-typescript-sdk#readme","bugs":{"url":"https://github.com/yourusername/agentbill-typescript-sdk/issues"},"dist":{"shasum":"68cbc555639c4e8336aea64bd8b0313bd879fdb5","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-7.17.0.tgz","fileCount":9,"integrity":"sha512-XFyf+Mn5/uUE4HouMI+5k0WOFLP6Y39RL8zuWtqdnfUVrq6gAvSzXuOVK8LWVTTV/Cw7xExw5+Nuo453oYYNpg==","signatures":[{"sig":"MEYCIQDUUqypLjobAajoDShOB0kGs8Gn/sFnCacIojj+l3QwqAIhAOtoUxkRzLALPWJvcF5TDLN0RTJsnaqg8lo1/KVqqPVJ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":894602},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"58cfcaa0a988b523e611c31f012025e42b74ae9b","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-typescript-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.6","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_7.17.0_1767426546399_0.3120803937712351","host":"s3://npm-registry-packages-npm-production"}},"7.17.1":{"name":"@agentbill-sdk/sdk","version":"7.17.1","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","_id":"@agentbill-sdk/sdk@7.17.1","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"homepage":"https://github.com/yourusername/agentbill-typescript-sdk#readme","bugs":{"url":"https://github.com/yourusername/agentbill-typescript-sdk/issues"},"dist":{"shasum":"8f56ea27030d91b0550bbabb9b425fc9b7950546","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-7.17.1.tgz","fileCount":9,"integrity":"sha512-NtDe7643vB5TkFXlO+Y7ab14vkZEUxNPJngi3JSL/mWh5Rx8v4FZXkOZ3xZtGzNWrnIbVCOv+54ljTXBF/9U+Q==","signatures":[{"sig":"MEQCIDe+0ELjy0G9fozN+ThM/kppgH0pVUOQ80Pg/lMBa3EWAiAb3I1nx5awQuEV4uPldjMvz+OlSj5I2G8xbAyR+t7tyA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":943643},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"584fa836e2770fc60408a807e9a44680ae80db41","scripts":{"test":"vitest run","build":"tsup","prepare":"npm run build","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"repository":{"url":"git+https://github.com/yourusername/agentbill-typescript-sdk.git","type":"git"},"_npmVersion":"10.8.2","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","directories":{},"_nodeVersion":"20.19.6","dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.0.0"},"peerDependencies":{"openai":">=4.0.0","@anthropic-ai/sdk":">=0.9.0"},"peerDependenciesMeta":{"openai":{"optional":true},"@anthropic-ai/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sdk_7.17.1_1767442376568_0.36017000741442406","host":"s3://npm-registry-packages-npm-production"}},"7.17.3":{"name":"@agentbill-sdk/sdk","version":"7.17.3","description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","test":"vitest run","test:watch":"vitest","prepare":"npm run build","prepublishOnly":"npm run build"},"keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"author":{"name":"AgentBill"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/yourusername/agentbill-typescript-sdk.git"},"peerDependencies":{"@anthropic-ai/sdk":">=0.9.0","openai":">=4.0.0"},"peerDependenciesMeta":{"@anthropic-ai/sdk":{"optional":true},"openai":{"optional":true}},"dependencies":{"tsup":"^8.0.0","typescript":"^5.0.0"},"devDependencies":{"@types/node":"^20.0.0"},"_id":"@agentbill-sdk/sdk@7.17.3","gitHead":"5643eeff3af451f740ef7a1cb2e4db1c77f377cb","bugs":{"url":"https://github.com/yourusername/agentbill-typescript-sdk/issues"},"homepage":"https://github.com/yourusername/agentbill-typescript-sdk#readme","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-1HX1QMRCUS3oNQakqzObeQeXsr8XlQB7dlH+GTclUJlt89Ivuk1IDnw/VYKsUo2HHzj3ePubaczT/qIBGdHY4g==","shasum":"1bce18d2fcc1bb591a9a8fe898f0d561d2b74c28","tarball":"https://registry.npmjs.org/@agentbill-sdk/sdk/-/sdk-7.17.3.tgz","fileCount":9,"unpackedSize":976857,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGNCOtmcSdMr0LZ39wwnmmUFqj9V4yJV88sWAMxhm0CLAiA4SOuAjrXdMlz3SweBBFQlx0ZeJCk5g/y2ghno3cLy1g=="}]},"_npmUser":{"name":"dominicdivakar","email":"dominic@dexra.cloud"},"directories":{},"maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_7.17.3_1767722535807_0.016557205787402163"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-24T17:42:47.300Z","modified":"2026-01-06T18:02:16.196Z","1.0.0":"2025-10-24T17:30:11.200Z","1.0.1":"2025-10-24T17:42:47.616Z","1.0.2":"2025-10-27T10:36:50.755Z","1.0.3":"2025-10-31T12:20:02.430Z","2.0.0":"2025-10-31T12:39:12.847Z","5.0.1":"2025-11-06T19:46:27.990Z","5.0.2":"2025-11-06T19:59:57.255Z","6.5.0":"2025-11-28T16:13:13.355Z","7.17.0":"2026-01-03T07:49:06.556Z","7.17.1":"2026-01-03T12:12:56.757Z","7.17.3":"2026-01-06T18:02:15.982Z"},"bugs":{"url":"https://github.com/yourusername/agentbill-typescript-sdk/issues"},"author":{"name":"AgentBill"},"license":"MIT","homepage":"https://github.com/yourusername/agentbill-typescript-sdk#readme","keywords":["opentelemetry","otel","ai","agent","billing","usage-tracking","openai","anthropic","llm","observability"],"repository":{"type":"git","url":"git+https://github.com/yourusername/agentbill-typescript-sdk.git"},"description":"OpenTelemetry-based SDK for tracking AI agent usage and billing","maintainers":[{"name":"dominicdivakar","email":"dominic@dexra.cloud"}],"readme":"# @agentbill/sdk\n\nOpenTelemetry-based SDK for automatic AI agent usage tracking and billing. Zero-config instrumentation for OpenAI, Anthropic, AWS Bedrock, Azure OpenAI, Mistral AI, and other AI providers.\n\n## Features\n\n✨ **Zero-config instrumentation** - Wrap your AI client once, track everything automatically  \n📊 **Accurate token & cost tracking** - Captures real usage from API responses  \n🔍 **OpenTelemetry standard** - Industry-standard observability protocol  \n🚀 **Multi-provider support** - OpenAI, Anthropic, AWS Bedrock, Azure OpenAI, Mistral AI, Cohere, custom endpoints  \n⚡ **Automatic batching** - Efficient data export with configurable batch sizes  \n🎯 **Rich metadata** - Track model, tokens, latency, costs, and custom attributes  \n\n## Supported Providers\n\n### ✅ OpenAI\nAll GPT models (GPT-4, GPT-5, etc.) - Auto-captures tokens, model, cost, latency\n\n### ✅ Anthropic  \nAll Claude models (Claude 3.5 Sonnet, Opus, etc.) - Auto-captures tokens, model, cost, latency\n\n### ✅ AWS Bedrock\nClaude, Meta Llama, Mistral, Amazon Titan, Cohere models - Auto-captures tokens, model, cost, latency\n\n### ✅ Azure OpenAI\nAll Azure-deployed OpenAI models (GPT-4, GPT-3.5, embeddings) - Auto-captures tokens, model, cost, latency\n\n### ✅ Mistral AI\nMistral Large/Medium/Small, Codestral, Ministral, open models - Auto-captures tokens, model, cost, latency\n\n## Installation\n\n### Installation\n\n#### From npm (Recommended)\n```bash\nnpm install @agentbill-sdk/sdk\n# or\nyarn add @agentbill-sdk/sdk\n```\npnpm add @agentbill-sdk/sdk\n```\n\n### Option 2: Install from npm (Coming Soon)\n```bash\nnpm install @agentbill/sdk\n# or\nyarn add @agentbill/sdk\n# or\npnpm add @agentbill/sdk\n```\n\n### Option 3: Install from Downloaded ZIP\nIf you downloaded the SDK as a ZIP file:\n\n```bash\n# 1. Extract the ZIP and navigate to the folder\ncd agentbill-sdk\n\n# 2. Install dependencies\nnpm install\n\n# 3. Build the SDK\nnpm run build\n\n# 4. Link globally\nnpm link\n\n# 5. In your project, link the SDK\ncd /path/to/your/project\nnpm link @agentbill/sdk\n\n# 6. Now you can import it\nimport { AgentBill } from '@agentbill/sdk';\n```\n\n**Alternative: Local Install Without npm link**\n```bash\n# In your project directory\nnpm install /path/to/extracted/agentbill-sdk\n```\n\n## File Structure\n\n```\nagentbill-typescript/\n├── src/\n│   ├── index.ts\n│   ├── wrapper.ts\n│   ├── tracer.ts\n│   └── types.ts\n├── examples/\n│   ├── openai-basic.ts.example\n│   ├── anthropic-basic.ts.example\n│   ├── bedrock-basic.ts.example\n│   ├── azure-openai-basic.ts.example\n│   ├── mistral-basic.ts.example\n│   └── google-ai-basic.ts.example\n├── tests/\n├── dist/\n├── README.md\n├── package.json\n├── tsconfig.json\n├── tsup.config.ts\n└── LICENSE\n```\n\n## Quick Start\n\n### OpenAI\n\n```typescript\nimport { AgentBill } from '@agentbill/sdk';\nimport OpenAI from 'openai';\n\n// Initialize AgentBill\nconst agentBill = AgentBill.init({\n  apiKey: 'your-agentbill-api-key',\n  customerId: 'customer-123',\n  baseUrl: 'https://your-agentbill-instance.com', // Your AgentBill API endpoint\n  debug: true // Enable debug logging (optional)\n});\n\n// Wrap your OpenAI client\nconst openai = agentBill.wrapOpenAI(new OpenAI({\n  apiKey: process.env.OPENAI_API_KEY\n}));\n\n// Use normally - all calls automatically tracked!\nconst response = await openai.chat.completions.create({\n  model: \"gpt-4\",\n  messages: [{ role: \"user\", content: \"Hello!\" }]\n});\n\n// Tokens, costs, and latency automatically captured ✨\n```\n\n### Anthropic\n\n```typescript\nimport { AgentBill } from '@agentbill/sdk';\nimport Anthropic from '@anthropic-ai/sdk';\n\nconst agentBill = AgentBill.init({\n  apiKey: 'your-agentbill-api-key',\n  customerId: 'customer-123',\n  baseUrl: 'https://your-agentbill-instance.com'\n});\n\nconst anthropic = agentBill.wrapAnthropic(new Anthropic({\n  apiKey: process.env.ANTHROPIC_API_KEY\n}));\n\nconst response = await anthropic.messages.create({\n  model: \"claude-opus-4\",\n  max_tokens: 1024,\n  messages: [{ role: \"user\", content: \"Hello!\" }]\n});\n```\n\n### AWS Bedrock\n\n```typescript\nimport { AgentBill } from '@agentbill/sdk';\nimport { BedrockRuntimeClient, InvokeModelCommand } from '@aws-sdk/client-bedrock-runtime';\n\nconst agentBill = AgentBill.init({\n  apiKey: 'your-agentbill-api-key',\n  customerId: 'customer-123'\n});\n\nconst bedrock = agentBill.wrapBedrock(new BedrockRuntimeClient({\n  region: 'us-east-1'\n}));\n\nconst response = await bedrock.send(new InvokeModelCommand({\n  modelId: 'anthropic.claude-3-5-sonnet-20241022-v2:0',\n  body: JSON.stringify({\n    messages: [{ role: \"user\", content: \"Hello!\" }],\n    max_tokens: 1024\n  })\n}));\n```\n\n### Azure OpenAI\n\n```typescript\nimport { AgentBill } from '@agentbill/sdk';\nimport { AzureOpenAI } from '@azure/openai';\n\nconst agentBill = AgentBill.init({\n  apiKey: 'your-agentbill-api-key',\n  customerId: 'customer-123'\n});\n\nconst azure = agentBill.wrapAzureOpenAI(new AzureOpenAI({\n  apiKey: process.env.AZURE_OPENAI_API_KEY,\n  endpoint: 'https://YOUR_RESOURCE.openai.azure.com',\n  apiVersion: '2024-02-01'\n}));\n\nconst response = await azure.chat.completions.create({\n  model: \"gpt-4o\",\n  messages: [{ role: \"user\", content: \"Hello!\" }]\n});\n```\n\n### Mistral AI\n\n```typescript\nimport { AgentBill } from '@agentbill/sdk';\nimport MistralClient from '@mistralai/mistralai';\n\nconst agentBill = AgentBill.init({\n  apiKey: 'your-agentbill-api-key',\n  customerId: 'customer-123'\n});\n\nconst mistral = agentBill.wrapMistral(new MistralClient(\n  process.env.MISTRAL_API_KEY\n));\n\nconst response = await mistral.chat.complete({\n  model: \"mistral-large-latest\",\n  messages: [{ role: \"user\", content: \"Hello!\" }]\n});\n```\n\n## Configuration\n\n```typescript\ninterface AgentBillConfig {\n  apiKey: string;          // Required: Your AgentBill API key\n  baseUrl?: string;        // Optional: AgentBill endpoint (default: production)\n  customerId?: string;     // Optional: Associate all calls with a customer\n  debug?: boolean;         // Optional: Enable debug logging (default: false)\n}\n```\n\n## What Gets Tracked\n\nEvery AI API call is automatically instrumented with:\n\n- **Model information** - Provider, model name, version\n- **Token usage** - Prompt tokens, completion tokens, total tokens\n- **Cost calculation** - Real-time cost based on current pricing\n- **Prompt tracking** - Full prompts hashed for profitability analysis\n- **Performance metrics** - Request latency, timestamps\n- **Status tracking** - Success/failure, error messages\n- **OpenTelemetry context** - Full trace and span data\n\n## Prompt Profitability Tracking\n\nTrack which prompts are profitable or costing you money:\n\n```typescript\nconst agentBill = AgentBill.init({\n  apiKey: 'your-key',\n  customerId: 'customer-123'\n});\n\nconst openai = agentBill.wrapOpenAI(new OpenAI());\n\n// All automatically captured:\n// ✅ Prompt text (hashed for privacy)\n// ✅ Model and provider\n// ✅ Token usage (input/output)\n// ✅ API costs (auto-calculated)\nconst response = await openai.chat.completions.create({\n  model: \"gpt-4o-mini\",\n  messages: [{ role: \"user\", content: \"Your prompt here\" }]\n});\n\n// Optional: Add revenue to calculate profit\nawait agentBill.trackSignal(\"ai_completion\", 0.01);\n```\n\n**Dashboard shows:**\n- Cost per prompt (auto-calculated)\n- Revenue per prompt (if you set it)\n- Net margin per prompt\n- Execution count by prompt\n- Most/least profitable prompts\n\n## Data Export\n\nThe SDK automatically batches and exports telemetry data:\n\n- **Batch size**: Up to 10 spans per export\n- **Batch timeout**: Maximum 1 second between exports\n- **Format**: OpenTelemetry Protocol (OTLP)\n- **Endpoint**: POST to `/functions/v1/otel-collector`\n\n## Manual Flush\n\n```typescript\n// Flush any pending telemetry data before shutdown\nawait agentBill.flush();\n```\n\n## Advanced Usage\n\n### Custom Base URL\n\n```typescript\nconst agentBill = AgentBill.init({\n  apiKey: 'your-key',\n  baseUrl: 'https://custom-agentbill.example.com'\n});\n```\n\n### Per-Customer Tracking\n\n```typescript\n// Track different customers\nconst customerABill = AgentBill.init({\n  apiKey: 'your-key',\n  customerId: 'customer-a'\n});\n\nconst customerBBill = AgentBill.init({\n  apiKey: 'your-key',\n  customerId: 'customer-b'\n});\n```\n\n## TypeScript Support\n\nFully typed with TypeScript. All types are exported:\n\n```typescript\nimport type { \n  AgentBillConfig, \n  TraceContext, \n  SpanData,\n  AICallMetrics,\n  SupportedProvider \n} from '@agentbill/sdk';\n```\n\n## Requirements\n\n- Node.js 16+\n- TypeScript 5.0+ (for TypeScript projects)\n- OpenAI SDK 4.0+ (if using OpenAI)\n- Anthropic SDK 0.9+ (if using Anthropic)\n\n## License\n\nMIT\n\n## Support\n\nFor questions or support, email: support@agentbill.io\n","readmeFilename":"README.md"}