Using Google fonts
Below is a sample embedded agent using theMerriweather
font from Google fonts.

fontFamily
parameter with the Google font name to the customFontTheme
attribute of the mindset.init()
method, as follows:
Using custom fonts
You can use self-hosted fonts to customize your agent. If you want to use a custom font, you should host it so it can be accessed, and then obtain the URL and checksum of the font. Please skip to the ‘Hosting Custom Fonts’ section for more information on hosting fonts. If you want to use a custom font, you need to add a few more parameters describing the font:Parameter | Description |
---|---|
fontWeight | The weight of the font, e.g. 600 for semi-bold. |
sha256Checksum | The SHA-256 checksum of the font file is used to verify its integrity. (linux command : shasum -a 256 "$filename" cut -d' ' -f1 ) |
fontUrl | The URL where the font file is hosted. |
fileSize | The size of the font file in bytes. (linux command : wc -c < "$filename" tr -d ' ' ) |
fontStyle | The style of the font, e.g. italic . |
It is better to provide various
fontWeight
of your custom font, but if one fontWeight
is missing, the agent UI will use the closest existing fontWeight
.Customizing the font style of the agent UI elements
Whether you use a Google font or a custom font, you can customize the font style of the agent UI elements by using thetextStyles
attribute in the customFontTheme
object.
For example, let’s say we would like to change the Thread title font size of the agent UI, we can override it this way:

You need to give the values you want to override.In our previous example, we only changed the
titleSmall
font size to 50
.
Other values of the type scale (titleSmall
) will be kept as the default values.
And all others, like displayLarge
, headlineMedium
, etc., will be retained as the default values.Overriding default font styles
The agent UI uses a set of textStyles parameters to define font styles like size, weight, and line height. ThosetextStyles
parameters are called type scale tokens.
The Google Material3 type scale tokens documentation is available here.
textStyles
parameters used in the agent UI. If you need to customize a value, you can override it with your value.
Applied Typography Tokens
The agent UI uses a subset of Material type tokens. These define text styles for key agent UI elements.Category | Parameters | Description |
---|---|---|
Title | titleLarge titleMedium titleSmall | These tokens are used for key titles and headings, including: Dialog headers. Section titles in carousels, prompts, and reference lists. Metadata labels like source and segment titles. Zero state messages. |
Body | bodyMedium bodySmall | These tokens are used for general content and supporting text across the Agent UI, including: List items, thread titles, and section headers. Descriptive and metadata text (e.g., agent details, segment summaries, speaker names). Buttons, pills, and labels. Supporting UI text like follow-up questions, video names, and citations. |
Label | labelLarge labelMedium labelSmall | These tokens are used for short-form, utility, or supportive text, including: Labels and descriptions in content lists (e.g., sources, key moments, citations). Feedback form instructions and optional field hints. |
Hosting custom fonts
If you’d like to host a custom font, here’s a quick guide and some options you should consider.- GitHub / GitHub Pages
https://raw.githubusercontent.com/username/repo/branch/path-to/font.ttf
- Firebase Storage
- Amazon S3 or other cloud storage (Azure Blob, Google Cloud Storage)
- Your backend or CDN