Mastra Agents
Mastra agents define behavior with a model, instructions, tools, memory, and processors, then expose .generate() and .stream() for typed text, object, and structured output generation. Agents support multi-step tool calls, dynamic instructions, runtime context, scoped memory, and Vercel AI SDK v5 message format.