Stage 05 of 07 in Toolchain
Cost Operations & FinOps

Docket

Azure FinOps built for the speed you actually need it. Docket combines daily FOCUS billing exports for invoice-accurate reconciliation, near-realtime Azure OpenAI diagnostic telemetry for instant spend triage, and AI-generated optimization recommendations — with a PowerShell resource management suite that can act on what it finds.

Quick Execution · CLI Hook
$ curl "https://docket.celladoresystems.com/api/v1/spend?workspace=ws_prod&period=current_month" -H "Authorization: Bearer TOKEN"
Live (Internal) Verified 2026-08-20
Three latency tiers
~1 min realtime → 1–5 min near-realtime → 4–24h FOCUS billing
gpt-4.1-mini AI Advisor
weekly ranked optimization recommendations from accumulated cost data
Zero manual infrastructure
provisioned end-to-end with Terraform; no manually-created Azure resources
Ecosystem Handshakes

How Docket Connects to the Stack

Celladore is engineered as a unified, composable toolchain where every tool feeds upstream contexts and downstream verification loops without friction.

OTel Spans → Tier 2 Ingestion

→ Sluice

Sluice emits AOAI diagnostic events that stream through Event Hub into Docket's ADX aoai_logs_raw table — priced per-request in near-realtime.

Run Attribution → Agent Ledger

→ Retort

Correlates Retort agent run IDs with exact dollar amounts and token metrics via sluice OTel data for complete auditability.

MCP Server → Desktop HUD

→ Deck

Deck reads aggregated spend summaries via Docket's MCP server at /mcp (JSON-RPC over HTTP) for Dashboard cost tiles.

Architecture Specs

Technical Matrix

Runtime & Engine:
Python 3.12+ / FastAPI / KQL / PowerShell 7.0+
Deployment Target:
Azure Container Apps + Azure Data Explorer (pvc-docket-kusto)
Communication Protocol:
OTLP :4317 / Prometheus / Event Hub Streaming / FOCUS CSV
Licensing Tier:
Proprietary (Private — Internal Infrastructure)
Upstream Ingestion: Sluice OTel Spans, Azure OpenAI Diagnostic Logs, Azure Cost Management FOCUS Exports, Azure Monitor Metrics
Downstream Consumers: Deck Desktop HUD, Grafana Dashboards, PagerDuty / Cost Alerts, AI Advisor Recommendations
Venture Origin Bred from Mystira & Phoenix VC

Invented from Real Scars

⚡ The Production Incident

Lack of agent-level cost attribution meant runaway recursive loops were discovered weeks later on aggregate monthly cloud invoices — with no way to trace which agent, task, or repo caused the spike.

🛡️ Failure Mode Prevented

Runaway agent loops bankrupting cloud budgets and unallocated venture LLM spend.

Tested in production workloads across Phoenix VC ventures.
Core Capabilities

Architectural Features & Guarantees

Modular design built for high velocity, deterministic reliability, and strict enterprise isolation.

Three-Tier Cost Architecture

Tier 1 (~1 min) Azure Monitor metrics in Grafana. Tier 2 (1–5 min) AOAI diagnostic logs via Event Hub for per-request cost estimates. Tier 3 (4–24h) FOCUS-format exports for invoice-accurate billing reconciliation.

AI Cost Advisor

A gpt-4.1-mini analysis job runs weekly against all accumulated ADX cost data and produces ranked, actionable optimization suggestions stored in the cost_recommendations table.

PowerShell Resource Management Suite

Eight production-grade scripts handling inventory, deletion, lifecycle, suspension, scaling, tagging, health audit, and workflow orchestration — with IaC detection, cascade depth limits, and DryRun mode.

KQL Anomaly Detection

Built-in KQL functions: cost_top_resources(), aoai_cost_estimate(), aoai_anomaly_detect() — surface untagged resource burn and usage spikes before the monthly invoice lands.

Grafana Dashboards & Alerting

Five versioned dashboard JSONs covering all-resource cost overview, realtime AOAI cost triage, cost centre breakdown, and staleness/anomaly alerts.

Cost Centre API

FastAPI service tracking which teams and cost centres are onboarded. Backed by Azure Data Explorer in production, Table Storage as fallback for local dev.

Integration & API Hub

Typed API Contract & Snippets

Live cURL, TypeScript, and Python invocation payloads for Docket.

DEVELOPER HUB & VERIFIED API CONTRACTS

Unified Developer Interface

Query real-time token spend rollups, budget consumption by agent, and cost alert thresholds.

GEThttps://docket.celladoresystems.com/api/v1/spendCost Analytics API
import { DocketClient } from "@celladore/docket-sdk";

const docket = new DocketClient({
  apiKey: process.env.DOCKET_API_KEY || "YOUR_DOCKET_TOKEN",
  endpoint: "https://docket.celladoresystems.com",
});

const report = await docket.getSpendReport({
  workspaceId: "ws_prod",
  breakdown: "by_agent",
});

console.log(`Current LLM spend: $${report.totalCostUsd} (Budget: $${report.budgetCapUsd})`);

Status Notice: Docket powers our internal FinOps and cloud cost operations across the Phoenix VC ecosystem. Architecture and telemetry schema are open for inspection. Contact us if you're building similar FinOps tooling for autonomous agent fleets. Get in touch with the founder .

esc