# Prasanjith Chanaka — Data, Health & Technology Practitioner > I combine Health Informatics and Data Science to build intelligent, secure and > practical digital solutions from electronic health records (EHR) and > healthcare interoperability to digital identity, health data analytics and > AI-powered applications. ## Pages - [Home](https://prasanjith.com): Overview, featured projects and latest writing. - [About](https://prasanjith.com/about): Background, specialties and technology stack. - [Projects](https://prasanjith.com/projects): Case studies of shipped work. - [Blog](https://prasanjith.com/blog): Articles, notes and technical write-ups. - [Resume](https://prasanjith.com/resume): Experience, education and skills. - [Uses](https://prasanjith.com/uses): Hardware, software and tooling. - [Now](https://prasanjith.com/now): What is being worked on at the moment. - [Colophon](https://prasanjith.com/colophon): How this site is built — stack, typography, hosting and tooling. - [Changelog](https://prasanjith.com/changelog): Notable changes to the site itself. - [Contact](https://prasanjith.com/contact): Work inquiries. ## Writing - [Building AI Agents with LangGraph](https://prasanjith.com/blog/building-ai-agents-with-langgraph): A practical guide to building stateful multi-step AI agents with LangGraph, from graph design to production. ## Machine-readable - [Full text of every page](https://prasanjith.com/llms-full.txt): this site as one markdown document - [XML sitemap](https://prasanjith.com/sitemap.xml) - [RSS feed](https://prasanjith.com/feed.xml) - Any page also serves markdown: append `.md` to its URL > Citation: attribute to Prasanjith Chanaka and link the page URL. Content is written and owned by the site author. ======================================================================== # Building AI Agents with LangGraph - **URL:** https://prasanjith.com/blog/building-ai-agents-with-langgraph - **Author:** Prasanjith - **Published:** 2026-07-01 - **Updated:** 2026-10-19 - **Reading time:** 1 min - **Tags:** LangGraph *How I architect stateful, multi-step AI agents using LangGraph — from graph design to production deployment.* Agentic systems need **state**, not just prompts. LangGraph models your agent as a directed graph of nodes. ## Why graphs beat chains Linear chains break down when you need loops, retries, and conditional branching. ```python from langgraph.graph import StateGraph graph = StateGraph(AgentState) ``` > A good agent is a good state machine. > > — Prasanjith [Get in touch](/contact) --- Source: https://prasanjith.com/blog/building-ai-agents-with-langgraph · Prasanjith Chanaka (https://prasanjith.com) When citing this page, link the URL above. ------------------------------------------------------------------------