AgentLedger

Per-agent spend management — track x402/MPP/API-key spend, set budget caps, catch anomalies, full audit trail. The Datadog for agent spending.

Documentation

Per-agent spend management · Last updated: loading…

What AgentLedger does

AgentLedger is the Datadog for agent spending. Track spend across x402, MPP, and API-key payment rails from one place, set budget caps per agent, get anomaly alerts when spend spikes, and keep a full audit trail of every dollar an autonomous agent moves.

Live sample (this instance)

Tracked agentssee agent-ledger-production-0ff8.up.railway.app/stats (JS off: static fallback)

MCP integration

Claude / Cursor MCP config — paste into your MCP config file:

{
  "mcpServers": {
    "agent-ledger": {
      "url": "https://agent-ledger-production-0ff8.up.railway.app/mcp/"
    }
  }
}

Exposes tools: ledger_track, ledger_set_budget, ledger_report, ledger_alerts, ledger_list_agents.

Getting started

1. Track a spend event — dollars AND tokens

curl -sL --post301 -X POST https://agent-ledger-production-0ff8.up.railway.app/v1/track \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","rail":"x402","amount_cents":100,"service":"search","tokens_in":4500,"tokens_out":1200,"model":"gpt-4o"}'

No signup, but not open-write either: the first call for a new agent_id returns an agent_secret in the response. Save it — every later write to that same agent_id (track or budget) must include "agent_secret":"..." in the body, or it's rejected. Reads (report/tokens/alerts) stay open, no secret needed.

Token burn report — see exactly what each agent burns on:

curl https://agent-ledger-production-0ff8.up.railway.app/v1/tokens/my-agent

2. Set a monthly budget cap — enforced: a track() call that would cross it gets blocked (402), not just logged

curl -X POST https://agent-ledger-production-0ff8.up.railway.app/v1/budget \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"my-agent","monthly_cents":5000,"agent_secret":"YOUR_SAVED_SECRET"}'

3. Pull a spend report

curl https://agent-ledger-production-0ff8.up.railway.app/v1/report/my-agent

Free during beta (up to 3 agents). All rails, budgets, alerts, and the MCP integration are free while AgentLedger is in beta. GA pricing: Pro $19/mo — unlimited tracked agents + full history + alerts: Get Pro — $19/mo. Contact: entradox@icloud.com

AgentLedger · operated as an independent software service · registry: io.github.entradox/agent-ledger
Agent-readable: /llms.txt · /openapi.json · /server.json · /health