Mastra Agents

From memory to MCP, build stateful agents.

Use any LLM to create agents that can reason, decide, and act.

built-in agent primitives

Mastra agents come with memory, tool calling, MCP, logging, tracing, and eval primitives. Use them in a local playground or deploy to production.

orchestrate teams and networks

Mastra Agents can be chained and composed using Mastra Workflows for complex branching.

context and guardrails

Customize your agents' tools, dynamically inject context, and enforce guardrails.

Ready to get started with Mastra?