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 runGET
/v1/runsList recent runs with filtersPOST
/v1/budgetsCreate a budget ruleGET
/v1/budgetsList budget rulesGET
/v1/alertsList triggered alertsPOST
/v1/alerts/:id/ackAcknowledge an alert