
Tool Use - AI Conversations Principles of Building AI Agents (ft Sam Bhagwat)
11 snips
Dec 2, 2025 Sam Bhagwat, founder of Mastra and co-founder of Gatsby, sheds light on crafting effective AI agents. He discusses the advantages of using TypeScript for agent frameworks and highlights crucial design patterns for tools and prompts. Sam emphasizes the importance of memory types, including observational memory, and warns about the 'lethal trifecta' in security risks. He also shares insights into multi-agent communication and operational safety, aiming to demystify the complexities of building reliable AI agents.
AI Snips
Chapters
Transcript
Episode notes
Study Production-Grade Prompts
- Spend time reading production-grade prompts to learn structure and phrasing.
- Evolve your prompts toward those exemplars rather than inventing them from scratch.
Keep Prompts Close To Code
- Co-locate your agent instructions with the code for high cohesion and low coupling.
- Export from a separate file only when necessary, but prefer nearby code placement.
Design Clear, Observable Tools
- Design tools so their choices are clearly distinct to help agents decide.
- Stream intermediate results for long-running or broad tools to avoid latency issues.

