Skip to content
Talk to an engineer

Chat cards

Entity card

One record at a glance: what it is, its status and the 4–6 fields that matter, with a link to open it in your app. The agent answers the question; the card shows the record.

KindRead-onlyAgent waitsNoMobileSame card

Use it when: The user asks about one record (an account, a contact, an order, a project) and the answer is what it is, its status and 4–6 key fields, with a way to open it in your app.

Use something else when: Several records (records list or table). The user wants to change the record (form with approval). More than ~6 fields or long text (link to the record, or a canvas).

The template callsThe agent getsWhen
displayed()FUNCTION_TOOL_DISPLAYEDAs soon as the card shows. The agent goes on.

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 the record again in place, for example after Try again. While execute runs, the SDK shows its own loader.
Emptyexecute found no record that matches. The card says so and the agent offers the closest match.
Errorexecute returned the failure as data, so the agent can explain it. Try again loads the record 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
id (optional)stringYour record’s id. The card doesn’t show it; your actions.run can use it.
kind (optional)stringWhat the record is, above the name: “Account”, “Contact”, “Order”.
namestring
subtitle (optional)string
avatarUrl (optional)stringLogo or photo URL. Without it, or if it fails to load, the card shows initials.
avatarShape (optional)"square" | "circle"”square” (default) for companies and things, “circle” for people.
status (optional)EntityStatus
fieldsEntityField[]4–6 key fields. More are cut.
tags (optional)string[]
owner (optional)EntityOwner
links (optional)EntityLink[]At most 2, in the footer. More are cut.
FieldTypeNotes
labelstring
valuestring | numberA number is formatted with format; a string is shown as is.
format (optional)NumberFormat
icon (optional)IconNameSmall icon before the label.
hint (optional)stringShort note after the value, e.g. “in 108 days”.
href (optional)stringMakes the value a link: a page in your app, mailto: or tel:.
meter (optional)number0–100: draws a thin bar under the value (seat usage, a health score).
tone (optional)EntityToneColour of the meter. Default: info (the brand colour).
wide (optional)booleanFull row in the two-column grid.
FieldTypeNotes
labelstring
tone (optional)EntityToneneutral (default), info, success, warning, error.
FieldTypeNotes
namestring
role (optional)stringe.g. “Account owner”.
avatarUrl (optional)stringPhoto URL. Without it the card shows initials.
FieldTypeNotes
labelstring
href (optional)stringWhere the link goes. Without it, the card calls actions.run(link).
id (optional)stringTells your actions.run which link was clicked.
primary (optional)booleanOne link can be the primary button (brand colour). The others are then outline buttons.
icon (optional)IconName
FieldTypeNotes
run() (optional)(link: EntityLink) => voidA footer link without href was clicked. Open or do 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.