{"product_id":"principles-of-building-ai-agents-2nd-edition","title":"Principles of Building AI Agents, 2nd Edition by Sam Bhagwat","description":"\u003ch2\u003ePrinciples of Building AI Agents, 2nd Edition by Sam Bhagwat \u003c\/h2\u003e\n\u003cp\u003e\u003cspan class=\"citation-348 citation-end-348\"\u003eThe book is intentionally brief, highly scannable, and designed to get a developer up and running with a functional agent in a matter of days.\u003csup class=\"superscript\" data-turn-source-index=\"5\"\u003e\u003c!----\u003e\u003c\/sup\u003e\u003c\/span\u003e It breaks down the agentic ecosystem into three distinct technical layers:\u003cspan class=\"citation-347 citation-end-347\"\u003eNavigating the real-world tradeoffs between hosted frontier models and open-source models, balancing parameters like accuracy, token cost, latency, and context window sizes.\u003csup class=\"superscript\" data-turn-source-index=\"6\"\u003e\u003c!----\u003e\u003c\/sup\u003e\u003c\/span\u003eUnderstanding how newer \"thinking\" models alter prompt requirements, functioning more like standalone \"report generators\" that require dense context up front rather than simple iterative promptsMoving past \"vibes.\" \u003cspan class=\"citation-345 citation-end-345\"\u003eBhagwat codifies practical, structured techniques including system prompt optimization, few-shot variations, and formatting tricks to make LLM outputs deterministic.\u003csup class=\"superscript\" data-turn-source-index=\"8\"\u003e\u003c\/sup\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp data-path-to-node=\"15\"\u003eWhile a massive portion of the data science ecosystem relies entirely on Python (using libraries like LangChain or AutoGen), Bhagwat writes primarily for the massive world of web developers. By utilizing JavaScript\/TypeScript via Mastra, he demonstrates that building production AI backends can fit seamlessly into modern full-stack web infrastructure.A major theme throughout the text is knowing when \u003ci data-path-to-node=\"17\" data-index-in-node=\"50\"\u003enot\u003c\/i\u003e to give an agent complete freedom. Bhagwat outlines why open-ended autonomous loops often break in production. \u003cspan class=\"citation-339 citation-end-339\"\u003eHe advocates for graph-based workflows that explicitly constrain the agent's path when predictability and corporate guardrails are paramount.\u003csup class=\"superscript\" data-turn-source-index=\"14\"\u003e\u003c!----\u003e\u003c\/sup\u003e\u003c\/span\u003e\u003cspan class=\"citation-338\"\u003eBecause LLM processing and complex tool calls introduce significant latency, Bhagwat heavily emphasizes \u003c\/span\u003e\u003cb data-path-to-node=\"19\" data-index-in-node=\"104\"\u003e\u003cspan class=\"citation-338\"\u003estreaming updates\u003c\/span\u003e\u003c\/b\u003e\u003cspan class=\"citation-338 citation-end-338\"\u003e.\u003csup class=\"superscript\" data-turn-source-index=\"15\"\u003e\u003c!----\u003e\u003c\/sup\u003e\u003c\/span\u003e He instructs developers to stream intermediate step completions and partial tool outputs directly to the frontend, preventing users from staring at blank, shimmering loading states.\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003eLanguage: English.\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003eGenre: Applied Artificial Intelligence.\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003eBinding: সেলাই করা বাইন্ডিং\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003eQuality: Premium Quality Books.\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003ePrinting: High Quality Printing.\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003ePaper: Eye Friendly paper (Cream White)\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003e\u003cstrong\u003eCover: Matt cover (Paperback).\u003c\/strong\u003e\u003c\/span\u003e\u003c\/p\u003e","brand":"Royal Books BD","offers":[{"title":"Default Title","offer_id":47234639462585,"sku":null,"price":270.0,"currency_code":"BDT","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0780\/0874\/6169\/files\/Principles_of_Building_AI_Agents_2nd_Edition.jpg?v=1779387932","url":"https:\/\/royalbooksbd.com\/products\/principles-of-building-ai-agents-2nd-edition","provider":"Royal Books BD","version":"1.0","type":"link"}