AI / 자동화
2026년 5월 29일
Python 없이? Mastra와 Vercel AI SDK로 프로덕션 TypeScript 에이전트 구축
VpsGona 팀
2026년 5월 29일
~15분
Mastra와 Vercel AI SDK로 TypeScript 프로덕션 에이전트를 구축합니다. Mastra, AI SDK. 관련: OpenClaw + Ollama, Mac 없이 iOS, LLM 메모리, Hermes + Ollama. 서울 노드에서도 Node 20+ 동일합니다.
고지: VpsGona 선택적 Mac 렌탈.
TypeScript 에이전트
Studio localhost:4111. ToolLoopAgent 기본 20스텝—stepCountIs 설정 필수.
Python 비교
| 항목 | Python | TypeScript |
|---|---|---|
| 항목 | Python | TypeScript |
| 런타임 | venv | Node 20+ |
| 타입 | Pydantic | 공유 Zod |
| UI | SSE | AI SDK 스트림 |
| 적합 | ML | 웹 제품 |
구조
npm create mastra@latest, ToolLoopAgent, createAgentUIStreamResponse.
Mastra (8단계)
- Node 20+
npm create mastra@latest- 마법사
src/mastra/.envnpm run dev- 도구 추가
- 배포
AI SDK (6단계)
- Next.js 15
npm install ai @ai-sdk/openai zodToolLoopAgent- API route
useChat- 프로덕션 가드
선택
신규 Mastra, 기존 SaaS는 AI SDK.
문제 해결
무한 루프
stepCountIs 축소.
Studio 실패
포트 4111 확인.
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.