AgentMarginBlog

AgentMargin v0.3.0-alpha: workspace pricing and a dark dashboard

Each workspace now keeps its own auditable, effective-dated model prices, and the local dashboard has been rebuilt in React.

Release2 min read

v0.3.0-alpha moves AgentMargin from a local accounting demo to workspace-specific, auditable model pricing, with a redesigned dark analytics dashboard. Like every release so far, it's an experimental, localhost-only alpha.

Prices that keep their history

  • Authenticated GET /v1/prices and POST /v1/prices. The workspace comes from the bearer key, never from the request body.
  • Exact microdollar rates per million input, output and optional cached-input tokens. The dashboard takes familiar dollar prices and converts them without floating point.
  • UTC effective-from and optional effective-to dates, a source note, and the creator's key digest instead of the raw key.
  • Append-only history: PostgreSQL blocks updates and deletes.

A new price applies to later ingestion at matching timestamps. Costs already stored don't change when a price is added or superseded.

A rebuilt dashboard

  • React 19 and Vite, with free MIT-licensed Arc UI components.
  • Period selection, customer search and status filters, revenue against known AI cost, coverage, loss-making customer signals and unknown-cost model diagnostics.
  • A Model pricing view for adding versions and reading history.
  • No fabricated time series or growth deltas. Customers with unknown cost are marked unverified.

Try it

bash
git clone https://github.com/rzkarsyad/agentmargin.git
cd agentmargin
npm ci
npm run demo

Paste the printed key into http://127.0.0.1:8787/dashboard and pick a period that includes today's UTC date. No OpenAI credentials are needed.

Known limitations

  • Any valid workspace key can add price versions. There's no RBAC or approval flow yet.
  • No official provider price catalog, automatic instrumentation, stable npm SDK or hosted service.
  • No PostgreSQL RLS, audited TLS ingress, distributed rate limiting, production backups or independent penetration test.
All posts