0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
From the team behind Gatsby, Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack. https://mastra.ai
  • TypeScript 99.2%
  • JavaScript 0.6%
  • CSS 0.1%
Find a file
dane-ai-mastra[bot] f346f6c4af
chore: version packages (alpha) (#30660)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases
## @mastra/core@1.84.0-alpha.6

### Minor Changes

- Knowledge storage can supply scope declarations, access rules
included. ([#29428](https://github.com/mastra-ai/mastra/pull/29428))

A store returns declarations from `getScopeDeclarations()` (none by
default). Knowledge merges them under its config's: the config wins on a
key both declare, and a declaration that doesn't compile is skipped with
a warning. When stored scopes come from a skipped declaration, the
declaration check's error names that declaration and why it was skipped,
so it can be fixed in the store. The store's answer is reused for 30
seconds and read again after `renameScopeDeclaration`, so a declaration
the store adds, removes or changes (access rules included) applies
within that window without a store read on every call. Revoking access
through the store can therefore take up to 30 seconds to take effect.

  ```ts
  class ImportingKnowledgeStorage extends InMemoryKnowledgeStorage {
    override async getScopeDeclarations() {
      return {
        'imports:$name': {},
'linear:$account:$connection': { access: [{ principal: 'imports:all',
role: 'viewer' }] },
      };
    }
  }
  ```

Runs that hold `imports:all` then read every Linear connection's pages.
## @mastra/platform@0.1.0-alpha.1

### Minor Changes

- Added `PlatformBrowser`, a Stagehand browser backed by a Mastra
Platform browser session. By default it provisions a session with `POST
/v1/browsers/sessions` on the Platform and connects to the returned CDP
URL; pass `cdpUrl` to connect to a session you already provisioned, with
no token or API call. The access token falls back to
`MASTRA_PLATFORM_ACCESS_TOKEN` / `MASTRA_PLATFORM_SECRET_KEY`, the
project to `MASTRA_PROJECT_ID`, and the API URL to
`MASTRA_BROWSER_API_URL`. `@mastra/platform` now depends on
`@mastra/stagehand` at runtime.
([#29428](https://github.com/mastra-ai/mastra/pull/29428))

  ```ts
  import { PlatformBrowser } from '@mastra/platform';

const agent = new Agent({ name: 'browser-agent', model, browser: new
PlatformBrowser() });
  ```

- Added `@mastra/platform`: hosted Mastra Platform Memory and Knowledge
clients, with Platform Sandbox and Filesystem re-exported from
`@mastra/platform-workspace`. `PlatformMemory` is a drop-in `memory` for
`Agent` that loads observations and recent messages from a Platform
Memory instance and saves each turn back; observation and reflection run
on the Platform. `PlatformMemoryClient` exposes the same API directly.
Credentials fall back to `MASTRA_PLATFORM_ACCESS_TOKEN` /
`MASTRA_PLATFORM_SECRET_KEY`. `PlatformMemory` uses
`MASTRA_MEMORY_INSTANCE_ID`; `PlatformKnowledge` uses
`MASTRA_KNOWLEDGE_INSTANCE_ID`. `PlatformKnowledge` takes every scope
declaration and access rule from its instance, Memory's and Platform
importers' included, and has no `scopes` option. Agents read imported
pages when their runs hold the scope an importer's rule grants (for now
`imports:all`).
([#29428](https://github.com/mastra-ai/mastra/pull/29428))

  ```ts
import { PlatformMemory, PlatformKnowledge, PlatformSandbox,
PlatformFilesystem } from '@mastra/platform';

const agent = new Agent({ name: 'assistant', model, memory: new
PlatformMemory() });
  ```

### Patch Changes

- `PlatformKnowledge` now supports listing pins: `knowledge_pin` with
`kind: 'list'` pins a page's listing on hosted Knowledge instead of
refusing it as an old storage adapter.
([#29428](https://github.com/mastra-ai/mastra/pull/29428))

- `PlatformMemory` fixes for read-only runs and working memory:
([#29428](https://github.com/mastra-ai/mastra/pull/29428))

- A read-only run (`memory: { options: { readOnly: true } }`) now sees
the thread's observations and unobserved messages, read through the
Memory instance's read-only context route. Before, it got no stored
context at all. It still saves nothing and starts no observation.
- The `workingMemory` option now delivers what it says: `readonly` and
`tool` add the resource's stored working memory to each run's prompt,
read fresh each run; `tool` also tells the agent to update it with
`updateWorkingMemory`; `off` leaves it out. Before, stored working
memory never reached the prompt in any mode.

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6

See [release notes](https://github.com/mastra-ai/mastra/releases) for
published changes.
## @mastra/client-js@1.60.1-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/react@1.15.1-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/client-js@1.60.1-alpha.6
## @mastra/deployer-cloud@1.84.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/deployer@1.84.0-alpha.6
## @mastra/longmemeval@1.1.43-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/opencode@0.1.43-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/factory@0.29.0-alpha.7

### Patch Changes

- The **Activity** sort in the Factory sidebar now orders sessions that
share a status by their last update instead of their creation date, the
same as **Last updated** does. An older session that was updated since
no longer sinks below a newer one that was left alone.
([#30656](https://github.com/mastra-ai/mastra/pull/30656))

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/code-sdk@1.19.1-alpha.7
## create-factory@0.5.0-alpha.6

### Patch Changes

- Updated dependencies
[[`bfcb0f7`](bfcb0f738d),
[`383a19d`](383a19d047)]:
  - mastra@1.40.0-alpha.6
## @mastra/code-sdk@1.19.1-alpha.7

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/client-js@1.60.1-alpha.6
## mastracode@0.50.1-alpha.7

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/code-sdk@1.19.1-alpha.7
## mastra@1.40.0-alpha.6

### Patch Changes

- The Factory sidebar now groups sessions by board and shows a second
line under each session by default, with when it last changed and its
pull request. Turn on **Compact view** or set **Group** to **None** in
the sidebar's properties menu to get one line per session or a single
list back. Settings you already changed keep their values; the rest
follow the new defaults.
([#30656](https://github.com/mastra-ai/mastra/pull/30656))

- Factory **Settings** now shows theme and completion sound on **My
account**, next to your profile and log out, instead of on a separate
**Preferences** page. Settings opens on **My account**, and old
Preferences links go there.
([#30658](https://github.com/mastra-ai/mastra/pull/30658))

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/deployer@1.84.0-alpha.6
## @mastra/deployer@1.84.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/mcp-docs-server@1.3.14-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/playground-ui@69.1.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/client-js@1.60.1-alpha.6
  - @mastra/react@1.15.1-alpha.6
## @mastra/server@1.84.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/elysia@0.1.24-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/express@1.5.28-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/fastify@1.5.28-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/hono@1.7.26-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/koa@1.7.28-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/nestjs@0.3.1-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/next@0.2.42-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/hono@1.7.26-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/tanstack-start@0.2.42-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/hono@1.7.26-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/temporal@0.6.1-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/deployer@1.84.0-alpha.6
## create-mastra@1.40.0-alpha.6


## @internal/playground@1.40.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/client-js@1.60.1-alpha.6
  - @mastra/react@1.15.1-alpha.6
  - @mastra/playground-ui@69.1.0-alpha.6

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
History 2026-11-17 00:01:31 -07:00
.agents/skills chore: add real-world-testing skill for coding agents (#27391) 2026-10-17 18:45:03 -07:00
.changeset chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
.claude ci(test-tiers): fill the GitHub to Slack user map and add a skill to update it (#30629) 2026-11-16 20:44:49 -07:00
.cursor Refactor GitHub triage command and consolidate skills (#19106) 2026-07-10 16:17:08 +02:00
.dev chore(deps): update docker images (#28011) 2026-10-29 15:53:50 +00:00
.github ci(test-tiers): fill the GitHub to Slack user map and add a skill to update it (#30629) 2026-11-16 20:44:49 -07:00
.husky chore(husky): use pnpm version from package.json in pre-commit (#18419) 2026-06-24 12:47:15 +02:00
.mastracode feat(mcp-apps-components): pin dashboard widgets through standard MCP Apps model context (#29488) 2026-11-04 17:15:46 -08:00
.opencode Refactor GitHub triage command and consolidate skills (#19106) 2026-07-10 16:17:08 +02:00
.superset add superset config (#12387) 2026-01-27 19:06:19 -08:00
agent-sdks chore: run lint-staged for root files and the 16 packages without a config (#29898) 2026-11-10 14:08:55 +01:00
auth chore: version packages (alpha) (#30602) 2026-11-16 21:12:17 -08:00
browser chore: version - exit prerelease mode 2026-11-12 21:12:29 +00:00
channels chore: version - exit prerelease mode 2026-11-12 21:12:29 +00:00
client-sdks chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
code-mode chore: version - exit prerelease mode 2026-10-28 13:15:52 +00:00
deployers chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
docs feat(core): add knowledge.movePage() to move a page without losing its notes or pins (#30631) 2026-11-16 21:48:39 -07:00
e2e-tests feat(mastracode): export runTui so other programs can start the TUI with extra session options (#30371) 2026-11-16 19:34:58 -07:00
ee chore: update Enterprise Edition license (#24708) 2026-09-23 16:19:37 -07:00
embedders/voyageai chore: run lint-staged for root files and the 16 packages without a config (#29898) 2026-11-10 14:08:55 +01:00
examples fix(deps): patch @opentelemetry/resources (GHSA-qrww-3xmv-qhgm) (#30580) 2026-11-16 18:33:08 -05:00
explorations chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
integrations chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
mastracode chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
observability chore: version packages (alpha) (#30602) 2026-11-16 21:12:17 -08:00
packages chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
patches chore(deps): force minimatch 11 and glob 14 for Vanta findings (#29916) 2026-11-10 12:57:20 -08:00
pubsub chore: version packages (alpha) (#30516) 2026-11-16 23:44:41 +01:00
scripts ci(test-tiers): name the merge that broke a skipped test and alert its author (#30606) 2026-11-16 18:27:39 -07:00
server-adapters chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
signals chore: version packages (alpha) (#30241) 2026-11-12 16:45:14 -08:00
stores chore: version packages (alpha) (#30602) 2026-11-16 21:12:17 -08:00
templates fix(templates): upgrade mongodb-bedrock-agent to AI SDK v6 to resolve vulnerable dependencies (#30574) 2026-11-16 16:33:34 -05:00
test-fixtures/workflow-builder-canonical feat(mastracode): add dynamic workflow authoring (#21210) 2026-08-11 13:21:08 -07:00
voice chore: version - exit prerelease mode 2026-11-12 21:12:29 +00:00
workflows chore: version packages (alpha) (#30660) 2026-11-17 00:01:31 -07:00
workspaces chore: version packages (alpha) (#30516) 2026-11-16 23:44:41 +01:00
.coderabbit.yaml refactor(lint): replace ESLint with type-aware oxlint (#27476) 2026-10-18 10:38:35 -07:00
.gitattributes fix: prevent CRLF conversion of patch files on Windows (#21155) 2026-08-10 14:10:56 +02:00
.gitignore feat(mastracode): simplify Factory local development (#24632) 2026-09-22 07:49:45 -07:00
.mastra-project.json Add Mastra project config 2026-07-24 16:41:55 +00:00
.oxfmtrc.json feat(cli): align score and feedback API commands (#30089) 2026-11-11 19:53:52 +01:00
.prettierrc chore: eslint fix core (#2522) 2025-02-25 11:43:11 +01:00
.stylelintrc.json feat(playground): migrate to Tailwind CSS v4 (#14772) 2026-03-30 10:49:00 +02:00
AGENTS.md chore: add real-world-testing skill for coding agents (#27391) 2026-10-17 18:45:03 -07:00
CLAUDE.md chore(repo): Cleanup files (#15434) 2026-04-16 11:30:13 +02:00
CODE_OF_CONDUCT.md docs: fix abuse contact email in CODE_OF_CONDUCT (#20966) 2026-08-07 13:06:37 -07:00
CONTRIBUTING.md chore(repo): Mention new PR policy (#27829) 2026-10-20 08:38:31 -07:00
DEVELOPMENT.md chore(repo): Mention new PR policy (#27829) 2026-10-20 08:38:31 -07:00
LICENSE.md fix: clarify licensing and include core package license (#22474) 2026-08-27 08:35:15 -07:00
lint-staged.config.js chore: run lint-staged for root files and the 16 packages without a config (#29898) 2026-11-10 14:08:55 +01:00
oxlint.config.ts refactor(lint): enable no-else-return at root (#28601) 2026-10-28 12:30:27 +01:00
package.json chore: remove stale scripts, workspace entries and package metadata (#29891) 2026-11-10 14:09:52 +01:00
pnpm-lock.yaml Publish unified Platform clients for Memory, Knowledge, Browser, Sandbox, and Filesystem (#29428) 2026-11-16 21:36:00 -08:00
pnpm-workspace.yaml fix(deps): patch @opentelemetry/resources (GHSA-qrww-3xmv-qhgm) (#30580) 2026-11-16 18:33:08 -05:00
README.md chore(repo): Mention new PR policy (#27829) 2026-10-20 08:38:31 -07:00
renovate.json ci(renovate): keep store-test MongoDB on 7.x (#30601) 2026-11-16 22:49:02 -05:00
tsconfig.build.json fix type generation (#6588) 2025-08-05 10:47:22 -07:00
tsconfig.json chore: migrate repository formatting to oxfmt (#19807) 2026-07-24 16:18:33 +02:00
tsconfig.node.json chore: upgrade TypeScript from 5.9.3 to 6.0.3 (#15884) 2026-04-29 10:18:03 -07:00
turbo.json fix(factory): watch shared React components during development (#27657) 2026-10-20 10:41:48 +02:00
vitest.config.observability.ts chore: migrate linting to oxlint (#20173) 2026-07-25 01:04:02 +02:00
vitest.config.ts feat(mcp-apps-components): add prebuilt MCP Apps with a dashboard renderer (#29321) 2026-11-04 10:41:58 -08:00

Mastra

npm version CodeQl GitHub Repo stars Discord Twitter Follow NPM Downloads Static Badge

Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.

It includes everything you need to go from early prototypes to production-ready applications. Mastra integrates with frontend and backend frameworks like React, Next.js, and Node, or you can deploy it anywhere as a standalone server. It's the easiest way to build, tune, and scale reliable AI products.

Why Mastra?

Purpose-built for TypeScript and designed around established AI patterns, Mastra gives you everything you need to build great AI applications out-of-the-box.

Some highlights include:

  • Model routing: Connect to 40+ providers through one standard interface. Use models from OpenAI, Anthropic, Gemini, and more.

  • Agents: Build autonomous agents that use LLMs and tools to solve open-ended tasks. Agents reason about goals, decide which tools to use, and iterate internally until the model emits a final answer or an optional stopping condition is met.

  • Workflows: When you need explicit control over execution, use Mastra's graph-based workflow engine to orchestrate complex multi-step processes. Mastra workflows use an intuitive syntax for control flow (.then(), .branch(), .parallel()).

  • Human-in-the-loop: Suspend an agent or workflow and await user input or approval before resuming. Mastra uses storage to remember execution state, so you can pause indefinitely and resume where you left off.

  • Context management: Give your agents the right context at the right time. Provide conversation history, retrieve data from your sources (APIs, databases, files), and add human-like memory with Observational Memory so your agents behave coherently.

  • Integrations: Bundle agents and workflows into existing React, Next.js, or Node.js apps, or ship them as standalone endpoints. When building UIs, integrate with agentic libraries like Vercel's AI SDK UI and CopilotKit to bring your AI assistant to life on the web.

  • MCP servers: Author Model Context Protocol servers, exposing agents, tools, and other structured resources via the MCP interface. These can then be accessed by any system or agent that supports the protocol.

  • Production essentials: Shipping reliable agents takes ongoing insight, evaluation, and iteration. With built-in evals and observability, Mastra gives you the tools to observe, measure, and refine continuously.

Get started

The recommended way to get started with Mastra is by running the command below:

npm create mastra@latest

Follow the Installation guide for step-by-step setup with the CLI or a manual install.

If you're new to AI agents, check out our templates, course, and YouTube videos to start building with Mastra today.

Alternative: Use this pre-built prompt to get started
Create a new Mastra project. Mastra is a framework for AI applications and agents on a modern TypeScript stack. Before running the command, ask these questions one at a time and wait for each answer unless it was already provided:

1. Project name? (default: "my-mastra-app")
2. Provider? (required; options: "openai", "anthropic", "google", "xai")

If the provider isn't supported, ask again and list the supported values.

Run: `npm create mastra@latest <project-name> -- --llm <provider>`

The command creates a default Mastra project, installs Mastra skills for detected coding assistants, and initializes Git when appropriate.

After creation, enter the project directory and start the dev server: `npx bgproc start -n <project-name> -w -- npm run dev`

Open Mastra Studio at `http://localhost:4111`. Studio is the interface for building, testing, and managing agents, workflows, and tools.

Also mention that the Mastra model router provides access to thousands of models: https://mastra.ai/models

Documentation

Visit our official documentation.

Build with AI

Learn how to make your agent a Mastra expert by following the Build with AI guide.

Contributing

Looking to contribute? Pull requests are limited to collaborators only. Therefore you can best help by creating high-quality issues with good reproductions and descriptions. Mastra will then verify your report and prioritize it accordingly.

If you want to run Mastra or its tests locally, refer to the development documentation

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.

It's also super helpful if you leave the project a star here, at the top of the page

Licensing

This repository uses a dual-license model:

  • Apache License 2.0: The core framework and the vast majority of this codebase is open source under Apache-2.0.
  • Mastra Enterprise License: Code in any directory named ee/ (e.g., packages/core/src/auth/ee/) is source-available under the Mastra Enterprise License. These features require a valid enterprise license for production use but can be freely used for development and testing.

See LICENSE.md for the full license mapping and ee/LICENSE for the enterprise license terms.

Security

We are committed to maintaining the security of this repo and of Mastra as a whole. If you discover a security finding we ask you to please responsibly disclose this to us at security@mastra.ai and we will get back to you.