What needs to be done:
Add a Node.js code example to the README, similar to the existing Python example.
Where: README.md, after the Python Quick Start section.
Reference: The Node.js SDK is in sdk/node/. Look at the existing client class to understand the API.
Expected result:
const { AgentBillClient } = require('agentbill')
const client = new AgentBillClient({ apiKey: 'agb_your_key' })
const check = await client.preflight({ agentId: 'researcher', estimatedUnits: 10 })
if (!check.approved) throw new Error(`Blocked: ${check.reason}`)
// run your agent here
await client.record({ agentId: 'researcher', units: 10 })
What needs to be done:
Add a Node.js code example to the README, similar to the existing Python example.
Where:
README.md, after the Python Quick Start section.Reference: The Node.js SDK is in
sdk/node/. Look at the existing client class to understand the API.Expected result: