Skip to content

Instantly share code, notes, and snippets.

@wilmoore
Created September 23, 2025 08:13
Show Gist options
  • Select an option

  • Save wilmoore/53b58c9fc005262477e4a44db6b1420b to your computer and use it in GitHub Desktop.

Select an option

Save wilmoore/53b58c9fc005262477e4a44db6b1420b to your computer and use it in GitHub Desktop.
AI :: Agent :: Training :: Principles of Building AI Agents :: Principles of Building AI Agents | Sam Bhagwat, CEO Mastra

AI :: Agent :: Training :: Principles of Building AI Agents :: Principles of Building AI Agents | Sam Bhagwat, CEO Mastra

⪼ Made with 💜 by Polyglot.

image

This video is an interview-style talk with Sam, the author of "Principles of Building AI Agents" and a founder of MRA (a YC startup). The intent is to educate and inspire viewers about building AI agents, sharing foundational concepts, practical tips, and industry trends from the current "golden era" of AI. Sam walks through core chapters of his guide, demystifying agents, prompt engineering, tool use, workflows, RAG (retrieval-augmented generation), and the rapid progress being made by startups across industries.

Highlights

Dawn of a New Tech Era
  • Building AI agents now feels like the early days of the internet (circa 1996)
  • Surging interest and new startups across every vertical—AI is relevant everywhere
  • Founders are discovering fundamental, sometimes counterintuitive, AI engineering principles
Foundational Concepts for Building Agents
  • Break complex tasks into simpler LLM calls and connect them with workflow graphs
  • Use more examples in prompts—few-shot learning boosts output quality dramatically
  • Start simple: use OpenAI for most tasks, Claude for code, and avoid overcomplicating with infrastructure early
What Is an Agent?
  • Agents operate on a spectrum from simple function callers to fully autonomous systems with memory and task creation
  • Too much autonomy can harm accuracy; sometimes it's better to restrict agent scope
  • Structured workflow graphs help coordinate multi-agent tasks and clarify responsibilities
Tools, Workflows, and Coordination
  • Define tools (functions) with clear, descriptive names and provide example uses
  • System prompts should include detailed tool descriptions for better agent performance
  • Multi-agent systems can use supervisor models or hand-off via structured workflow graphs for coordination
Retrieval-Augmented Generation (RAG) Explained
  • RAG enables semantic search and retrieval, not just keyword matching
  • The process involves chunking, embedding, vector storage, retrieval, and reranking
  • Debate exists on RAG's future as LLM context windows expand, but it's still a critical skill today
Industry Application and Learning Path
  • Startups are applying agents to diverse fields: aerospace, medical transcription, finance, and more
  • Foundational skills: prompt design, memory management, tool integration, and workflow structuring
  • "Principles of Building AI Agents" is positioned as a practical guide for new and experienced builders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment