> ## Documentation Index
> Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Assistant Message – Code

> AssistantMessage displays simple text responses from the Atlas assistant.

> [!WARNING]
>
> Atlas is deprecated. Use [AI Kit](https://anvil.servicetitan.com/docs/building-agentic-experiences) for any new Atlas experiences.

> [tab] Implementation
>
> ext-atlas-assistant-message-demo
>
> [StackBlitz demo](https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples/ext-atlas-assistant-message-demo?file=src/App.tsx)
>
> ```tsx lines expandable theme={null}
> import { AssistantMessage } from "@servicetitan/anvil2-ext-atlas";
> import { Card } from "@servicetitan/anvil2";
>
> function App() {
>   return (
>     <Card
>       flexDirection="column"
>       gap={4}
>       background="strong"
>       style={{ width: "388px" }}
>     >
>       <AssistantMessage
>         message="This is an assistant message response."
>         assistant="Atlas"
>         onRetry={() => console.log("retry clicked")}
>       />
>     </Card>
>   );
> }
>
> export default App;
> ```
>
> ## Common Examples
>
> ### Basic Usage
>
> Display a simple text response:
>
> ```tsx theme={null}
> import { AssistantMessage } from "@servicetitan/anvil2-ext-atlas";
>
> function AssistantMessageExample() {
>   return (
>     <AssistantMessage message="I can help you with that! Let me look up the information." />
>   );
> }
> ```
>
> ### Loading State
>
> Show loading indicator when waiting for response:
>
> ```tsx theme={null}
> import { AssistantMessage } from "@servicetitan/anvil2-ext-atlas";
>
> function AssistantMessageLoading() {
>   // When message is undefined, shows loading indicator
>   return <AssistantMessage />;
> }
> ```
>
> ### Custom Branding
>
> Use custom icon and assistant name:
>
> ```tsx theme={null}
> import { AssistantMessage } from "@servicetitan/anvil2-ext-atlas";
> import CustomLogo from "./custom-logo.svg";
>
> function CustomBrandedMessage() {
>   return (
>     <AssistantMessage
>       message="Hello from the custom assistant!"
>       svgIcon={CustomLogo}
>       assistant="My Assistant"
>     />
>   );
> }
> ```

> [tab] AssistantMessage API
>
> ```tsx theme={null}
> <AssistantMessage
>   message="Response text"
>   error={false}
>   svgIcon={CustomIcon}
>   assistant="Atlas"
>   onRetry={handleRetry}
> />
> ```
>
> ## `AssistantMessage` Props
>
> **assistant** `string`
>
> Custom assistant name to display instead of "Atlas".
>
> **className** `string`
>
> Additional CSS class name for custom styling.
>
> **error** `string | boolean`
>
> Error state. When truthy, displays error message instead of content.
>
> **message** `string`
>
> The message content. When undefined, shows loading indicator.
>
> **onRetry** `() =\> void`
>
> Callback for retry button in error state.
>
> **svgIcon** `Svg`
>
> Custom icon to display instead of the Atlas logo.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.