As an agent user, I want to start a conversation with my agent and read its reply as it is written, so that I can get work done from my phone as naturally as texting.
Situation
I have an agent and I am on its detail screen. I have a question or a task in mind.
What I do
Tap "New conversation".
Tap the field at the bottom and type my message.
Tap the send button.
Read the reply as it appears, then write the next message.
What I should see
A new conversation opens as an Agent session that is empty except for "New chat" and "Say something to start this conversation."
At the bottom is a rounded field with the hint "Message" and a round send button. Its border turns the brand colour while I type in it.
The send button is dimmed while the field is empty or holds only spaces.
The field grows as I write more lines, up to a limit, then scrolls.
When I tap send, my message appears at once as a bubble on the right in the brand colour, before the server has confirmed it.
The keyboard stays up and the cursor stays in the field.
When the server accepts the message the field empties and the conversation scrolls to its end.
A line at the end reads "Thinking…", then "Running a tool…" or "Replying…", with "Stop" beside it, while the agent works.
The agent's reply grows in a grey bubble on the left as it is written, and stays there when finished.
Replies are shown as formatted text: bold, lists, code and links are drawn, not raw symbols.
The send button is dimmed while a message is being sent, so nothing is sent twice.
The title in the bar starts as "Conversation" and changes when the server names the conversation.
The conversation follows the newest row as long as I stay at the end.
When something goes wrong
If sending fails, my bubble goes away, my text is still in the field, and a red line at the end of the conversation gives the reason with "Retry". I tap send again. The message then appears once, not twice.
If the agent's reply fails part way, see Steer a run.
Not included
I can send text only. There are no photos, files or voice.
I cannot edit or delete a message, or rename or delete a conversation.
I cannot change the agent's model from inside a conversation.
A draft I did not send is not kept when I leave the conversation.
Trace
Story US-AGENT-05, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.
Design
Page | Part it plays |
|---|---|
The conversation screen: transcript, status line, composer | |
Row kinds and their order, including sending and streaming rows | |
My bubble, the agent's bubble, the sending and streaming bubbles | |
The message field and send button | |
The shared composer pattern | |
How this composer differs from the comment composers | |
New conversation, where a chat starts | |
New chat, before the first message | |
The failure line after a failed send | |
Loading, empty, sending and failed states of the session | |
The chat thread recipe the screen follows | |
A failed send keeps the draft and removes the bubble | |
Brand fill means mine | |
Labels on the field and send button |
Implementation
Page | Part it plays |
|---|---|
AgentSessionScreen, the timeline derivations and composer | |
The session stream: appended events, partial text, phase and status | |
chatRows: session events to bubbles | |
agentsSession, create-session and send commands, caller clock for writes | |
Signed MessageSession and Subscribe envelopes | |
Snapshot plus stream data flow | |
CreateSession, MessageSession, GetSession and the WebSocket frames | |
agentsDraft, agentsOptimistic, agentsThread, agentsChanged, agentsVisibleOptimistic | |
The session route | |
Optimistic row and the owner stamp on the thread | |
Markdown text, virtualized list that follows its end, retained focus | |
Transcript conversion kept linear for long sessions | |
The UI tests of sending and streaming | |
Scripted replies, streaming and /dev/reject-next-message | |
Unit tests of transcript replay and timestamps |
Code
File | What |
|---|---|
AgentSessionScreen | |
Timeline order: history, sending, streaming, tail | |
Message bubbles | |
Parent line or the composer | |
session route | |
agentsThreadData, agentsThread, agentsVisibleOptimistic | |
agentsNewSession, agentsEdit, agentsSend | |
agentsAfterChange | |
AgentSessionScreen wiring | |
agentsSession and agentsSessionStream | |
agentsCommand | |
chatRows |
Tests
File | What it checks |
|---|---|
session opens newest and streams markdown, tool results and run status | |
failed sends keep the draft and recover without duplicate user bubbles | |
agents list, configuration, providers and validated creation | |
transcript and run presentation: replays without duplicate messages and joins tools to results | |
commands sign with the caller clock, never a server-reported time | |
joining tool results stays linear for long sessions (Hermes 100 ms turn budget) |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime