How grouping works
Every request gets asession_id, one of two ways:
- Explicit — send an
X-Wardin-Session-Idheader and it is trusted as-is. Use this when your client knows its own task boundary (a CI job ID, a ticket number, an agent run ID). - Automatic — without the header, the gateway buckets consecutive requests from the same virtual key using an idle-timeout window (30 minutes, sliding). Each request extends the window; a gap longer than the window starts a new session.
Wardin deliberately ignores agentic clients’ own per-spawn attribution headers —
those are ephemeral process IDs, not identity. Attribution always comes from the
virtual key; sessions only group that key’s requests in time.
What a session gives you
- Cost per task — total spend across every request in the session, with the split token accounting (input / output / cache-creation / cache-read) intact
- Request count and duration — how much traffic one task actually generated
- Model mix — which models the task used
Where sessions appear
- MY LANE — each developer’s own sessions with per-session cost
- Analytics API —
GET /v1/analytics/sessionsfor programmatic access