Haruno Knowledge base

Sessions

Look at recent work sessions, open one to see what happened and what it cost, and stop one that is still running.

  • Operator consoleAvailable

A session is one chat or task in the Haruno app. Sessions is the first page of the console. It shows recent sessions, how long each took, what each cost and whether anything failed.

Use it to find out whether someone's work ran, to read what happened in one session, and to stop a session that must not carry on.

The list

One row per session. A live session has a green edge, a session with errors a red one.
The Sessions page: summary cards, filters and a table of sessions with a live one at the top and one with two errors

Across the top:

  • Errors Only shows only sessions where something failed.
  • The time buttons run from 6h to 1y. The page opens on 24 hours.
  • The timer menu sets how often the list refreshes itself: Auto: Off, 15s, 30s or 60s. It opens on 15 seconds.
  • The cards give the number of requests, the error rate, the number of sessions, the total spend and the tokens. A token is a small piece of text. It is the unit the service counts in. The error rate turns red above 5%.

Below the cards, type in the search box to filter by session ID, tool, agent, model or key name. The Tool, Agent, Model and Key menus filter too. Clear filters removes them.

ColumnWhat it shows
SessionThe first eight characters of the session ID, and under it the name of the key that was used. Point at a row and a copy icon appears.
StartedWhen the session began
ToolA tool name, when the session used a special tool such as web search
ModelsThe AI settings the session used
AgentsThe helpers Haruno handed part of the work to. Empty when there were none
CallsHow many times the AI was called
TokensHow much text was processed
CostWhat the session cost Haruno. It turns amber above 10 cents
DurationHow long the work took in total
Statuslive if there was activity in the last three minutes, then ok or the number of errors
Cost is our cost

Every cost on this page is what the AI work cost Haruno. It is not what the customer paid. For income, see Financials.

The search looks at key names, not at people. To start from a person, open them on the Users page and look at their Sessions tab.

Long windows

The 90d and 1y buttons are there, but the service answers this page for up to 30 days. If a longer window shows an error instead of a list, switch back to 30d.

Open a session

Click a row. The header shows the full session ID with a copy button, and a Live or Complete badge. The cards give the number of calls, the spend and the tokens. Prompt is the text sent to the AI. Completion is the text it wrote back. While a session is live, Auto refreshes the page every five seconds.

Press Back to sessions or the Backspace key to return to the list.

The live service does not keep what was said

In the live service the text of conversations is not stored. The Sequence and Conversation views then show a notice saying that message content is not recorded. The cards, the costs, the token counts and the times still work. Some test environments do keep the text. Where text is kept, it is blanked after a number of days and the notice says so. Costs and timings are kept.

So an operator cannot tell you what a customer typed or what Haruno answered.

Three views read the same session in different ways.

Sequence

The default view. A helper's steps appear in the place where they happened.
The Sequence view of a session: a question from the user, the assistant reading statements, a hand-over to a helper, and the helper's own steps

Every message in every lane, in the order it happened. A lane is one line of work: the main one, and one for each helper.

  • The row of Lanes buttons filters to one lane. all shows everything.
  • Each message has a time, its lane and three numbers: characters (c), tokens (t) and cost. A ~ before the tokens means an estimate. The cost on a message is its share of the AI call it belongs to.
  • A line that says call end closes one AI call. Its cost is the one measured figure. Check it against what Haruno was charged. The shares on the messages above it are estimates, so they do not add up exactly to it.
  • Compaction means Haruno shortened the conversation at that point. The line says how many messages were dropped.
  • A dimmed message marked side thread is a side question. The main line carried on without it.
  • A → Dispatch card shows where Haruno handed work to a helper. Click it to jump to the helper's lane.
  • The small call link on a message opens that call (see below).

Tree

The Tree view: the main lane and one helper under it, each with calls, tokens, spend and duration

Who handed work to whom. For each lane it shows calls, tokens, spend and duration, including everything below it. A thin bar shows its share of the session's spend, and turns amber above 30%. Click a lane to open the Sequence view filtered to it. A lane marked inferred was matched to its hand-over by timing. That is a strong guess, not a fact.

Conversation

The last request, read from top to bottom. The system text at the top is folded: click it to open it. A dispatch card expands to show what the helper did. A Tool result line is folded until you click it.

Technical Details and the call drawer

Under the views, Technical Details opens a table with one row for each AI call: its number, the setting used, the spend, the tokens and the status. Click a row, or the call link in the Sequence view, to open the drawer for that call.

The call drawer: the call's ID, cost, tokens and status above the messages that were sent in that call

