Analysis

Choosing Between Headless Experience Layer and AI Assistant Rendering

When to use HXL widgets in Agentforce, Slackbot, ChatGPT, and Claude, and when to rely on standard model rendering

4 min read
עב
Choosing Between Headless Experience Layer and AI Assistant Rendering
Based on original reporting bySalesforce Blog ↗Translated and summarized by our AI-assisted news systemHow we work

Executive summary

What to know

  1. The HXL layer allows defining an interface once as a structured widget and displaying it in Agentforce, Slackbot, ChatGPT, and Claude.

  2. There are three ways to present Salesforce action results: AI assistant rendering, shipping an HXL widget, or building a Lightning web component.

  3. An HXL widget is composed in JSON from 22 components, fixing field order, grouping, and buttons compared to variable model summaries.

  4. HXL beta components do not include a chart, making assistant rendering or an LWC necessary when charts are required.

According to an article published on Salesforce Blog, most tool calls within the Model Context Protocol (known as MCP) conclude when a tool running on an MCP server returns a JSON result, and the large language model (LLM) inside the AI assistant, such as Claude or Slackbot, summarizes the received data. This approach leaves it up to the model to decide what details to emphasize and which data points will be included in the final displayed output. Salesforce's Headless Experience Layer (or HXL for short) allows developers to determine how output is presented to end users by defining the interface once as a structured widget and displaying it natively in supporting AI assistants. Currently, HXL supports Agentforce employee agents in Lightning Experience, along with ChatGPT, Claude, and Slackbot as beta channels, and the offering is provided under the Beta Services Terms. The HXL layer is part of the Headless Toolkit that brings interactive experiences to AI assistants, with the Headless Toolkit serving as a collection of MCP servers, skills, APIs, and developer tools powering the AIforce strategy to bring all Salesforce context to the interface where the user works.

Three Ways to Present Salesforce Action Results and When to Rule Out HXL

When a developer can determine how output is displayed, they can choose what to emphasize and how to render the information for each use case, even when the data originates from the same MCP server. According to the article, there are three ways to present the result of a Salesforce action to users: letting the AI assistant render it on its own, sending an HXL widget, or building a Lightning web component (or LWC) for users who do not work inside an AI assistant. The guiding rule is to send an HXL widget when each value must appear in the same place every time the result is shown, and to let the assistant render the result when the user only needs an answer. If users do not work inside an AI assistant, the interface is built on a Lightning page.

The article details when to rule out the use of HXL in advance: if users perform their work on a Lightning record page or in a console application such as Service Console and do not turn to an AI assistant to obtain results, HXL is not needed. In these cases, it is recommended to start with standard page components, and build a Lightning web component only when standard components cannot display what the user needs. This principle also applies to an Experience Cloud site that does not yet have an agent embedded in it. Conversely, if users request results inside Claude, ChatGPT, Slackbot, or through an Agentforce employee agent in Lightning Experience, developers face only two options: let the assistant render the tool result or send an HXL widget.

When Assistant Rendering Is Sufficient and When an HXL Widget Is Needed

Displaying a result inside an AI assistant does not require using a widget. Assistants such as Claude, ChatGPT, and others already render MCP tool results as text, lists, and tables. For exploratory questions, such as checking what is happening with a specific client account, this presentation is entirely sufficient. The user wants an answer, and a summary that varies from run to run causes no harm, meaning adding a widget would only introduce unnecessary build and maintenance overhead.

In contrast, an HXL widget should be sent when the presentation itself matters: which fields appear and in what order, how they are grouped and labeled, and which buttons are presented to the user. Leaving this to the AI assistant means it decides all these details and can decide differently on every run. A tighter output structure from the action only shapes the data the assistant receives back, leaving the assistant to choose how to lay it out. A widget, by comparison, renders from its own standalone definition, which is why only a widget fixes the component order, grouping, and buttons. A widget defines the structure once, allowing it to be tested in advance.

Approval requests are a good example of this. A sales manager approves discounts in Slackbot several times a day. If the assistant renders each request on its own, the discount rate might lead one answer but appear halfway down the next, and the policy limit might not appear at all. A widget positions the requested discount directly alongside the policy limit in the same place every time it renders, with Approve and Reject buttons that send the manager's decision back to the assistant, which then calls the approval action. In this way, the manager can make a decision without reading the entire response.

Design Once and Ship to Multiple AI Assistants

