Docsvoxioagent 2.0.0

Server

Sessions and usage

Read a conversation’s transcript, recording and timings, and a flow’s usage over time.

Reading needs only the flow key. Pass it on each call, or set it as the client's default flowKey.

Read a session

Read one session by its id:

const record = await voxio.sessions.get("SESSION_ID", { flowKey: "YOUR_FLOW_KEY" });
record.transcription; // → [{ role: "user", content: "Hi" }, …]
record.recordingUrl; // when recording was on
record.startTime; // ISO 8601
record.totalConnectedTime; // seconds

Replace the following:

  • SESSION_ID: the session's id. It's on the browser session (session.sessionId), in the ended event and in every webhook
  • YOUR_FLOW_KEY: the key of the flow the session belongs to

Read usage

Read a flow's totals for a period, broken down by hour, day, week or month:

const usage = await voxio.sessions.usage({
flowKey: "YOUR_FLOW_KEY",
from: "2026-10-01",
to: "2026-10-31",
bucket: "day",
});
usage.totals.sessions; // → 412
usage.totals["connected-minutes"]; // → 1873
usage.buckets; // one entry per day, with the same fields

Each total and each bucket has these fields:

FieldWhat it counts
sessionsSessions.
connected-seconds, connected-minutesTime on the line.
ai-seconds, human-secondsTime each side spent talking.
ai-tokens, human-tokens, total-tokensTokens on each side.
time-ratio, token-ratioAgent divided by human, or null.

Next steps

  • Webhooks: get each session as it happens instead of reading it later.
  • Server SDK: set a default flow key on the client.