Mastra Agent Controller
Updated Mastra
Summary
Mastra extracted the loop around Mastra Code into AgentController, shipping in @mastra/core 1.47.0 on June 18, 2026.
- Tool
- Mastra
- Category
- Frameworks
- Date
- Open source
- Yes
- Pricing
- The class ships in the open-source @mastra/core package. No separate product price is stated.
- Sources
On June 18, 2026, Mastra announced Agent Controller. The team had been driving Mastra Code, their terminal coding agent, and then pulled the pieces they wanted other people to reuse into an AgentController class. It is available in @mastra/core 1.47.0 or later.
Mastra describes it as the layer around the agent loop: a conversation you can watch, interrupt, and steer; memory for long runs; storage that persists sessions; control over tool calls; task delegation to subagents; and modes, each with its own instructions and tools. The class was renamed from Harness in PR #18510.
The earlier product is Mastra Code. Both notes live on the Mastra hub. If you want a hosted harness instead of a class, see the OpenAI Agents API.
Alternatives
| Tool | License | Pricing note |
|---|---|---|
MastraThis launchTypeScript agent framework. Mastra Code is the terminal agent; AgentController is the extracted loop, in @mastra/core 1.47.0 or later. | Open source | Mastra Code and AgentController are announced as open source. No license fee is stated in the posts we cited. |
OpenHandsMIT-licensed project to build and run AI coding agents: start locally, automate workflows, use any model. | MIT | The OpenHands repository is MIT-licensed. Hosted plans are not priced on this page. |
OpenAI AgentsOpenAI's agent harness, shipped as a Python SDK update in April 2026 and as the hosted Agents API in September 2026. | Open source | SDK and Agents API use standard token and tool pricing. The Agents API has no additional fee. |
More from Mastra
Mastra core 1.76.0 adds durable run ownership and fencing
MastraMastra's @mastra/core 1.76.0, published October 13, 2026, makes durable agent crash recovery safe across instances and adds atomic Postgres memory merges.
Category: Frameworks
Pricing: Open source
Mastra Code
MastraMastra Code is an open-source terminal coding agent, announced February 24, 2026, built around observational memory instead of compaction.
Category: Coding agents
Pricing: Open source
Questions
What is Mastra?
Mastra is a TypeScript framework for agents. In 2026 the team shipped Mastra Code, a terminal coding agent, and then AgentController, the class that wraps the agent loop.
What are Mastra alternatives?
OpenAI's Agents SDK and Agents API, OpenHands Agent Canvas, and OpenCode if you want a finished terminal client rather than a framework.
Filed on Agent Radar. Claims in this note are limited to the sources above.