{"_rev":"4-eaf36d05a04e12bda3d9d4b4469840d9","time":{"created":"2025-06-20T00:09:08.605Z","modified":"2025-06-20T00:09:10.273Z","0.1.11":"2025-06-20T00:02:31.490Z","0.0.1":"2025-06-20T00:09:09.495Z"},"_id":"@caleblawson/mastra","name":"@caleblawson/mastra","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@caleblawson/mastra","version":"0.0.1","type":"module","devDependencies":{"@changesets/cli":"^2.29.4","@types/node":"^20.19.0","husky":"^9.1.7","lint-staged":"^15.5.2","npm-run-all2":"^7.0.2","prettier":"^3.5.3","turbo":"^2.5.4","typescript":"^5.8.3","vitest":"^3.2.3"},"lint-staged":{"*.{js,mjs,ts,tsx,md,mdx,json,graphql,gql}":["prettier --write"]},"engines":{"pnpm":">=9.7.0"},"resolutions":{"typescript":"^5.8.3","@types/node":"^20.17.57"},"license":"Elastic-2.0","dependencies":{"resolve-from":"^5.0.0"},"scripts":{"ci:publish":"pnpm publish -r","build":"pnpm turbo build --filter \"!./examples/*\" --filter \"!./examples/**/*\" --filter \"!./docs/\"","build:integrations":"pnpm turbo build --filter \"./integrations/*\"","build:packages":"pnpm turbo build --filter \"./packages/*\"","build:combined-stores":"pnpm turbo build --filter \"./stores/*\"","build:deployers":"pnpm turbo build --filter \"./deployers/*\"","build:speech":"pnpm turbo build --filter \"./speech/*\"","build:cli":"pnpm turbo build --filter ./packages/cli","build:deployer":"pnpm turbo build --filter ./packages/deployer","build:server":"pnpm turbo build --filter ./packages/server","build:core":"pnpm turbo build --filter ./packages/core","build:mcp":"pnpm turbo build --filter ./packages/mcp","build:playground-ui":"pnpm turbo build --filter ./packages/playground-ui/","build:rag":"pnpm turbo build --filter ./packages/rag","build:memory":"pnpm turbo build --filter ./packages/memory","build:docs-mcp":"pnpm turbo build --filter ./packages/mcp-docs-server","build:evals":"pnpm turbo build --filter ./packages/evals","build:clients":"pnpm turbo build --filter \"./client-sdks/*\"","build:schema-compat":"pnpm turbo build --filter ./packages/schema-compat","build:auth":"pnpm turbo build --filter \"./auth/*\" --filter \"./packages/auth\"","generate:integration":"pnpx tsx ./integration-generator/index.ts","test":"vitest run","test:watch":"vitest watch","test:watch:combined-stores":"pnpm --filter \"./stores/*\" test:watch","test:auth":"pnpm --filter \"./auth/*\" test","test:cli":"pnpm --filter ./packages/cli test","test:deployer":"pnpm --filter ./packages/deployer test","test:server":"pnpm --filter ./packages/server test","test:core":"pnpm --filter ./packages/core test --exclude \"./src/tools/tool-builder/**\"","test:mcp":"pnpm --filter ./packages/mcp test","test:rag":"pnpm --filter ./packages/rag test","test:clients":"pnpm --filter \"./client-sdks/*\" test","test:combined-stores":"pnpm --filter \"./stores/*\" test","test:memory":"pnpm --filter ./packages/memory test","test:tool-builder":"pnpm test packages/core/src/tools/tool-builder/**","test:schema-compat":"pnpm --filter ./packages/schema-compat test","test:docs-mcp":"pnpm --filter ./packages/mcp-docs-server test","test:evals":"pnpm --filter ./packages/evals test","test:evals:nlp":"pnpm --filter ./packages/evals test src/metrics/nlp","test:evals:llm":"pnpm --filter ./packages/evals test src/metrics/llm","lint-staged":"lint-staged","preinstall":"npx only-allow pnpm","prettier:format":"prettier --write .","prettier:format:check":"prettier --check .","typecheck":"pnpm -r typecheck","format":"pnpm turbo --filter \"!./examples/**/*\" --filter \"!./docs/**/*\" --filter \"!./integrations/**/*\" --filter \"!@mastra/playground\" lint -- --fix","dev:services:up":"docker compose -f .dev/docker-compose.yaml up -d","dev:services:down":"docker compose -f .dev/docker-compose.yaml down","setup":"pnpm install --ignore-scripts && pnpm run build:cli && pnpm install --shamefully-hoist"},"gitHead":"c31e90130a5c9765c23f688ecea70adc6164543d","description":"[![npm version](https://badge.fury.io/js/@mastra%2Fcore.svg)](https://www.npmjs.com/package/@mastra/core)\r [![CodeQl](https://github.com/mastra-ai/mastra/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/mastra-ai/mastra/actions","_id":"@caleblawson/mastra@0.0.1","_integrity":"sha512-PLw2VXLk3+6m+saS5+Iy5jamYWevI9TIJOyUyjzmcJRQg6kLLon3nsaoT9URb4RZ4G/N3qs987XPuPa1N0Cz9A==","_resolved":"C:\\Users\\caleb\\AppData\\Local\\Temp\\c773787305b59592af3b593256ee8705\\caleblawson-mastra-0.0.1.tgz","_from":"file:caleblawson-mastra-0.0.1.tgz","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-PLw2VXLk3+6m+saS5+Iy5jamYWevI9TIJOyUyjzmcJRQg6kLLon3nsaoT9URb4RZ4G/N3qs987XPuPa1N0Cz9A==","shasum":"3dbc08668e798b310642aca6017c11b58b5b7f49","tarball":"https://registry.npmjs.org/@caleblawson/mastra/-/mastra-0.0.1.tgz","fileCount":8313,"unpackedSize":338626629,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIF1vYca7t9/zJo7tduFWwgTcUwwAtZ3j+N9g3/NqJEYSAiBwCUfJshnsCMB0kPHLvoARhOiyzqL/IhCeVV7JtQQ5Aw=="}]},"_npmUser":{"name":"caleblawson","email":"caleb.lawson@dynapt.com","actor":{"name":"caleblawson","email":"caleb.lawson@dynapt.com","type":"user"}},"directories":{},"maintainers":[{"name":"caleblawson","email":"caleb.lawson@dynapt.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mastra_0.0.1_1750378148688_0.4972940933773158"},"_hasShrinkwrap":false}},"maintainers":[{"name":"caleblawson","email":"caleb.lawson@dynapt.com"}],"description":"[![npm version](https://badge.fury.io/js/@mastra%2Fcore.svg)](https://www.npmjs.com/package/@mastra/core)\r [![CodeQl](https://github.com/mastra-ai/mastra/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/mastra-ai/mastra/actions","license":"Elastic-2.0","readme":"# Mastra\r\n\r\n[![npm version](https://badge.fury.io/js/@mastra%2Fcore.svg)](https://www.npmjs.com/package/@mastra/core)\r\n[![CodeQl](https://github.com/mastra-ai/mastra/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/mastra-ai/mastra/actions/workflows/github-code-scanning/codeql)\r\n[![GitHub Repo stars](https://img.shields.io/github/stars/mastra-ai/mastra)](https://github.com/mastra-ai/mastra/stargazers)\r\n[![Discord](https://img.shields.io/discord/1309558646228779139?logo=discord&label=Discord&labelColor=white&color=7289DA)](https://discord.gg/BTYqqHKUrf)\r\n[![Twitter Follow](https://img.shields.io/twitter/follow/mastra_ai?style=social)](https://x.com/mastra_ai)\r\n[![NPM Downloads](https://img.shields.io/npm/dm/%40mastra%252Fcore)](https://www.npmjs.com/package/@mastra/core)\r\n[![Static Badge](https://img.shields.io/badge/Y%20Combinator-W25-orange)](https://www.ycombinator.com/companies?batch=W25)\r\n\r\nMastra is an opinionated TypeScript framework that helps you build AI applications and features quickly. It gives you the set of primitives you need: workflows, agents, RAG, integrations and evals. You can run Mastra on your local machine, or deploy to a serverless cloud.\r\n\r\nThe main Mastra features are:\r\n\r\n| Features                                               | Description                                                                                                                                                                                                                                                                                            |\r\n| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\r\n| LLM Models                                             | Mastra uses the [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction) for model routing, providing a unified interface to interact with any LLM provider including OpenAI, Anthropic, and Google Gemini. You can choose the specific model and provider, and decide whether to stream the response. |\r\n| [Agents](https://mastra.ai/docs/agents/overview)       | Agents are systems where the language model chooses a sequence of actions. In Mastra, agents provide LLM models with tools, workflows, and synced data. Agents can call your own functions or APIs of third-party integrations and access knowledge bases you build.                                   |\r\n| [Tools](https://mastra.ai/docs/agents/adding-tools)    | Tools are typed functions that can be executed by agents or workflows, with built-in integration access and parameter validation. Each tool has a schema that defines its inputs, an executor function that implements its logic, and access to configured integrations.                               |\r\n| [Workflows](https://mastra.ai/docs/workflows/overview) | Workflows are durable graph-based state machines. They have loops, branching, wait for human input, embed other workflows, do error handling, retries, parsing and so on. They can be built in code or with a visual editor. Each step in a workflow has built-in OpenTelemetry tracing.               |\r\n| [RAG](https://mastra.ai/docs/rag/overview)             | Retrieval-augemented generation (RAG) lets you construct a knowledge base for agents. RAG is an ETL pipeline with specific querying techniques, including chunking, embedding, and vector search.                                                                                                      |\r\n| [Integrations](https://mastra.ai/docs/integrations)    | In Mastra, integrations are auto-generated, type-safe API clients for third-party services that can be used as tools for agents or steps in workflows.                                                                                                                                                 |\r\n| [Evals](https://mastra.ai/docs/08-running-evals)       | Evals are automated tests that evaluate LLM outputs using model-graded, rule-based, and statistical methods. Each eval returns a normalized score between 0-1 that can be logged and compared. Evals can be customized with your own prompts and scoring functions.                                    |\r\n\r\n## Quick Start\r\n\r\n### Prerequisites\r\n\r\n- Node.js (v20.0+)\r\n\r\n## Get an LLM provider API key\r\n\r\nIf you don't have an API key for an LLM provider, you can get one from the following services:\r\n\r\n- [OpenAI](https://platform.openai.com/)\r\n- [Anthropic](https://console.anthropic.com/settings/keys)\r\n- [Google Gemini](https://ai.google.dev/gemini-api/docs)\r\n- [Groq](https://console.groq.com/docs/overview)\r\n- [Cerebras](https://inference-docs.cerebras.ai/introduction)\r\n\r\nIf you don't have an account with these providers, you can sign up and get an API key. Anthropic require a credit card to get an API key. Some OpenAI models and Gemini do not and have a generous free tier for its API.\r\n\r\n## Create a new project\r\n\r\nThe easiest way to get started with Mastra is by using `create-mastra`. This CLI tool enables you to quickly start building a new Mastra application, with everything set up for you.\r\n\r\n```bash\r\nnpx create-mastra@latest\r\n```\r\n\r\n### Run the script\r\n\r\nFinally, run `mastra dev` to open the Mastra playground.\r\n\r\n```bash copy\r\nnpm run dev\r\n```\r\n\r\nIf you're using Anthropic, set the `ANTHROPIC_API_KEY`. If you're using Gemini, set the `GOOGLE_GENERATIVE_AI_API_KEY`.\r\n\r\n# MCP Server ([@mastra/mcp-docs-server](https://www.npmjs.com/package/@mastra/mcp-docs-server))\r\n\r\nUse our MCP server [@mastra/mcp-docs-server](https://www.npmjs.com/package/@mastra/mcp-docs-server) to teach your LLM how to use Mastra.\r\n\r\nThis is a Model Context Protocol (MCP) server that provides AI assistants with direct access to Mastra.ai's complete knowledge base.\r\n\r\n## In Cursor\r\n\r\nCreate or update .cursor/mcp.json in your project root:\r\n\r\n### MacOS/Linux\r\n\r\n```\r\n{\r\n  \"mcpServers\": {\r\n    \"mastra\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@mastra/mcp-docs-server\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n### Windows\r\n\r\n```\r\n{\r\n  \"mcpServers\": {\r\n    \"mastra\": {\r\n      \"command\": \"cmd\",\r\n      \"args\": [\"/c\", \"npx\", \"-y\", \"@mastra/mcp-docs-server\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nThis will make all Mastra documentation tools available in your Cursor workspace. Note that the MCP server wont be enabled by default. You'll need to go to Cursor settings -> MCP settings and click \"enable\" on the Mastra MCP server.\r\n\r\n## In Windsurf\r\n\r\nCreate or update ~/.codeium/windsurf/mcp_config.json:\r\n\r\n### MacOS/Linux\r\n\r\n```\r\n{\r\n  \"mcpServers\": {\r\n    \"mastra\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"@mastra/mcp-docs-server\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nFor more installation options visit [https://www.npmjs.com/package/@mastra/mcp-docs-server](https://www.npmjs.com/package/@mastra/mcp-docs-server)\r\n\r\n## Contributing\r\n\r\nLooking to contribute? All types of help are appreciated, from coding to testing and feature specification.\r\n\r\nIf you are a developer and would like to contribute with code, please open an issue to discuss before opening a Pull Request.\r\n\r\nInformation about the project setup can be found in the [development documentation](./DEVELOPMENT.md)\r\n\r\n## Support\r\n\r\nWe have an [open community Discord](https://discord.gg/BTYqqHKUrf). Come and say hello and let us know if you have any questions or need any help getting things running.\r\n\r\nIt's also super helpful if you leave the project a star here at the [top of the page](https://github.com/mastra-ai/mastra)\r\n","readmeFilename":"README.md"}