Knowledge Portal · engineering documentation

Skip to content

Federated from workspace · PL-002 · zaixos-design-system/docs/experience/ai-agent/BLOCK_SCHEMA.md Do not edit canonical truth here — update the source repo, then re-run npm run docs:sync.


Agent Response Block Schema

Version: 1.0
Enum: Zaixos\DesignSystem\Experience\Agent\AgentResponseBlockType

All blocks are JSON-serializable arrays with a required type field matching the enum value.


Common rules

  • Unknown type values are silently dropped by AgentBlockNormalizer
  • Empty optional strings are omitted in rendering
  • URLs must be product-scoped and authorization-checked before inclusion in blocks
  • Blocks render in array order

json
{
  "type": "header",
  "title": "Today at a glance",
  "meta": "Cliniczos · 2026-07-04"
}
FieldTypeRequired
titlestringYes
metastringNo

text

json
{
  "type": "text",
  "content": "Operational summary ready.",
  "variant": "body"
}
FieldTypeRequiredValues
contentstringYes
variantstringNobody, lead

metric_grid

json
{
  "type": "metric_grid",
  "items": [
    {
      "label": "New leads",
      "value": "12",
      "foot": "Today",
      "url": "/admin/leads",
      "tone": "default"
    }
  ]
}
Item fieldTypeRequiredValues
labelstringYes
valuestringYes
footstringNo
urlstringNoMakes card clickable
tonestringNodefault, warn, success

section

json
{
  "type": "section",
  "title": "Critical items",
  "tone": "critical",
  "count": 2,
  "items": [
    { "text": "3 overdue follow-ups", "why": "Revenue at risk", "url": "/admin/leads?filter=overdue" }
  ]
}
FieldTypeRequiredValues
titlestringYes
tonestringNodefault, critical, warning
countintNoBadge count
itemsarrayYesSee list item

List item: text, why (optional), url (optional)


json
{
  "type": "recommended",
  "title": "Recommended actions",
  "items": ["Review ad spend", "Call hot leads"]
}
FieldTypeRequired
titlestringNo
itemsstring[]Yes

actions

json
{
  "type": "actions",
  "items": [
    {
      "label": "Open leads",
      "url": "/admin/leads",
      "icon": "heroicon-o-arrow-top-right-on-square",
      "tone": "success"
    }
  ]
}
Item fieldTypeRequiredValues
labelstringYes
urlstringNo
iconstringNoHeroicon name
tonestringNosuccess, error, default

alert

json
{
  "type": "alert",
  "tone": "warning",
  "title": "Access limited",
  "body": "You can view summaries but not financial drill-down."
}
FieldTypeRequiredValues
tonestringNoinfo, warning, error, success
titlestringYes
bodystringNo

media

json
{
  "type": "media",
  "kind": "image",
  "src": "https://cdn.example.com/chart.png",
  "alt": "Weekly trend",
  "caption": "Lead volume — last 7 days"
}
FieldTypeRequiredValues
kindstringNoimage, video, embed
srcstringYes
altstringNo
captionstringNo
posterstringNoVideo poster URL

divider

json
{ "type": "divider" }

No additional fields.

ZAIXOS Knowledge Portal — public engineering docs at /docs · Staff operations at /admin