{"product_id":"building-ai-agents-with-typescript-kaustav-karmakar-9798176805710","title":"Building AI Agents with Typescript and Next.Js","description":"\u003cp\u003eMost books on AI agents are written for Python. This one is written for the millions of JavaScript and TypeScript developers who are being asked to build AI features inside the web applications they already own.\u003c\/p\u003e\u003cp\u003e\u003ci\u003eBuilding AI Agents with TypeScript and Next.js\u003c\/i\u003e is a practical, production-focused guide to designing, building, testing, and deploying AI agents using the stack you already know. It begins with a clear answer to a question every JavaScript developer should ask: why is TypeScript more powerful than JavaScript, and why does that matter so much for AI? An agent turns unpredictable model output into real actions, such as database writes, refunds, and emails. The places where that happens are where agents break, and TypeScript, paired with runtime validation, is exceptionally good at guarding them.\u003c\/p\u003e\u003cp\u003eFrom there, the book builds a complete agent from first principles. You won't be hidden behind a framework: you write the model interface, the tool layer, and the agent loop yourself. That way, you understand exactly how every piece works and can debug it when something goes wrong.\u003c\/p\u003e\u003cp\u003eWhat you'll learn: \u003c\/p\u003e\u003cul\u003e\n\u003cli\u003eWhy TypeScript beats JavaScript for agent engineering, with twelve concrete advantages and a practical migration path.\u003c\/li\u003e\n\u003cli\u003eThe type-system features that matter most for agents: discriminated unions, generics, Zod schemas, branded types, and result types.\u003c\/li\u003e\n\u003cli\u003eHow to call models, stream responses, and get reliable structured output.\u003c\/li\u003e\n\u003cli\u003eHow to design type-safe tools with permissions, human approval, and safe retries.\u003c\/li\u003e\n\u003cli\u003eHow to build a resumable agent loop that can pause for a human and pick up where it left off.\u003c\/li\u003e\n\u003cli\u003eHow to stream agent output to a Next.js chat interface using route handlers and server actions.\u003c\/li\u003e\n\u003cli\u003eMemory, retrieval-augmented generation (RAG), and vector search with Postgres and pgvector.\u003c\/li\u003e\n\u003cli\u003eMulti-agent patterns, long-running workflows, and the Model Context Protocol (MCP).\u003c\/li\u003e\n\u003cli\u003eTesting and evaluating agents, prompt-injection defences, security, and cost control.\u003c\/li\u003e\n\u003cli\u003eDeployment with Docker, AWS, Vercel, and CI\/CD, plus monitoring in production.\u003c\/li\u003e\n\u003c\/ul\u003e\u003cp\u003e\u003c\/p\u003e\u003cbr\u003e\u003cbr\u003e\u003cb\u003eAuthor:\u003c\/b\u003e Kaustav Karmakar\u003cbr\u003e\u003cb\u003eISBN-13:\u003c\/b\u003e 9798176805710\u003cbr\u003e\u003cb\u003ePublisher:\u003c\/b\u003e Independently Published\u003cbr\u003e\u003cb\u003eLanguage:\u003c\/b\u003e English\u003cbr\u003e\u003cb\u003ePublished:\u003c\/b\u003e 09\/24\/2026\u003cbr\u003e\u003cb\u003ePages:\u003c\/b\u003e 202\u003cbr\u003e\u003cb\u003eFormat:\u003c\/b\u003e Paperback\u003cbr\u003e\u003cb\u003eWeight:\u003c\/b\u003e 0.73lbs\u003cbr\u003e\u003cb\u003eSize:\u003c\/b\u003e 9.61h x 6.69w x 0.43d","brand":"Kaustav Karmakar","offers":[{"title":"Paperback","offer_id":50780142993663,"sku":"9798176805710","price":23.0,"currency_code":"USD","in_stock":true}],"url":"https:\/\/www.whiterainbookhouse.com\/products\/building-ai-agents-with-typescript-kaustav-karmakar-9798176805710","provider":"WR Book House","version":"1.0","type":"link"}