@buildit-developer/argus-node
v0.1.11
Published
Argus observability SDK for Node.js — zero-code auto-instrumentation for Anthropic, OpenAI, Vercel AI SDK and LangChain
Maintainers
Readme
@buildit-developer/argus-node
Track per-call LLM cost and latency for Node.js apps — powered by the Argus observability dashboard.
Zero dependencies. Works with Anthropic, OpenAI, or any provider via manual tracking.
Installation
npm install @buildit-developer/argus-nodeQuick start
const argus = require('@buildit-developer/argus-node')
argus.init({
endpoint: 'https://api.buildit.sh',
apiKey: 'bld_live_...', // Settings → API Keys on app.buildit.sh
})Usage
Anthropic
Wrap your Anthropic client once — every messages.create call is tracked automatically.
const Anthropic = require('@anthropic-ai/sdk')
const argus = require('@buildit-developer/argus-node')
argus.init({ endpoint: 'https://api.buildit.sh', apiKey: process.env.ARGUS_KEY })
const client = argus.wrapAnthropic(new Anthropic())
const msg = await client.messages.create({
model: 'claude-haiku-4-5-20251001',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Hello' }],
})OpenAI
const { OpenAI } = require('openai')
const argus = require('@buildit-developer/argus-node')
argus.init({ endpoint: 'https://api.buildit.sh', apiKey: process.env.ARGUS_KEY })
const client = argus.wrapOpenAI(new OpenAI())
const res = await client.chat.completions.create({
model: 'gpt-4o-mini',
messages: [{ role: 'user', content: 'Hello' }],
})Manual tracking
For any other provider or custom call:
const result = await argus.track({
provider: 'my-provider',
model: 'my-model-v1',
opName: 'chat', // optional label shown in the dashboard
fn: () => myLLMCall(), // the async function to run and track
})API
argus.init(options)
| Option | Type | Default | Description |
|---|---|---|---|
| endpoint | string | process.env.ARGUS_ENDPOINT | Your Argus ingest URL |
| apiKey | string | process.env.ARGUS_KEY | API key from buildit.sh |
argus.wrapAnthropic(client)
Patches client.messages.create to auto-track every call. Returns the same client.
argus.wrapOpenAI(client)
Patches client.chat.completions.create to auto-track every call. Returns the same client.
argus.track(options)
| Option | Type | Description |
|---|---|---|
| provider | string | Provider name (e.g. anthropic, openai) |
| model | string | Model ID |
| fn | async function | The call to wrap |
| opName | string | Optional label shown in dashboard |
| options | string[] | Optional feature flags (e.g. ['diarization']) |
Environment variables
ARGUS_ENDPOINT=https://api.buildit.sh
ARGUS_KEY=bld_live_...If set, you don't need to call argus.init().
Get an API key
- Sign in at app.buildit.sh
- Go to Settings → API Keys
- Click Create key
- Pass it to
argus.init()or setARGUS_KEYin your environment
License
MIT
