Open documents and links an agent refers to
An agent user wants to tap a document, web page or conversation that an agent mentions or worked on and go straight to it.

As an agent user, I want to open the documents, web pages and conversations my agent mentions or worked on, so that I can check its sources and read what it wrote.

Situation

I am in a conversation. The agent's reply links to a Seed document, or one of its tool cards says it read, wrote or published something. I want to see the thing itself.

What I do

    Tap a document link inside the agent's reply.

    Or tap a tool card to open it, then tap "Open source".

    Read the document or page.

    Come back to the conversation.

What I should see

    A link to a Seed document inside a reply, a system note or a handoff note is drawn in the brand colour, so I can tell it can be tapped (chat messages).

    Tapping it opens the document as a Document screen inside the app, on top of the conversation. Back returns to the conversation.

    A tool card that acted on a Seed document or a web page shows what it acted on and a small label, "hm doc" or "web".

    An opened tool card has a button "Open source" when the tool acted on a document or a web page.

    "Open source" on a Seed document opens it inside the app, the same way as a link in a reply.

    "Open source" on a web page opens that address outside the app, in the browser.

    A tool that handed work to another conversation has a row on its card with that conversation's title. Tapping it opens that conversation in the app.

    A tool that acted on another conversation opens that conversation in the app when I tap "Open source".

    Tools that worked on the agent's memory or its own tools show no "Open source", because there is nothing on the phone to open.

When something goes wrong

    If the document does not appear after I tap a link, I tap back to return to the conversation and find the document from the Read tab instead. Loading from a conversation is not confirmed (see below).

Not included

    Opening a document from a conversation is not proven. The document screen is put on top of the conversation in the Agents tab, while the app loads documents for screens in the Read tab. Whether it loads in place was not observed and no test taps a link or "Open source" (moving between tabs).

    Ordinary web links written inside a reply are not confirmed to open from the bubble. Only Seed document links are set up as tappable there.

    Links inside an opened tool card's input and output are plain text. They cannot be tapped.

Trace

Story US-AGENT-10, status Partial. 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

Moving between tabs and into the app

Agent links to documents and web pages; records that loading is not verified

Chat messages and the streaming reply

Seed document links in a bubble, drawn in the brand colour

AgentToolRow

Source chip, Open source and the child conversation row

Agent session

The actions that open documents, pages and conversations

Session timeline

Which rows carry links

Document and site home

The screen a Seed document opens as

AgentChildRow

Rows that open another conversation

Share, copy and open

Open in the app or outside it

link

Link behaviour

Color and tokens

Brand colour marks a tappable document link

Implementation

Page

Part it plays

Agents: providers, models and tool summaries

Tool address parsing, link targets and source chips

Agents: chat rows and run cards

The url of a tool row: document, web page or conversation

Agents: screens and components

The agentDocument atom and Open source button

Root declarations: Activity and Agents

agentsNavigate: hm:// to the doc route, web addresses outside the app

Navigation and routes

How go places a route from another tab

Deep links and URL handling

hm:// handling in the app

Read: root contract wiring

Documents are requested for entries on the Read stack

Read: loading pages, caches and embeds

How a document page is loaded

Contract views and built-in calls

Atoms in Markdown text and openURL

Bun unit tests

Unit tests of address parsing and chips

Code

File

What

agents.contract L5-5

atom agentDocument

agents.contract L495-496

openDocument action

agents.contract L556-590

Markdown rows with tappable document links

agents.contract L320-335

Source chip and child conversation row

agents.contract L359-361

Open source button

app.contract L417-429

agentsNavigate

app.contract L93-94

readStack and readRefs: documents load for Read stack entries

src/agents/model.ts L156-206

tool row url, chip and child conversation

src/agents/tool-summary.ts L174-225

parseToolAddress and targetFor

src/agents/tool-summary.ts L397-421

resolveToolRowSummary and toolRowSourceChip

Tests

File

What it checks

src/agents/__tests__/parity.test.ts

source chips cover the complete RN address registry and legacy writes

agents.test.contract

trigger context, structured parts and source chips retain the message story

agents.test.contract

nested runs group by stable plan step and child conversations navigate both ways

Delivery

Delivered by #1470.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime