Skip to content
Talk to an engineer

Chat cards

Timeline

What happened to one record, newest first and grouped by day: who did it, what changed from what to what, and the comment or email behind it. Long feeds fold behind “Show earlier events”.

KindRead-onlyAgent waitsNoMobileSame card, 44px links and button

Use it when: The user asks what happened to one record (a deal, a ticket, an order): who did what and when, in order. Comments, emails, status moves and field changes, grouped by day.

Use something else when: The record’s current state matters more than its history (entity card). Events across many records (records list or table). A trend in numbers over time (chart).

The template callsThe agent getsWhen
displayed()FUNCTION_TOOL_DISPLAYEDAs soon as the card shows. The agent goes on. Opening an event is your app’s job.

Besides its data, the template draws these as itself, with mountState(). Pick one on the preview with State.

StateWhen it shows
LoadingWhile the card loads again in place, for example after Try again. While execute runs, the SDK shows its own loader.
Emptyexecute found no events for the record. The card says so and the agent explains why.
Errorexecute returned the failure as data, so the agent can explain it. Try again loads in place.
mountState({ root, head, title: "…", state: { kind: "error", text: "…", retry } });

The hosted action and the in-page handler below show each case. The state types are LoadingState, EmptyState and ErrorState in fs-kit.

FieldTypeNotes
titlestring
subtitle (optional)string
icon (optional)IconNameDefault: clock.
eventsTimelineEvent[]In any order: the card sorts them newest first and groups them by day.
visible (optional)numberHow many events show before “Show N earlier events”. Default: 5.
footnote (optional)stringShort note on the left of the footer, e.g. “Last 30 days”.
link (optional){ label: string; href: string }A footer link to the full history in your app.
FieldTypeNotes
idstringYour event’s id: actions.open gets the event back.
kindTimelineKindSets the icon and its tone: created, updated, comment, status, email, call or system.
actor (optional)stringWho did it, by name. Leave it out for events your system made.
actorAvatarUrl (optional)stringA photo for the actor’s avatar. Falls back to initials.
actionstringWhat happened, after the actor’s name: “moved the deal to Negotiation”. Without an actor, the whole sentence.
atstringWhen, as an ISO 8601 time. Shown relative (“2 hours ago”), the exact time on hover.
detail (optional)stringA comment’s text, an email’s subject or a call’s note. Up to three lines show.
changes (optional)TimelineChange[]Field changes, drawn as old value, arrow, new value.
linkLabel (optional)stringShows a link on this event, e.g. “Open email”. With href it goes there; without, it calls actions.open.
href (optional)stringWhere the event’s link goes in your app.
FieldTypeNotes
fieldstringThe field’s name, e.g. “Stage”.
from (optional)stringThe old value. Leave it out when the field was empty.
tostringThe new value.
FieldTypeNotes
open() (optional)(event: TimelineEvent) => voidAn event’s link was clicked and the event has no href. Open it in your app.

Copy the template and the shared kit into your code: agent/ui/ in an agent repo, or anywhere in your app. The template imports only ./fs-kit.js. Then wire it up from the hosted action or the in-page handler.

The hosted action needs an agent repo with one folder per action (agent/actions/<action_key>/index.ts). If your repo keeps its actions in agent/actions/index.ts, use the in-page handler: it runs the same template in your app.

All templates in machine-readable form: /ui-catalog/catalog.json.