--- a/launch-doc.md +++ b/launch-doc.md @@ -1,44 +1,52 @@ -# Introducing Mastra 1.0: The Most Powerful AI Agent Framework +# Mastra 1.0 release -## Why Mastra Is The Best Choice For Your AI Projects +## What Mastra is -We're thrilled to announce the launch of **Mastra 1.0** — the most complete, production-ready TypeScript framework for building AI-powered applications. Whether you're a startup founder or an enterprise architect, Mastra makes it easy to ship intelligent agents that just work. +Mastra is a TypeScript framework for building AI applications and agents. Version 1.0 stabilizes the agent, workflow, memory, and deployment APIs. -Check out everything that's new and explore how Mastra can transform your development workflow! +## Agents -## Built-In Agent System That Handles Everything +Agents use LLMs and tools to solve open-ended tasks. They reason about goals, decide which tools to use, retain conversation memory, and iterate internally until the model emits a final answer or an optional stop condition is met. -Mastra's powerful agent system offers an out-of-the-box solution for building sophisticated AI assistants. With built-in reasoning capabilities, your agents automatically handle complex tasks without you having to worry about the underlying complexity. - -Our essential agent features include: - -- **Powerful tool integration** — Connect to any API or database effortlessly -- **Built-in memory management** — Your agents remember everything, automatically -- **Complete conversation handling** — Production-ready chat out of the box -- **Hands-on debugging tools** — Explore what your agents are thinking in real time - -Learn more about agents in our comprehensive documentation. - -## Revolutionary Workflow Engine - -Mastra's workflow engine is the most powerful orchestration system available for TypeScript developers. It makes it easy to build complex automation pipelines without changing your code. - -Key benefits: - -- Build workflows that automatically handle failures and retries -- Production-ready orchestration that scales to your needs -- Choose the right workflow solution for any use case -- Out-of-the-box support for parallel execution, branching, and error recovery - -## Seamless Memory & Knowledge System - -Our complete memory solution offers everything you need to build AI applications that maintain meaningful conversations and remember important details. Whether you're building a simple chatbot or a sophisticated AI assistant, Mastra's memory system handles it all. - -Supported storage providers: +Each agent accepts a model configuration, a set of tools, and optional memory. At runtime, the agent loop calls the LLM, parses tool-call responses, executes the selected tools, and feeds results back into the next LLM turn. ```typescript import { Mastra } from "@mastra/core"; +const mastra = new Mastra({ + agents: { + launcher: { + model: "gpt-4o", + tools: [fetchMetrics, writeSummary], + }, + }, +}); + +const agent = mastra.getAgent("launcher"); +const result = await agent.generate("Summarize Q1 metrics"); +console.log(result.text); +``` + +## Workflows + +Workflows define multi-step task sequences as a directed graph of steps. Each step receives typed input, runs a handler function, and passes output to the next step. Steps can run in parallel, branch conditionally, and recover from errors via retry policies. + +```typescript +const pipeline = workflow("quarterly-report") + .step("fetch", { handler: fetchData }) + .step("analyze", { handler: analyzeData, after: "fetch" }) + .step("summarize", { handler: summarize, after: "analyze" }); +``` + +Workflows separate orchestration logic from agent reasoning. Use workflows when the task structure is known ahead of time; use agents when the task requires open-ended decision-making. + +## Memory + +Memory gives agents coherence across interactions by persisting conversation threads and enabling semantic recall over past messages. + +Mastra requires a storage provider for memory. Supported providers: PostgreSQL, LibSQL, and Redis. + +```typescript const mastra = new Mastra({ memory: { provider: "postgresql", @@ -47,27 +55,29 @@ }); ``` -## Enterprise-Grade Deployment +Each thread maintains an ordered message history. Semantic recall uses vector search to retrieve relevant context from previous threads when the current conversation references earlier topics. -Mastra makes it easy to deploy your AI agents to production without changing your code. Our built-in deployment adapters automatically handle scaling, monitoring, and reliability — so you can focus on building great products instead of managing infrastructure. +## Tools -Explore our deployment options: +Tools are typed functions that agents can execute at runtime. Each tool declares an input schema (Zod), a handler function, and an optional description that the LLM uses to decide when to invoke it. -- **Vercel** — One-click deployment for serverless environments -- **Netlify** — Seamless integration with your existing Netlify projects -- **Cloudflare Workers** — Edge deployment for the fastest possible response times -- **Docker** — Complete containerized deployment for maximum control +Tools extend agent capabilities to external systems: APIs, databases, file systems, or any custom logic. The agent decides which tools to call based on the current goal and the tool descriptions available in its context. -## Getting Started Is Easy! +## Deployment -Ready to build something amazing? Check out our hands-on quickstart guide: +Deploy agents using framework-agnostic adapters. The `@mastra/deployer` package provides integrations for: + +- **Vercel** — serverless function adapter +- **Netlify** — serverless function adapter +- **Cloudflare Workers** — edge runtime adapter +- **Docker** — container-based deployment via generated Dockerfile + +Each adapter wraps the Mastra instance in the target platform's request handler format. No application code changes are required between adapters. + +## Install ```bash npm create mastra@latest ``` -Learn more at [mastra.ai](https://mastra.ai) and explore our essential documentation to find the right solution for your needs. - ---- - -*Mastra — Making AI Development Easy for Everyone* +Documentation: [mastra.ai](https://mastra.ai) | Source: [github.com/mastra-ai/mastra](https://github.com/mastra-ai/mastra)