Building AI Agents in TypeScript with Mastra Raja Krishna

Building AI Agents in TypeScript with Mastra

Agenda

  1. Why not ChatGPT
  2. Why build your own
  3. Mastra
  4. Live demo

Why not ChatGPT

You watch it work. You cannot see how.

  • You type a prompt. ChatGPT calls tools, MCP, memory.
  • You cannot inspect evals, swap models, or leave OpenAI.

Use cases

Why build your own?

  • See your own evaluations
  • Run local LLMs
  • Swap providers, not just OpenAI
  • Fallback when a provider is down
  • Your UI, not their chat tab
  • Tools and MCP you control
  • Memory you own

Mastra

You own the whole process.

DEMO

Cat typing on a computer

Not in the demo

There is more you can do.

  • Mastra Client, your own UI
  • Model fallbacks across providers
  • Semantic recall / RAG
  • Deploy as a server
  • Channels and voice

model: {
  id: "ollama/llama3.2",
  url: "http://localhost:11434/v1",
}
              
This repo uses openai/gpt-5-mini. LM Studio works the same at :1234/v1.

Thank you

GitHub QR code GitHub
LinkedIn QR code LinkedIn
Download PDF