Skip to main content

Documentation

Integrate AgentMeter in under 2 minutes

Getting Started

3 steps to full AI cost observability

1

Install SDK

npm install aiabicus or pip install aiabicus

2

Initialize

Pass your API key from the API Keys page

3

Log Runs

Call meter.log() after every agent execution

import Aiabicus from 'aiabicus';

// Initialize with your API key
const meter = new Aiabicus('ab_live_xxxxx');

// Log an agent run — just 2 lines!
await meter.log({
  agent_name: "support-bot",
  user_id: "user_123",
  model: "gpt-4o",
  input_tokens: 1500,
  output_tokens: 800,
  cost_usd: 0.0045,
  metadata: { session_id: "abc123" }
});

// Set a budget alert
await meter.setBudget({
  agent_name: "support-bot",
  limit_usd: 100,
  period: "monthly",
  alert_email: "dev@company.com"
});

API Reference

POST/v1/runsLog an agent run
GET/v1/runsList recent runs with filters
POST/v1/budgetsCreate a budget rule
GET/v1/budgetsList budget rules
GET/v1/alertsList triggered alerts
POST/v1/alerts/:id/ackAcknowledge an alert

Cookies on this site

We use cookies and similar tools for analytics. They load only if you click Accept.