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

StatusMeaning
queuedAccepted by the API, waiting for a worker slot.
runningWorker is actively calling tools and generating tokens.
waiting_approvalPaused at a human-in-the-loop gate. Resumes after approve/reject.
completedAgent finished successfully.
failedUnrecoverable error — see the transcript for the last tool output.
cancelledStopped 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.

See also