Library / Reports, Analytics & Dashboards
Reports, Analytics & Dashboards
Track AI agent costs and decisions via webhooks and WhatsApp digests
When an API call/webhook arrives, it builds reports with Claude using WhatsApp.
What it does
## AI Agent Execution Ledger Records every tool call, LLM call, decision and error from any agent (or Supervisor workflow). Each event is priced, stored with a sequence number, and rolled into per-run cost / token / error summaries. Budget overruns trigger a one-time WhatsApp alert. A report endpoint + daily digest give cost & activity by agent, tool, model and decision. ### Pipeline POST /agent-ledger-event → Validate & Price → Append to Ledger → (optional) Budget Alert GET /agent-ledger-report → Aggregate report → JSON or WhatsApp digest ### Setup checklist 1. Add WhatsApp Business credentials to both WhatsApp nodes. 2. Edit Ledger Config: run budget, pricing-per-1M-tokens, retention limits, WhatsApp IDs. 3. Edit Report Config: digest window, recent-entry limit, WhatsApp IDs. 4. Activate the workflow (static data only persists on active / production runs). 5. No Anthropic credential is required – this workflow only records data. ### Send events POST /webhook/agent-ledger-event json { "events": [ { "runId": "run-1", "agentName": "researcher", "eventType": "llm_call", "model": "claude-sonnet-4-6", "inputTokens": 1800, "outputTokens": 420, "latencyMs": 2300 }, { "runId": "run-1", "agentName": "researcher", "eventType": "tool_call", "toolName": "web_search", "toolCostUsd": 0.01, "status": "ok" }, { "runId": "run-1", "agentName": "supervisor", "eventType": "decision", "decision": "route:writer", "reasoning": "research done", "confidence": 0.9 } ] } A single event object (without the events array) also works. ### Read the ledger GET /webhook/agent-ledger-report Optional query params: ?runId=, ?agent=, ?since= , ?limit=. ### Hook into a Supervisor workflow After each specialist output / Claude call, add an HTTP Request node that POSTs the agent name, usage tokens and decision to the event webhook.
The steps
- Receive Ledger Event
- Ledger Config
- Validate and Price Events
- If Events Are Valid
- Respond with Validation Error
- Append to Ledger
- Respond with Recorded Summary
- If Budget Alert Needed
- Send Budget Alert via WhatsApp
- Receive Report Request
- Daily Digest Schedule
- Report Config
- Build Ledger Report
- If Request Came From Webhook
16 steps in total.
Similar automations
Monitoring, Ops & IncidentsSend grouped failed execution digests via Data Tables, email, and webhooks18 stepsReports, Analytics & DashboardsTrack OpenAI API Usage and Costs in Google Sheets26 stepsAI Agents & AssistantsTag and log AI refund decisions as searchable execution data with OpenRouter11 stepsFiles & Cloud StorageRoute cold-chain lot release decisions with OpenAI, Gmail and Telegram16 steps