AI agent cost per user session: the unit economics metric every AI product team needs to track

When you ship an AI agent to real users, cost-per-session becomes as important as cost-per-acquisition. A free-tier user who runs 10 agent sessions per day at $0.30 per session costs your company $3/day — more than most SaaS products charge for free-tier users in a month. At scale, untracked per-user LLM spend can make a growing AI product less profitable at higher user counts, not more. This page explains how to measure cost per user session accurately, how to set per-user caps that protect margins without degrading experience, and how to identify the power users and edge cases that drive 80% of your LLM bill.

Why per-user cost tracking is hard

How to track cost per user session

Setting per-user budget caps by plan tier

Reducing cost per session without degrading quality

Per-user cost management approaches

ApproachGranularityReal-time cap?Implementation effort
OpenAI usage dashboardAccount-level onlyNo (weekly alerts)None — but useless for attribution
Log + attribute post-hocPer requestNoMedium — needs log pipeline
Session-scoped RunGuardPer session + per userYes — fires before limit exceededLow — one guard per session
Database usage countersPer user + per daySoft (check before each session)Medium — DB read/write per call
Middleware rate limiterPer request (not per session)YesLow — but doesn’t account for per-call cost variability