Skip to content

AgentMarginProduct

Features

What the v0.3.0-alpha source release does today, what's on main but untagged, and what isn't built yet.

v0.3.0-alpha · experimentalLocalhost onlySource: README.md

What works today

  • Cost engine. Versioned model prices, input, output and cached-token rates, integer microdollar calculations.
  • Trustworthy coverage. Separates provider-reported, estimated and unknown cost. Incomplete data means no final margin, not a misleading zero.
  • Customer attribution. Workspace-scoped, idempotent usage and revenue records in PostgreSQL.
  • Local API and TypeScript SDK. Authenticated /v1/events, /v1/revenue, /v1/analytics and workspace model-pricing endpoints.
  • OpenAI helpers. Map a completed Responses or Chat Completions result to an AgentMargin event in one call.
  • Local React dashboard. Customer economics, cost comparison, coverage and unknown-cost diagnostics, plus a pricing editor. Results warn when truncated.

Workspace pricing

  • Append-only price versions per workspace, with UTC effective dates, a source note and an audit trail.
  • A new price applies to later ingestion only. Stored costs never change retroactively.
  • A Model pricing view in the dashboard to add versions and inspect history.

Semantics and endpoints are on the Pricing API page.

On main, not tagged yet

The main branch holds unreleased experimental work for v0.4–v0.6:

  • A compiled, distributable SDK package with an npm trusted-publishing workflow.
  • A runnable Next.js starter that sends synthetic usage and revenue, with an optional OpenAI call.
  • A reviewed LiteLLM price importer: preview by default, --apply optional, not a provider-verified invoice feed.
  • Paginated analytics with whole-workspace totals.
  • Local-only Anthropic and signed Stripe adapters, not a full production Stripe integration.

Not yet available

  • Automatic instrumentation
  • An official provider price catalog
  • Stripe synchronization
  • A publicly hosted service
  • Production hardening