Files
llm-wiki/entities/mastra.md
T
2026-07-03 00:38:05 +09:00

2.8 KiB

title, created, updated, type, tags, sources, confidence
title created updated type tags sources confidence
Mastra 2026-07-01 2026-07-01 entity
tool
agent
dev-tool
workflow
raw/articles/mastra-typescript-agent-framework-2026.md
medium

Mastra

Mastra は、TypeScript で AI agent、workflow、MCP server、AI application を作るための framework。README は「prototype から production-ready application まで」を対象にし、React、Next.js、Node.js への組み込み、または standalone server としての配備を想定している。

google-adk が Go/Python の graph workflow と session resume を強調するのに対し、Mastra は TypeScript / web application 側の既存 stack に寄せて、model routing、agent、workflow、memory、MCP、eval、observability を一つの開発面にまとめる。loop-engineering の観点では、agent を一回の chat ではなく、状態を持つ workflow、HITL pause/resume、観測・評価される実行単位として扱うための framework と読める。

設計要素

  • Model routing: OpenAI、Anthropic、Gemini など 40+ provider を標準 interface で扱う。provider 切替を application logic から分離する点は、agent 運用の cost / availability control に関わる。
  • Agents and tools: agent は goal に対して tool を選び、final answer または停止条件まで内部反復する。これは agent-harness-engineering の「tool boundary と停止条件を harness 側で設計する」論点と接続する。
  • Graph workflows: .then()、.branch()、.parallel() のような syntax で多段処理を明示的に組み、必要に応じて agent より deterministic な制御面を持てる。
  • Human-in-the-loop: workflow / agent を suspend し、storage に実行状態を残して、承認や入力を待ってから再開できる。
  • MCP servers: agent、tool、structured resource を Model Context Protocol server として公開できる。これは ai-agent-identity-security の認可・監査・最小権限の設計対象にもなる。
  • Evals and observability: built-in evals と observability を production essentials として掲げる。model 能力だけでなく、実行 trace と評価を改善 loop に入れる点で ai-evaluation-infrastructure と近い。

見るべき問い

  • TypeScript application に自然に組み込める一方で、workflow state、MCP exposure、model routing credentials の権限境界をどこで監査するか。
  • Google ADK のような typed graph runtime と比べ、Mastra の web/dev UX は Yuta の既存 automation loop にどのくらい低摩擦で入るか。
  • Built-in eval / observability が、個人用 scheduled job や wiki ingest のような小さな loop にも過剰でなく使えるか。