Function: useMastraSuggestions()
useMastraSuggestions(
agentId?,enabled?):object
Fetch the curated starter questions for an agent’s Genie space via
client.suggestions(agentId). These are the sample_questions an
author configured on the space, surfaced as one-tap prompts on the
chat empty state. The server returns an empty list when the agent
has no Genie space, so questions stays empty in that case and the
UI shows a bare empty state rather than built-in example prompts.
Pass enabled: false to skip the fetch (e.g. when the caller
supplies its own explicit suggestion list), in which case
questions stays empty. Any fetch error degrades silently to no
suggestions - they’re a non-critical enhancement.
Parameters
Section titled “Parameters”agentId?
Section titled “agentId?”string
enabled?
Section titled “enabled?”boolean = true
Returns
Section titled “Returns”object
loading
Section titled “loading”loading:
boolean
questions
Section titled “questions”questions:
string[]