GenerateSaaS

AI prompts

Re-voice every prompt the product injects into AI runs from one config module.

A run's system prompt comes from two surfaces. The agent persona is the assistant agent's own inline instructions (packages/api/src/mastra/agents/assistant/config.ts) - see Agents to re-voice it. Layered on top are the injected prompt strings this page documents: every one lives in packages/config/src/ai/prompts.ts (@repo/config/ai/prompts). Edit a value, restart, done - no other file defines injected prompt copy. The module is env-free, so it can be imported directly from any surface without the env-reading config index; backend packages consume it today.

The keys

aiPrompts is a flat record; each key is injected at exactly one seam.

KeyInjected
capabilityPrepended to a run's system prompt when it can act: chat and scheduled runs when their toolset is non-empty, companion runs always.
compactionSummarySystem prompt for conversation compaction runs.
mcpInstructionsUsage instructions the product MCP server advertises to connected agents on initialize.
terminalPreambleOpens the instructions of an interactive companion terminal session, before the system prompt: it tells the user's own CLI it is running inside the product and reaches the product's tools over MCP.

How the system prompt is assembled

The agent always contributes its persona (its inline instructions). On top of that, one composer (packages/api/src/ai/compose-system.ts) adds the capability nudge - but only when the run actually has app tools. It is passed to the agent as the per-call system option: chat and scheduled runs include it when their toolset is non-empty; companion runs always include it. A run with no app tools adds no nudge, leaving just the persona. Because chat and scheduled runs share this exact path, a scheduled run carries the same persona and nudge as chat.

Built-in schedule prompts

A scheduled run's prompt is not one of these keys - each built-in schedule carries its own prompt in the schedules registry. See Built-in schedules.

On this page