The sales manager from the approvals example is likely to use a common pairing: an Agentforce agent in Lightning Experience alongside Slackbot. If the manager works in Salesforce during morning hours and in Slack for the rest of the day, the discount request needs to look identical in both environments. Without HXL, two separate builds of the same card are required: a Lightning web component to render the action output in Agentforce, and a custom Block Kit message for Slack. With HXL, a single widget that both interfaces can render replaces both builds. The developer still connects the widget to external MCP channels via metadata, but the card itself is built only once. The cost of building the widget remains the same whether it renders in a single assistant or across four, so the investment pays off more as users operate in more assistants.

In addition, the HXL Playground environment enables developers to define the interface once as a widget and preview how it renders in Agentforce, Slackbot, ChatGPT, and Claude using mock data.

Technical Structure: HXL Components, Lightning Types, and MCP Server Wiring

HXL widgets are defined in metadata rather than being arbitrary React applications. The widget resides inside the Salesforce organization (org) and describes what the user sees: which HXL components appear, in what order, and which fields from the action's output populate them. Each supported assistant renders these components in its native style.

A developer composes the widget in JSON format from HXL's 22 components, such as rows, tables, badges, links, callouts, and buttons. The same definition is deployed to Agentforce, Slackbot, ChatGPT, and Claude without changes. Each assistant renders it in its native style, and a few component properties behave differently across interfaces. A widget can be built and tested in the HXL Playground or generated using Agentforce Vibes.

Custom Lightning types connect the widget to data by mapping the fields of the action's structured output to the widget's attributes: one Apex-based type for Agentforce, and two object-based types for MCP channels—one as a result wrapper and one as the payload.

To display the widget in an AI assistant, it is attached to the action that returns the data. In Agentforce, the custom Lightning type is selected as the action's output rendering. For Slackbot, ChatGPT, and Claude, the action is added as a tool on a custom MCP server within the org, the widget is attached to that tool, and each assistant is connected to the server, which is configured once for all three. This path currently works exclusively for invocable actions, requiring the approval request to be built as an Apex invocable action from the start.

Widget Limitations and Scenarios Unsuited for HXL

This path is not suitable for every approval scenario. If the manager wishes to compare the request against a chart showing past account discounts, the widget cannot draw a chart, because none of the 22 components in the HXL beta release is a chart component. In this situation, the AI assistant should be allowed to render the result, as Claude and ChatGPT can draw a chart from a tool result when the user requests one. Alternatively, if the manager works exclusively in Agentforce within Lightning Experience, a Lightning web component based on the same custom Lightning type can draw the chart.

Furthermore, if the manager wants to drag the discount amount and see how the profit margin recalculates before granting approval, that is modeling work. Work of this nature belongs on the Opportunity record page in Lightning Experience, rather than in a conversational exchange with an AI assistant.

In summary of the decision framework, the article emphasizes choosing based on where users work and what they need to see: if they work on a Lightning record page or on an Experience Cloud site without an agent, build using LWC components and leave HXL out. If they work in an AI assistant, allow the assistant to render the result when they only require an answer (including chart requests). Conversely, ship an HXL widget when it matters where each value appears and what sits beside it, as the model could place it elsewhere on the next run. The article points to further reading in Salesforce trust and architecture guides, a developer post on building interactive UI, and the HXL developer guide.

Was this useful for your business?

Questions & Answers

FAQ

This article was produced by our AI-assisted system through translation, summarization, and automated quality controls based on original reporting by Salesforce Blog. Read about our editorial process. Link to the original source.

Get useful AI updates by email

A concise digest from our news desk.

More from Salesforce Blog

All articles from Salesforce Blog
מדריך Salesforce לניהול טוקנים ביישומי בינה מלאכותית לעסקים
מדריך
4 דקות
מ־Salesforce Blog

מדריך Salesforce לניהול טוקנים ביישומי בינה מלאכותית לעסקים

מדריך שפרסמה Salesforce מפרט כיצד פועל ניהול טוקנים (Token Management) וכיצד הוא משפיע על פעילותם של עסקים קטנים ובינוניים המשתמשים בבינה מלאכותית. טוקן הוא מקטע טקסט בסיסי – מילה, שבריר מילה או סימן פיסוק – שמודלי שפה גדולים קוראים בהנחיות ומייצרים בתשובותיהם, כאשר ככלל אצבע באנגלית טוקן אחד שקול לכארבעה תווים. המדריך מסביר כי היקף הטוקנים קובע את העלויות, את מהירות התגובה ואת איכות התשובות שמתקבלות. אף ש-88% מהעסקים הקטנים והבינוניים כבר עושים שימוש בבינה מלאכותית, לרבים מהם אין תוכנית מסודרת לניהול הצריכה. המאמר סוקר הרגלים מעשיים לצמצום שימוש עודף, לצד כלים כמו Salesforce Agentforce לניטור הפעולות.

