langwatch login on a new machine, the device-flow exchange
mints a Personal Virtual Key bound to your identity + the machine.
Devices is the inventory of where those keys are currently active:
who you are on which device, when each session was started, when it was
last used, and how to revoke any device you no longer need.
Pairs with: Personal IDE keys (the device-flow login that creates each session) and Tile interactions → Coding-assistant tiles (the wrapper commands that consume each session’s VK).
What you see at /me/devices
- Platform icon: macOS, Linux, Windows from the
client_platformcaptured at login. - Device label: the machine’s hostname (e.g.
alice-mbp.local), populated fromos.hostname()at login. If the CLI version is older and didn’t send a label, the entry shows(unknown device). uname -a, the raw kernel string, for power-users who want to disambiguate sessions on machines with the same hostname.- Active for: relative since the session was created.
- Last used: relative since the most recent CLI request hit the gateway with this session’s bearer.
How sessions get created
Every successfullangwatch login --device creates a new session. The
first time the CLI POSTs /api/auth/cli/exchange, it sends a
client_info block:
Revoking a session
Click Revoke on any session card. The corresponding access-token + refresh-token Redis keys are immediately deleted. The next CLI request from that device returns 401. The CLI tries to refresh once. That refresh is refused too because the pair was deleted, and the CLI prints “Session expired, runlangwatch login --device again”.
Revoke all sessions clears every active session in one action,
useful if you suspect a compromise or are leaving the company.
Revoking a session does NOT revoke any virtual key the session minted
(those are persistent until you delete them via /me’s Personal Keys
section). The session is the right to mint + use; the virtual keys
themselves are separate inventory items.
Admin policy: max session lifetime
Your IT admin can cap how long any one session stays valid:- 0 (default): no cap. A session you keep using never expires: every CLI call that needs it rotates the refresh token and restarts its 90-day window. A session that is not used for 90 days expires on its own.
- N days: refresh requests are rejected once
(now - issued_at) > N days. The CLI prints “Your CLI session is older than your organization’s policy. Please runlangwatch loginagain.”
- High-security orgs: 7 days
- Standard enterprises: 30 days
- Open-source, small teams: 0 (unbounded)
What about virtual keys themselves?
Sessions and Personal Virtual Keys are separate but related:- A session is the right to mint + use VKs from one device. Created
by
langwatch login; one per device. - A Personal Virtual Key is the credential the gateway accepts for request authentication. Minted by a session; can be many per session (one per coding-assistant typically).
Where to next
- Personal IDE keys: the device-flow login this surface inventories.
- Portal end-user walkthrough
, the broader
/mesurface this lives within.