summarize
Small-tier summarization for the Mastra plugin.
Two surfaces, both backed by the fast / small chat tier
(model.ModelClass.ChatFast) resolved through the same
/serving-endpoints pipeline as the main agents:
- A dedicated
summarizetool (see buildSummarizeTool) agents can call to condense arbitrary text without burning the heavyweight chat model. - The model + instructions Mastra’s memory uses to auto-name
conversation threads (
generateTitle), so titling reuses the same small tier rather than the agent’s primary model.
Mirrors the chart-planner wiring in chart.ts: a per-config cached
Agent on the fast tier, invoked via agent.generate(...) inside
the active asUser scope so tokens stay user-scoped.