Sessions
A session is a single agent run — a task trigger, a direct veirox agent run, or an inbound webhook — with its own streaming transcript, cost ledger, and audit trail.
Lifecycle
| Status | Meaning |
|---|---|
queued | Accepted by the API, waiting for a worker slot. |
running | Worker is actively calling tools and generating tokens. |
waiting_approval | Paused at a human-in-the-loop gate. Resumes after approve/reject. |
completed | Agent finished successfully. |
failed | Unrecoverable error — see the transcript for the last tool output. |
cancelled | Stopped by veirox session cancel or veirox agent cancel. |
Streaming & live tailing
The backend exposes an SSE endpoint. The CLI wraps it in veirox logs --follow and veirox tail. Events include message, tool_call, tool_result, thinking, and done.
veirox tail # latest active session veirox logs <session-id> --follow # specific session
Cost tracking
Each session records input tokens, output tokens, and thinking tokens. Run veirox session info <id> for a per-session breakdown, or veirox session stats for aggregate monthly cost.