Agent System Prompt Customization

When using the Vercel AI SDK, I sometimes inject dynamic system prompts depending on properties. I like it being an array of system prompts, which helps me order my system prompts from most cacheable to least cacheable.

In Mastra it’s a simple instructions string. What technique can I use to customize the system prompts?
Was this page helpful?