IA / Automatisation 29 mai 2026

Fini Python ? Agents prêts pour la prod avec Mastra et Vercel AI SDK

VpsGona Équipe 29 mai 2026 ~15 min
Mastra Vercel AI SDK TypeScript 2026

Guide Mastra + Vercel AI SDK pour des agents TypeScript en production. Mastra, AI SDK. Voir OpenClaw + Ollama, iOS sans Mac, mémoire LLM, Hermes + Ollama.

Divulgation : location Mac optionnelle via VpsGona.

Pourquoi TypeScript

Studio sur localhost:4111. ToolLoopAgent : 20 étapes par défaut—fixez stepCountIs(N).

Python vs TS

AxePythonTypeScript
AxePythonTypeScript
RuntimevenvNode 20+
TypesPydanticZod partagé
UISSE customAI SDK stream
CibleMLProduits web

Architecture

npm create mastra@latest ; ToolLoopAgent + createAgentUIStreamResponse.

Mastra (8 étapes)

  1. Node 20+
  2. npm create mastra@latest
  3. Assistant
  4. src/mastra/
  5. .env
  6. npm run dev
  7. Outils Zod
  8. Déploiement

AI SDK (6 étapes)

  1. Next.js 15
  2. npm install ai @ai-sdk/openai zod
  3. Agent
  4. Route API
  5. useChat
  6. Prod : limites

Nouveau produit → Mastra. Feature SaaS → AI SDK.

Dépannage

Boucle infinie

Réduire stepCountIs.

Studio KO

Port 4111, Node 20+.

FAQ

Do I need Python for Mastra or Vercel AI SDK?

No for the app layer—both run on Node.js 20+. Python may remain for offline ML only.

What Node version is required?

Mastra targets Node 20+. Match dev and CI.

What is the default ToolLoopAgent step limit?

Up to 20 steps unless you set stopWhen: stepCountIs(N).

Where does Mastra Studio run?

Typically http://localhost:4111 after npm run dev.

Can I use local Ollama?

Yes via OpenAI-compatible endpoints; see our OpenClaw + Ollama and Hermes guides for local stacks.

IA native TypeScript

Déployez des agents à côté de votre stack React.