The drawer shows the call's ID with a copy button, its cost, its tokens and its status. Under that are the messages sent in that call. Raw Response unfolds the answer exactly as it came back.

Stopping a session

A session that is still live has a stop icon at the right end of its row. It shows when you point at the row.

The Terminate Session confirmation: active requests will be cancelled and no new requests accepted
  1. Click the stop icon.
  2. Read the confirmation and press Terminate.

Requests that are running are cancelled. The session accepts no new requests. The logs stay.

You cannot undo it

Once a session is terminated, further requests from it are refused. The person has to start a new chat. Only a super admin can do this. A viewer is told their role does not allow it.

What a person in support or sales can ask an operator

  • "Did this customer's work at about 3 pm run, and did anything fail?" Switch on Errors Only, pick the time window and look for their key.
  • "How much did that one task cost?" Open the session and read Spend.
  • "A customer says their chat is stuck." Look for a live session on their key and see how long since its last activity. If it is looping, a super admin can terminate it.

Last updated · PR #2944 · View this version on GitHub

History (1 version)
  1. Internal knowledge base for staff: site, reader keys, assistant, 197 pages and the PR rule (#2944)
    What changed
    @@ -0,0 +1,123 @@
    +---
    +title: Sessions
    +summary: Look at recent work sessions, open one to see what happened and what it cost, and stop one that is still running.
    +feature: ops-sessions
    +covers:
    +  - web/monitoring/components/SessionsPage.tsx
    +  - web/monitoring/components/SessionDetailView.tsx
    +  - web/monitoring/components/SessionTimelineView.tsx
    +  - web/monitoring/components/SessionTreeView.tsx
    +  - web/monitoring/components/CallMessagesDrawer.tsx
    +  - web/monitoring/components/SubagentDrawer.tsx
    +  - web/monitoring/components/MessageBody.tsx
    +  - web/monitoring/components/StatsCards.tsx
    +  - web/monitoring/components/TimeFilter.tsx
    +  - server-dotnet/src/Haruno.Server/Controllers/MonitoringController.cs
    +---
    +
    +A session is one chat or task in the Haruno app. **Sessions** is the first page of the console. It shows recent sessions, how long each took, what each cost and whether anything failed.
    +
    +Use it to find out whether someone's work ran, to read what happened in one session, and to stop a session that must not carry on.
    +
    +## The list
    +
    +<Shot src="/m/8aaf098891c9-ops-sessions-list-dark.png" alt="The Sessions page: summary cards, filters and a table of sessions with a live one at the top and one with two errors" caption="One row per session. A live session has a green edge, a session with errors a red one." />
    +
    +Across the top:
    +
    +- **Errors Only** shows only sessions where something failed.
    +- The time buttons run from **6h** to **1y**. The page opens on 24 hours.
    +- The timer menu sets how often the list refreshes itself: **Auto: Off**, **15s**, **30s** or **60s**. It opens on 15 seconds.
    +- The cards give the number of requests, the error rate, the number of sessions, the total spend and the tokens. A token is a small piece of text. It is the unit the service counts in. The error rate turns red above 5%.
    +
    +Below the cards, type in the search box to filter by session ID, tool, agent, model or key name. The **Tool**, **Agent**, **Model** and **Key** menus filter too. **Clear filters** removes them.
    +
    +| Column | What it shows |
    +|---|---|
    +| Session | The first eight characters of the session ID, and under it the name of the key that was used. Point at a row and a copy icon appears. |
    +| Started | When the session began |
    +| Tool | A tool name, when the session used a special tool such as web search |
    +| Models | The AI settings the session used |
    +| Agents | The helpers Haruno handed part of the work to. Empty when there were none |
    +| Calls | How many times the AI was called |
    +| Tokens | How much text was processed |
    +| Cost | What the session cost Haruno. It turns amber above 10 cents |
    +| Duration | How long the work took in total |
    +| Status | **live** if there was activity in the last three minutes, then **ok** or the number of errors |
    +
    +<Callout variant="info" title="Cost is our cost">
    +Every cost on this page is what the AI work cost Haruno. It is not what the customer paid. For income, see [Financials](/ops/customers/financials/).
    +</Callout>
    +
    +The search looks at key names, not at people. To start from a person, open them on the [Users](/ops/customers/users/) page and look at their **Sessions** tab.
    +
    +<Callout variant="warning" title="Long windows">
    +The **90d** and **1y** buttons are there, but the service answers this page for up to 30 days. If a longer window shows an error instead of a list, switch back to **30d**.
    +</Callout>
    +
    +## Open a session
    +
    +Click a row. The header shows the full session ID with a copy button, and a **Live** or **Complete** badge. The cards give the number of calls, the spend and the tokens. **Prompt** is the text sent to the AI. **Completion** is the text it wrote back. While a session is live, **Auto** refreshes the page every five seconds.
    +
    +Press **Back to sessions** or the Backspace key to return to the list.
    +
    +<Callout variant="warning" title="The live service does not keep what was said">
    +In the live service the text of conversations is not stored. The **Sequence** and **Conversation** views then show a notice saying that message content is not recorded. The cards, the costs, the token counts and the times still work. Some test environments do keep the text. Where text is kept, it is blanked after a number of days and the notice says so. Costs and timings are kept.
    +
    +So an operator cannot tell you what a customer typed or what Haruno answered.
    +</Callout>
    +
    +Three views read the same session in different ways.
    +
    +### Sequence
    +
    +<Shot src="/m/7b92b648e627-ops-session-sequence-dark.png" alt="The Sequence view of a session: a question from the user, the assistant reading statements, a hand-over to a helper, and the helper's own steps" caption="The default view. A helper's steps appear in the place where they happened." />
    +
    +Every message in every lane, in the order it happened. A lane is one line of work: the main one, and one for each helper.
    +
    +- The row of **Lanes** buttons filters to one lane. **all** shows everything.
    +- Each message has a time, its lane and three numbers: characters (**c**), tokens (**t**) and cost. A **~** before the tokens means an estimate. The cost on a message is its share of the AI call it belongs to.
    +- A line that says **call end** closes one AI call. Its cost is the one measured figure. Check it against what Haruno was charged. The shares on the messages above it are estimates, so they do not add up exactly to it.
    +- **Compaction** means Haruno shortened the conversation at that point. The line says how many messages were dropped.
    +- A dimmed message marked **side thread** is a side question. The main line carried on without it.
    +- A **→ Dispatch** card shows where Haruno handed work to a helper. Click it to jump to the helper's lane.
    +- The small **call** link on a message opens that call (see below).
    +
    +### Tree
    +
    +<Shot src="/m/f994f3d5b29a-ops-session-tree-dark.png" alt="The Tree view: the main lane and one helper under it, each with calls, tokens, spend and duration" />
    +
    +Who handed work to whom. For each lane it shows calls, tokens, spend and duration, including everything below it. A thin bar shows its share of the session's spend, and turns amber above 30%. Click a lane to open the Sequence view filtered to it. A lane marked **inferred** was matched to its hand-over by timing. That is a strong guess, not a fact.
    +
    +### Conversation
    +
    +The last request, read from top to bottom. The system text at the top is folded: click it to open it. A dispatch card expands to show what the helper did. A **Tool result** line is folded until you click it.
    +
    +## Technical Details and the call drawer
    +
    +Under the views, **Technical Details** opens a table with one row for each AI call: its number, the setting used, the spend, the tokens and the status. Click a row, or the **call** link in the Sequence view, to open the drawer for that call.
    +
    +<Shot src="/m/2a454f540ddb-ops-session-call-dark.png" alt="The call drawer: the call's ID, cost, tokens and status above the messages that were sent in that call" />
    +
    +The drawer shows the call's ID with a copy button, its cost, its tokens and its status. Under that are the messages sent in that call. **Raw Response** unfolds the answer exactly as it came back.
    +
    +## Stopping a session
    +
    +A session that is still live has a stop icon at the right end of its row. It shows when you point at the row.
    +
    +<Shot src="/m/8e9d6c7fad1e-ops-session-terminate-dark.png" alt="The Terminate Session confirmation: active requests will be cancelled and no new requests accepted" />
    +
    +1. Click the stop icon.
    +2. Read the confirmation and press **Terminate**.
    +
    +Requests that are running are cancelled. The session accepts no new requests. The logs stay.
    +
    +<Callout variant="warning" title="You cannot undo it">
    +Once a session is terminated, further requests from it are refused. The person has to start a new chat. Only a super admin can do this. A viewer is told their role does not allow it.
    +</Callout>
    +
    +## What a person in support or sales can ask an operator
    +
    +- "Did this customer's work at about 3 pm run, and did anything fail?" Switch on **Errors Only**, pick the time window and look for their key.
    +- "How much did that one task cost?" Open the session and read **Spend**.
    +- "A customer says their chat is stuck." Look for a live session on their key and see how long since its last activity. If it is looping, a super admin can terminate it.