קרא עוד
תזמור סוכני בינה מלאכותית: המדריך לניהול כוח העבודה העסקי החדש
מדריך
5 דקות
מ־Salesforce Blog

תזמור סוכני בינה מלאכותית: המדריך לניהול כוח העבודה העסקי החדש

מדריך שפורסם על ידי סיילספורס (Salesforce) מפרט כיצד פועל תזמור של סוכני בינה מלאכותית (AI orchestration) ומה תפקידו של מתזמר הבינה המלאכותית בעסקים. לפי המדריך, תזמור עוסק בתיאום בין סוכנים מרובים כך שכל שלב מנותב לסוכן המתאים ביותר, בעוד אדמיניסטרציית בינה מלאכותית מתמקדת בתחזוקה, הרשאות ובדיקת איכות הנתונים. המדריך מציג מחזור עבודה קבוע הכולל קליטה, ניתוב, פעולה וסקירה אנושית, ומדגיש כי מחקר של Slack מצא ש-41% מהזמן בעבודה אובד על משימות חזרתיות. כדי לתזמר סוכנים אין צורך בידע בכתיבת קוד, אלא בשיקול דעת, בניסוח הנחיות ברורות ובשימוש במערכת CRM כבסיס נתונים משותף המונע ניחושים ושומר על רצף המידע.

קרא עוד
מדריך סיילספורס לפיתוח סוכני AI, אפליקציות וארכיטקטורת Headless
מדריך
4 דקות
מ־Salesforce Blog

מדריך סיילספורס לפיתוח סוכני AI, אפליקציות וארכיטקטורת Headless

לפי מדריך שפרסמה סיילספורס, ארגונים נדרשים להתאים את מחזורי הפיתוח לעידן הבינה המלאכותית ולפתח סוכנים ואפליקציות מבלי להתפשר על אבטחה ואיכות. המדריך מתווה תהליך עבודה מודולרי בן שישה שלבים הכולל תכנון, בנייה, בדיקה, פריסה, ניטור והרחבה, תוך שילוב עקבי של משילות ואבטחה לכל אורך הדרך. במסגרת הבנייה מוצגים כלי פיתוח שונים, בהם Vibe coding, כלי Low-code ו-No-code כגון Builder Central, לצד ניתוב מחדש של קידוד מסורתי למשימות מותאמות אישית. שלבי הבדיקה והפריסה נשענים על סביבות Sandbox, מיסוך נתונים וכלי DevOps מובנים, בעוד ששכבת Headless ופרוטוקולי MCP מאפשרים לחבר את הסוכנים למערכות ארגוניות ולנתונים מנוהלים.

קרא עוד
סיילספורס השיקה את AI Skills ב-Agentforce Coworker
מוצר חדש
4 דקות
מ־Salesforce Blog

סיילספורס השיקה את AI Skills ב-Agentforce Coworker

סיילספורס הודיעה על זמינות כללית של AI Skills בתוך Agentforce Coworker. מיומנויות אלו מאפשרות למשתמשים להגדיר בשפה פשוטה סט הוראות לשימוש חוזר עבור משימות שחוזרות על עצמן, כך שהסוכן יוכל לבצע אותן בעקביות. Coworker, המתאם בין סוכני Agentforce ב-Salesforce, ב-Microsoft Teams ובמובייל, הוא הסוכן הראשון שכולל יכולת זו. בניגוד לתבניות הנחיה המפיקות פלטי טקסט בלבד, מיומנות מתארת משימה שלמה ומאפשרת לסוכן לנקוט פעולות על פי הרשאות המשתמש ולאחר קבלת אישור לעדכון רשומות.

קרא עוד

More articles you might like

All articles
תבניות ארכיטקטוניות לבניית תהליכי בינה מלאכותית דטרמיניסטיים
ניתוח
4 דקות
מ־n8n

תבניות ארכיטקטוניות לבניית תהליכי בינה מלאכותית דטרמיניסטיים

הסתמכות יתר על מודלי שפה גדולים טומנת בחובה סיכון לקבלת פלט שקשה לבקר, שונות גבוהה בין הרצות ועלויות בלתי צפויות הנובעות מקריאות חוזרות לכלי עבודה. במאמר שפורסם בבלוג של n8n מתוארות תבניות ארכיטקטוניות המשלבות רכיבים דטרמיניסטיים בתוך תהליכי בינה מלאכותית. מערכות דטרמיניסטיות מספקות פלט צפוי ועקבי עבור קלט נתון, ומאפשרות שקיפות, בדיקות פשוטות ועמידה בדרישות רגולטוריות. גישה היברידית עוטפת פעולות הסתברותיות של סוכנים בתוך מעטפת דטרמיניסטית הכוללת ניתוב מותנה, שכבת קלט, אימות נתונים ובקרה אנושית. הפלטפורמה n8n מאפשרת יישום דפוסים אלו באמצעות צמתים ייעודיים לתנאים, קוד ואימות פלט מובנה.

קרא עוד
מודלים בעלי משקולות פתוחות ב-AI: האם הם מתאימים לארגון?
ניתוח
5 דקות
מ־SiliconANGLE AI

מודלים בעלי משקולות פתוחות ב-AI: האם הם מתאימים לארגון?

במאמר מאת פול גילין ב-SiliconANGLE נסקר המעבר של ארגונים ממודלי חזית קנייניים כגון ChatGPT ו-Claude לשימוש במודלים בעלי משקולות פתוחות (Open-weight). המודלים הפתוחים מאפשרים הורדה, הרצה והתאמה אישית של הפרמטרים המאומנים, ומספקים יתרונות גמישות והפחתת עלויות טוקנים. לפי דוח Vercel, נתח תעבורת הטוקנים של מודלים אלה זינק מ-7% בדצמבר ל-56% באוגוסט. עם זאת, מומחים מדגישים כי אימוץ מודלים פתוחים כולל עלויות נסתרות: תנאי רישוי המגבילים שימוש מסחרי, מורכבות אינטגרציה, עלויות חומרה במקרי ניצולת נמוכה בצד שרתי GPU, וצורך בהערכה רציפה של המודלים בסביבות עבודה מורכבות. המאמר ממליץ לארגונים לחלק עומסי עבודה לרבדים מוגדרים.

קרא עוד
מדריך תמחור Make: כיצד עובד מודל הקרדיטים ומה ההבדל מול Zapier
ניתוח
5 דקות
מ־Zapier

מדריך תמחור Make: כיצד עובד מודל הקרדיטים ומה ההבדל מול Zapier

מדריך שפורסם באתר Zapier מנתח את מודל התמחור של פלטפורמת האוטומציה Make (לשעבר Integromat), המבוסס על צריכת קרדיטים חודשית. במודל זה, מרבית המודולים בתרחיש – כולל טריגרים, חיפושים ואיטרטורים – גורעים קרדיט אחד בעת ביצועם, גם אם לא נמצא מידע חדש. חריגים לכך הם נתבים ומודולים לטיפול בשגיאות שאינם צורכים קרדיטים, לצד מודולים יקרים יותר כגון הרצת קוד (2 קרדיטים לשנייה) ופעולות בינה מלאכותית מסוימות. המדריך מפרט את תוכניות החיוב, החל מתוכנית חינם המציעה 1,000 קרדיטים ושני תרחישים פעילים, דרך תוכנית Core ב-12 דולר לחודש עם 10,000 קרדיטים, ועד מסלולי Pro, Teams ו-Enterprise. לצד זאת, המדריך משווה בין Make לבין Zapier: בעוד ש-Make מחייבת על כל שלב וטריגר ומציעה מעל 3,500 אפליקציות, Zapier גובה תשלום רק על משימות שהושלמו וכוללת מעל 9,000 אפליקציות. בנוסף מצוין כי Make דורשת עקומת למידה משמעותית, כאשר התמיכה של הפלטפורמה המליצה על כ-19 שעות לימוד ב-Make Academy לפני בניית תהליכים לייצור.

קרא עוד
מעבר לייצור קוד: מדריך לפיתוח תוכנה מבוסס סוכנים ב-GitHub
ניתוח
4 דקות
מ־GitHub AI and ML

מעבר לייצור קוד: מדריך לפיתוח תוכנה מבוסס סוכנים ב-GitHub

בפוסט שפורסם בבלוג של GitHub, מוצגת מסגרת עבודה לשילוב סוכני בינה מלאכותית בארבעה שלבי פיתוח: תכנון, בנייה, אימות ותצפית. הדבר מגיע על רקע נתוני אוקטובר שהצביעו על יותר מ-1.2 מיליארד קומיטים בשבוע אחד, לצד ממצאי מחקר של Faros AI שלפיהם בקשות משיכה ממתינות 441% יותר זמן בסקירה כאשר צוותים מגבירים את אימוץ הבינה המלאכותית. המדריך סוקר כלים כגון מצב תכנון, ארגזי חול בענן, סקירות קוד אוטומטיות, וחיבור למערכות תצפית כדי לייעל את התהליך כולו.

קרא עוד