{"id":7026459,"date":"2026-08-04T07:48:18","date_gmt":"2026-08-04T07:48:18","guid":{"rendered":"https:\/\/peraltafinancing.com\/analytics\/a-complete-guide-in-langgraph\/"},"modified":"2026-08-04T07:48:18","modified_gmt":"2026-08-04T07:48:18","slug":"a-complete-guide-in-langgraph","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=7026459","title":{"rendered":"A Complete Guide in LangGraph"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"article-start\">\n<p>AI-agent development has progressed through overlapping phases: prompt engineering, context engineering, tool use, autonomous loops, memory systems, and multi-agent coordination. A newer focus is graph engineering, which treats AI applications as explicitly designed workflows rather than a single autonomous agent.<\/p>\n<p>Graph engineering defines how agents, tools, deterministic functions, validators, data sources, and humans coordinate to complete tasks. It is broader than LangGraph, GraphRAG, or knowledge graphs. In this article, we examine graph engineering from an implementation perspective and build a reliable LangGraph workflow.<\/p>\n<h2 id=\"h-what-is-graph-engineering\" class=\"wp-block-heading\"><strong>What Is Graph Engineering?<\/strong><\/h2>\n<p>Graph engineering is the practice of representing an AI application as an executable graph containing agents, tools, functions, policies, data systems, evaluators, and human decisions.<\/p>\n<p>A practical definition is:<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>&#13;<\/p>\n<p>Graph engineering is the design of nodes, dependencies, state transitions, execution routes, validation gates, recovery paths, and control boundaries inside an agentic system.<\/p>\n<p>&#13;\n<\/p><\/blockquote>\n<p>Consider an AI system that researches a technical topic, writes a report, verifies its claims, and sends it to a client.<\/p>\n<p>A single-agent implementation might look like this:<\/p>\n<p>\u00a0<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-2-pa10g5.webp\" alt=\"What Is Graph Engineering?\"\/><\/figure>\n<\/div>\n<p>Most of those transitions are hidden inside the model\u2019s context. The model decides when to search, when enough evidence has been collected, whether the output is correct, and when the task is complete.<\/p>\n<p>A graph-engineered implementation makes those responsibilities explicit:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-3-pa10g5-scaled.webp\" alt=\"Workflow graph used in graph engineering\"\/><\/figure>\n<\/div>\n<p>Here, the graph defines which transitions are permitted. Individual agents can still reason autonomously within their nodes, but they do not control the entire system.<\/p>\n<h2 id=\"h-core-components-of-graph-engineering\" class=\"wp-block-heading\"><strong>Core Components of Graph Engineering<\/strong><\/h2>\n<h3 id=\"h-1-nodes\" class=\"wp-block-heading\"><strong>1. Nodes<\/strong><\/h3>\n<p>A node is a bounded unit of execution.<\/p>\n<p>A node may contain:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>An LLM call<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A complete tool-using agent<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A Python function<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A retrieval operation<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A database query<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>An API request<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A policy check<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A test suite<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A human approval request<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A subgraph<\/li>\n<p>&#13;\n<\/ul>\n<p>Not every node should be an AI agent.<\/p>\n<p>Known business rules should generally remain deterministic. An LLM is useful where semantic interpretation, generation, planning, or ambiguity is involved.<\/p>\n<p>For example, calculating whether an invoice exceeds an approval threshold does not require an LLM. Understanding whether an email represents a refund request may require one.<\/p>\n<h3 id=\"h-2-edges\" class=\"wp-block-heading\"><strong>2. Edges<\/strong><\/h3>\n<p>Edges define which nodes can execute after another node.<\/p>\n<p>Common edge types include:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Direct edges<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Conditional edges<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Parallel edges<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Looping edges<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Error edges<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Human-controlled edges<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Event-triggered edges<\/li>\n<p>&#13;\n<\/ul>\n<p>An edge represents a dependency or control rule.<\/p>\n<p>For example:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-4-pa10g5.webp\" alt=\"Edges in graph engineering\"\/><\/figure>\n<\/div>\n<p>The routing condition may be implemented through deterministic Python logic or an LLM classifier.<\/p>\n<h3 id=\"h-3-state\" class=\"wp-block-heading\"><strong>3. State<\/strong><\/h3>\n<p>State is the shared record carried through the graph.<\/p>\n<p>It may contain:<\/p>\n<pre class=\"wp-block-code\"><code>class WorkflowState(TypedDict):&#13;\n    user_request: str&#13;\n    task_plan: list[str]&#13;\n    retrieved_evidence: list[str]&#13;\n    draft: str&#13;\n    validation_result: dict&#13;\n    retry_count: int&#13;\n    approval_status: str<\/code><\/pre>\n<p>Typed state makes the inputs and outputs of nodes visible. It also reduces the need to pass a complete conversation transcript to every agent.<\/p>\n<p>LangGraph uses stateful graphs to combine deterministic steps with LLM-driven steps. It also provides persistence, streaming, human-in-the-loop controls, and support for long-running execution.<\/p>\n<h3 id=\"h-4-state-reducers\" class=\"wp-block-heading\"><strong>4. State Reducers<\/strong><\/h3>\n<p>Parallel nodes may update the same state field.<\/p>\n<p>Suppose three research agents return evidence simultaneously:<\/p>\n<pre class=\"wp-block-code\"><code>{&#13;\n    \"evidence\": [\"Source A\"]&#13;\n}&#13;\n{&#13;\n    \"evidence\": [\"Source B\"]&#13;\n}&#13;\n{&#13;\n    \"evidence\": [\"Source C\"]&#13;\n}<\/code><\/pre>\n<p>The graph needs a rule for combining these updates.<\/p>\n<p>A reducer may append lists, merge dictionaries, select the latest value, or apply a custom conflict-resolution policy.<\/p>\n<p>Without a clear reducer, parallel updates can overwrite one another or create inconsistent state.<\/p>\n<h3 id=\"h-5-routes-and-guard-conditions\" class=\"wp-block-heading\"><strong>5. Routes and Guard Conditions<\/strong><\/h3>\n<p>A route determines which edge should run.<\/p>\n<p>A guard condition checks whether a transition is allowed.<\/p>\n<pre class=\"wp-block-code\"><code>def route_after_review(state):&#13;\n    if state[\"grounding_score\"] <\/code><\/pre>\n<p>Hard constraints should not be hidden inside prompts. They should be enforced in routing code whenever possible.<\/p>\n<h3 id=\"h-6-checkpoints\" class=\"wp-block-heading\"><strong>6. Checkpoints<\/strong><\/h3>\n<p>A checkpoint stores a snapshot of the graph state.<\/p>\n<p>Checkpoints allow a workflow to:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Resume after interruption<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Recover from failure<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Wait for human feedback<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Inspect previous states<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Replay a workflow<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Support long-running tasks<\/li>\n<p>&#13;\n<\/ul>\n<p>LangGraph separates thread-level checkpoints from long-term stores. Checkpointers preserve graph state for a specific execution thread, while stores keep application data across threads.<\/p>\n<h3 id=\"h-7-interrupts\" class=\"wp-block-heading\"><strong>7. Interrupts<\/strong><\/h3>\n<p>An interrupt pauses the graph and requests external input.<\/p>\n<p>Common uses include:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Approval before sending an email<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Review before publishing content<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Confirmation before issuing a refund<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Editing generated parameters<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Providing missing information<\/li>\n<p>&#13;\n<\/ul>\n<p>LangGraph interrupts save the current state and allow execution to resume later using the same thread identifier. The documentation also recommends ensuring that side effects before an interrupt are idempotent.<\/p>\n<h2 id=\"h-important-agent-graph-patterns\" class=\"wp-block-heading\"><strong>Important Agent Graph Patterns<\/strong><\/h2>\n<p>LangGraph and Anthropic describe several recurring orchestration patterns for agentic applications.<\/p>\n<h3 id=\"h-prompt-chaining\" class=\"wp-block-heading\"><strong>Prompt Chaining<\/strong><\/h3>\n<p>Each node processes the output of the previous node.<\/p>\n<p>\u00a0<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-5-pa10g5.webp\" alt=\"Prompt changing in graph engineering\"\/><\/figure>\n<\/div>\n<p>Use it when the task can be divided into fixed, verifiable stages.<\/p>\n<h3 id=\"h-routing\" class=\"wp-block-heading\"><strong>Routing<\/strong><\/h3>\n<p>A router sends the request to a specialized branch.<\/p>\n<p>\u00a0<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-6-pa10g5.webp\" alt=\"routing in graph engineering\"\/><\/figure>\n<\/div>\n<p>Use deterministic routing when categories are exact. Use model-based routing when classification requires semantic interpretation.<\/p>\n<h3 id=\"h-parallelization\" class=\"wp-block-heading\"><strong>Parallelization<\/strong><\/h3>\n<p>Independent tasks execute concurrently.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-7-pa10g5.webp\" alt=\"parallelization in graph engineering\"\/><\/figure>\n<\/div>\n<p>Parallelization can reduce latency and allow different agents to examine separate dimensions of a problem.<\/p>\n<p>However, only independent tasks should run in parallel. Creating parallel branches that secretly depend on one another produces incomplete or inconsistent results.<\/p>\n<h3 id=\"h-orchestrator-worker\" class=\"wp-block-heading\"><strong>Orchestrator-Worker<\/strong><\/h3>\n<p>An orchestrator decomposes a task and delegates parts to workers.<\/p>\n<p>\u00a0<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-8-pa10g5.webp\" alt=\"Orchestrator-Worker \u2013 illustration\"\/><\/figure>\n<\/div>\n<p>This pattern is useful when the number and type of subtasks cannot be known before the request arrives.<\/p>\n<p>The orchestrator should primarily plan, assign, and integrate. If it directly performs every tool call, the architecture becomes another monolithic agent.<\/p>\n<h3 id=\"h-evaluator-optimizer\" class=\"wp-block-heading\"><strong>Evaluator-Optimizer<\/strong><\/h3>\n<p>One component generates an artifact while another evaluates it.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-9-pa10g5.webp\" alt=\"Evaluator-Optimizer \u2013 illustration\"\/><\/figure>\n<\/div>\n<p>This pattern works best when the evaluation criteria are clear and revision produces measurable improvement.<\/p>\n<h3 id=\"h-human-in-the-loop\" class=\"wp-block-heading\"><strong>Human-in-the-Loop<\/strong><\/h3>\n<p>A human reviews the workflow before a consequential action.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-10-pa10g5.webp\" alt=\"Human-in-the-Loop \u2013 illustration\"\/><\/figure>\n<\/div>\n<p>Human review should be risk-based. Requiring approval for every harmless step makes the system slow without improving safety.<\/p>\n<h2 id=\"h-hands-on-building-a-graph-engineered-research-workflow\" class=\"wp-block-heading\"><strong>Hands-On: Building a Graph-Engineered Research Workflow<\/strong><\/h2>\n<p>We will build a graph that:<\/p>\n<ol class=\"wp-block-list\">&#13;<\/p>\n<li>Plans the task<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Collects evidence<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Writes a draft<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Evaluates the draft<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Revises weak drafts<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Requests human approval<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Finalizes the output<\/li>\n<p>&#13;\n<\/ol>\n<h3 id=\"h-install-the-dependencies\" class=\"wp-block-heading\"><strong>Install the Dependencies<\/strong><\/h3>\n<pre class=\"wp-block-code\"><code>pip install -U langgraph langchain langchain-openai<\/code><\/pre>\n<p>Install the integration package for your chosen model provider separately.<\/p>\n<p>Set a supported model in the environment:<\/p>\n<pre class=\"wp-block-code\"><code>model_name =\"openai:gpt-4.1-mini\"<\/code><\/pre>\n<h3 id=\"h-define-the-state-and-model\" class=\"wp-block-heading\"><strong>Define the State and Model<\/strong><\/h3>\n<pre class=\"wp-block-code\"><code>import os&#13;\nfrom typing import Literal, TypedDict&#13;\n&#13;\nfrom pydantic import BaseModel, Field&#13;\nfrom langchain.chat_models import init_chat_model&#13;\nfrom langgraph.checkpoint.memory import InMemorySaver&#13;\nfrom langgraph.graph import END, START, StateGraph&#13;\nfrom langgraph.types import Command, interrupt&#13;\n&#13;\nfrom google.colab import userdata&#13;\nos.environ['OPENAI_API_KEY'] = userdata.get('OPENAI_KEY')&#13;\n&#13;\nmodel = init_chat_model(model_name)&#13;\n&#13;\n&#13;\nclass ResearchState(TypedDict, total=False):&#13;\n    topic: str&#13;\n    plan: str&#13;\n    evidence: str&#13;\n    draft: str&#13;\n    feedback: str&#13;\n    evaluator_approved: bool&#13;\n    human_approved: bool&#13;\n    revision_count: int&#13;\n&#13;\n&#13;\nclass ReviewResult(BaseModel):&#13;\n    approved: bool = Field(&#13;\n        description=\"Whether the draft is accurate and well grounded.\"&#13;\n    )&#13;\n    feedback: str = Field(&#13;\n        description=\"Specific corrections required before approval.\"&#13;\n    )&#13;\n&#13;\n&#13;\nreview_model = model.with_structured_output(ReviewResult)<\/code><\/pre>\n<p>The state is the interface shared by all nodes. Each node reads only the values it needs and returns only the fields it o wns.<\/p>\n<h3 id=\"h-create-the-nodes\" class=\"wp-block-heading\"><strong>Create the Nodes<\/strong><\/h3>\n<pre class=\"wp-block-code\"><code>def planner_node(state: ResearchState) -&gt; ResearchState:&#13;\n    response = model.invoke(&#13;\n        f\"\"\"&#13;\n        Create a concise research plan for the following topic:&#13;\n&#13;\n        {state['topic']}&#13;\n&#13;\n        Include the questions that must be answered and the evidence needed.&#13;\n        \"\"\"&#13;\n    )&#13;\n&#13;\n    return {&#13;\n        \"plan\": response.content,&#13;\n        \"revision_count\": 0,&#13;\n    }&#13;\n&#13;\n&#13;\ndef researcher_node(state: ResearchState) -&gt; ResearchState:&#13;\n    response = model.invoke(&#13;\n        f\"\"\"&#13;\n        Produce a grounded research brief for this topic:&#13;\n&#13;\n        {state['topic']}&#13;\n&#13;\n        Follow this plan:&#13;\n&#13;\n        {state['plan']}&#13;\n&#13;\n        Clearly separate verified information, assumptions, and open questions.&#13;\n        \"\"\"&#13;\n    )&#13;\n&#13;\n    return {\"evidence\": response.content}&#13;\n&#13;\n&#13;\ndef writer_node(state: ResearchState) -&gt; ResearchState:&#13;\n    response = model.invoke(&#13;\n        f\"\"\"&#13;\n        Write a professional technical article using only the evidence below.&#13;\n&#13;\n        Topic:&#13;\n        {state['topic']}&#13;\n&#13;\n        Evidence:&#13;\n        {state['evidence']}&#13;\n&#13;\n        Include an introduction, architecture explanation, implementation&#13;\n        considerations, limitations, and conclusion.&#13;\n        \"\"\"&#13;\n    )&#13;\n&#13;\n    return {\"draft\": response.content}&#13;\n&#13;\n&#13;\ndef evaluator_node(state: ResearchState) -&gt; ResearchState:&#13;\n    review = review_model.invoke(&#13;\n        f\"\"\"&#13;\n        Evaluate the draft against the available evidence.&#13;\n&#13;\n        Evidence:&#13;\n        {state['evidence']}&#13;\n&#13;\n        Draft:&#13;\n        {state['draft']}&#13;\n&#13;\n        Check technical accuracy, grounding, completeness, and clarity.&#13;\n        \"\"\"&#13;\n    )&#13;\n&#13;\n    return {&#13;\n        \"evaluator_approved\": review.approved,&#13;\n        \"feedback\": review.feedback,&#13;\n    }&#13;\n&#13;\n&#13;\ndef revision_node(state: ResearchState) -&gt; ResearchState:&#13;\n    response = model.invoke(&#13;\n        f\"\"\"&#13;\n        Revise the following technical article.&#13;\n&#13;\n        Draft:&#13;\n        {state['draft']}&#13;\n&#13;\n        Reviewer feedback:&#13;\n        {state['feedback']}&#13;\n&#13;\n        Preserve correct sections and fix only the identified weaknesses.&#13;\n        \"\"\"&#13;\n    )&#13;\n&#13;\n    return {&#13;\n        \"draft\": response.content,&#13;\n        \"revision_count\": state.get(\"revision_count\", 0) + 1,&#13;\n    }&#13;\n&#13;\n&#13;\ndef human_review_node(state: ResearchState) -&gt; ResearchState:&#13;\n    decision = interrupt(&#13;\n        {&#13;\n            \"message\": \"Review this article before finalization.\",&#13;\n            \"draft\": state[\"draft\"],&#13;\n            \"automated_feedback\": state.get(\"feedback\", \"\"),&#13;\n            \"allowed_actions\": [\"approve\", \"reject\"],&#13;\n        }&#13;\n    )&#13;\n&#13;\n    return {&#13;\n        \"human_approved\": decision.get(\"action\") == \"approve\",&#13;\n        \"feedback\": decision.get(&#13;\n            \"feedback\",&#13;\n            state.get(\"feedback\", \"\"),&#13;\n        ),&#13;\n    }&#13;\n&#13;\n&#13;\ndef finalize_node(state: ResearchState) -&gt; ResearchState:&#13;\n    return {\"human_approved\": True}<\/code><\/pre>\n<h3 id=\"h-define-conditional-routes\" class=\"wp-block-heading\"><strong>Define Conditional Routes<\/strong><\/h3>\n<pre class=\"wp-block-code\"><code>def route_after_evaluation(&#13;\n    state: ResearchState,&#13;\n) -&gt; Literal[\"revise\", \"human_review\"]:&#13;\n    if state.get(\"evaluator_approved\"):&#13;\n        return \"human_review\"&#13;\n&#13;\n    if state.get(\"revision_count\", 0) &gt;= 2:&#13;\n        return \"human_review\"&#13;\n&#13;\n    return \"revise\"&#13;\n&#13;\n&#13;\ndef route_after_human_review(&#13;\n    state: ResearchState,&#13;\n) -&gt; Literal[\"finalize\", \"revise\"]:&#13;\n    if state.get(\"human_approved\"):&#13;\n        return \"finalize\"&#13;\n&#13;\n    return \"revise\"<\/code><\/pre>\n<p>The evaluator does not control the graph directly. It updates the state. The routing function reads that state and selects an allowed edge.<\/p>\n<p>The revision limit prevents an unbounded evaluator-optimizer loop.<\/p>\n<h3 id=\"h-construct-the-graph\" class=\"wp-block-heading\"><strong>Construct the Graph<\/strong><\/h3>\n<pre class=\"wp-block-code\"><code>builder = StateGraph(ResearchState)&#13;\n&#13;\nbuilder.add_node(\"planner\", planner_node)&#13;\nbuilder.add_node(\"researcher\", researcher_node)&#13;\nbuilder.add_node(\"writer\", writer_node)&#13;\nbuilder.add_node(\"evaluator\", evaluator_node)&#13;\nbuilder.add_node(\"revise\", revision_node)&#13;\nbuilder.add_node(\"human_review\", human_review_node)&#13;\nbuilder.add_node(\"finalize\", finalize_node)&#13;\n&#13;\nbuilder.add_edge(START, \"planner\")&#13;\nbuilder.add_edge(\"planner\", \"researcher\")&#13;\nbuilder.add_edge(\"researcher\", \"writer\")&#13;\nbuilder.add_edge(\"writer\", \"evaluator\")&#13;\n&#13;\nbuilder.add_conditional_edges(&#13;\n    \"evaluator\",&#13;\n    route_after_evaluation,&#13;\n    {&#13;\n        \"revise\": \"revise\",&#13;\n        \"human_review\": \"human_review\",&#13;\n    },&#13;\n)&#13;\n&#13;\nbuilder.add_edge(\"revise\", \"evaluator\")&#13;\n&#13;\nbuilder.add_conditional_edges(&#13;\n    \"human_review\",&#13;\n    route_after_human_review,&#13;\n    {&#13;\n        \"finalize\": \"finalize\",&#13;\n        \"revise\": \"revise\",&#13;\n    },&#13;\n)&#13;\n&#13;\nbuilder.add_edge(\"finalize\", END)&#13;\n&#13;\ncheckpointer = InMemorySaver()&#13;\ngraph = builder.compile(checkpointer=checkpointer)<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-11-pa10g5.webp\" alt=\"Construct the Graph \u2013 illustration\"\/><\/figure>\n<\/div>\n<h3 id=\"h-run-the-graph\" class=\"wp-block-heading\"><strong>Run the Graph<\/strong><\/h3>\n<pre class=\"wp-block-code\"><code>config = {&#13;\n    \"configurable\": {&#13;\n        \"thread_id\": \"graph-engineering-article-001\"&#13;\n    }&#13;\n}&#13;\n&#13;\nresult = graph.invoke(&#13;\n    {&#13;\n        \"topic\": \"Graph engineering for reliable AI agents\",&#13;\n        \"revision_count\": 0,&#13;\n    },&#13;\n    config=config,&#13;\n)&#13;\n&#13;\nif \"__interrupt__\" in result:&#13;\n    print(\"The workflow is waiting for human approval.\")<\/code><\/pre>\n<h3 id=\"h-resume-after-approval\" class=\"wp-block-heading\"><strong>Resume After Approval<\/strong><\/h3>\n<pre class=\"wp-block-code\"><code>final_state = graph.invoke(&#13;\n    Command(&#13;\n        resume={&#13;\n            \"action\": \"approve\",&#13;\n            \"feedback\": \"Approved for publication.\",&#13;\n        }&#13;\n    ),&#13;\n    config=config,&#13;\n)&#13;\n&#13;\nprint(final_state[\"draft\"])<\/code><\/pre>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/cdn.analyticsvidhya.com\/wp-content\/uploads\/2026\/07\/image-12-pa10g5.webp\" alt=\"The same thread_id is required because it identifies the stored execution state.\"\/><\/figure>\n<\/div>\n<p>The same <code>thread_id<\/code> is required because it identifies the stored execution state.<\/p>\n<p><code>InMemorySaver<\/code> is suitable for demonstration, but it loses all checkpoints when the process restarts. Production systems should use durable persistence backed by a database.<\/p>\n<h2 id=\"h-production-requirements-that-diagrams-often-miss\" class=\"wp-block-heading\"><strong>Production Requirements That Diagrams Often Miss<\/strong><\/h2>\n<p>A graph that runs in a notebook is not automatically production-ready.<\/p>\n<h3 id=\"h-node-contracts\" class=\"wp-block-heading\"><strong>Node Contracts<\/strong><\/h3>\n<p>Every node should define:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Required inputs<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Produced outputs<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Allowed tools<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Timeout<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Retry policy<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Side effects<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Failure categories<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Validation rules<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Ownership<\/li>\n<p>&#13;\n<\/ul>\n<p>A node that accepts arbitrary state and returns unstructured text becomes difficult to test.<\/p>\n<h3 id=\"h-idempotency\" class=\"wp-block-heading\"><strong>Idempotency<\/strong><\/h3>\n<p>A retry should not repeat an irreversible action.<\/p>\n<p>For example, retrying a payment node must not charge the customer twice.<\/p>\n<p>Use:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Idempotency keys<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Transaction identifiers<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Deduplication checks<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Operation logs<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Database constraints<\/li>\n<p>&#13;\n<\/ul>\n<h3 id=\"h-error-classification\" class=\"wp-block-heading\"><strong>Error Classification<\/strong><\/h3>\n<p>Not every failure should be retried.<\/p>\n<pre class=\"wp-block-preformatted\">Temporary network failure -&gt; Retry<br\/>Rate limit -&gt; Wait and retry<br\/>Invalid input -&gt; Return to validation<br\/>Missing permission -&gt; Escalate<br\/>Policy violation -&gt; Stop<br\/>Model formatting failure -&gt; Repair output<\/pre>\n<p>A generic retry loop can increase cost without fixing the underlying issue.<\/p>\n<h3 id=\"h-context-isolation\" class=\"wp-block-heading\"><strong>Context Isolation<\/strong><\/h3>\n<p>Do not give every node the complete graph state.<\/p>\n<ol class=\"wp-block-list\">&#13;<\/p>\n<li>A writer may need evidence and an outline.<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A security reviewer may need code and deployment configuration.<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>A publication node may need only the approved artifact and destination.<\/li>\n<p>&#13;\n<\/ol>\n<p>Context isolation reduces token usage, accidental data exposure, and distraction from irrelevant history.<\/p>\n<h3 id=\"h-observability\" class=\"wp-block-heading\"><strong>Observability<\/strong><\/h3>\n<p>Trace at least:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Node start and completion<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Selected route<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>State fields changed<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Tool calls<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Model and prompt version<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Token consumption<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Latency<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Retry count<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Validation results<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Human decisions<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Final outcome<\/li>\n<p>&#13;\n<\/ul>\n<p>Microsoft Agent Framework also separates dynamic agents from explicitly controlled workflows. Its workflow system supports graph-based execution, typed message routing, conditional paths, parallel processing, checkpoints, and human-in-the-loop interactions.<\/p>\n<h2 id=\"h-framework-options\" class=\"wp-block-heading\"><strong>Framework Options<\/strong><\/h2>\n<h3 id=\"h-langgraph\" class=\"wp-block-heading\"><strong>LangGraph<\/strong><\/h3>\n<p>Best suited for teams that need low-level control over state, routes, persistence, subgraphs, interrupts, and mixed deterministic-agentic execution.<\/p>\n<h3 id=\"h-google-adk\" class=\"wp-block-heading\"><strong>Google ADK<\/strong><\/h3>\n<p>Useful for teams building in the Google ecosystem. It supports multi-agent workflows, template-based sequential, parallel, and loop execution, and newer graph-oriented workflows.<\/p>\n<h3 id=\"h-microsoft-agent-framework\" class=\"wp-block-heading\"><strong>Microsoft Agent Framework<\/strong><\/h3>\n<p>Suitable for Python, .NET, and Go teams that require typed workflows, graph routing, checkpointing, human interaction, and integration with enterprise systems.<\/p>\n<h3 id=\"h-plain-python-and-existing-workflow-engines\" class=\"wp-block-heading\"><strong>Plain Python and Existing Workflow Engines<\/strong><\/h3>\n<p>A specialized agent framework may be unnecessary when most of the workflow is deterministic.<\/p>\n<p>Python functions, queues, databases, schedulers, and state-machine libraries can coordinate a small number of LLM-powered steps effectively.<\/p>\n<h2 id=\"h-limitations\" class=\"wp-block-heading\"><strong>Limitations<\/strong><\/h2>\n<p>Graph engineering also introduces:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Additional infrastructure<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>More state-management complexity<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Higher testing requirements<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Synchronization challenges<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Increased model cost when many agents are used<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>More difficult versioning and migrations<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Potential latency at parallel join points<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Overengineering for simple tasks<\/li>\n<p>&#13;\n<\/ul>\n<p>A graph is useful when its structure makes the system safer, faster, easier to evaluate, or easier to maintain.<\/p>\n<p>It is not valuable merely because it contains more boxes.<\/p>\n<h2 id=\"h-conclusion\" class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n<p>Graph engineering is not a replacement for prompt engineering, context engineering, harness engineering, or loop engineering.<\/p>\n<p>It is the layer that coordinates them.<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Prompts control individual model calls.<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Context engineering controls what each model sees.<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Agent loops control how an agent reasons and uses tools.<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Graph engineering controls how multiple agents, loops, functions, validators, tools, and humans work together.<\/li>\n<p>&#13;\n<\/ul>\n<p>The broader lesson is simple:<\/p>\n<ul class=\"wp-block-list\">&#13;<\/p>\n<li>Do not begin by asking how many agents the system needs.<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>Begin by identifying the work, dependencies, decision boundaries, parallel opportunities, validation requirements, failure paths, and human responsibilities.<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>The agents fill the nodes.<\/li>\n<p>&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\n&#13;<\/p>\n<li>The engineering lives in the edges.<\/li>\n<p>&#13;\n<\/ul>\n<h2 id=\"h-frequently-asked-questions\" class=\"wp-block-heading\"><strong>Frequently Asked Questions<\/strong><\/h2>\n<div class=\"schema-faq wp-block-yoast-faq-block\">\n<div id=\"faq-question-1785228660281\" class=\"schema-faq-section\"><strong class=\"schema-faq-question\">Is graph engineering the same as LangGraph?<\/strong><\/p>\n<p class=\"schema-faq-answer\">No. LangGraph is one framework for implementing graph-based agent workflows. Graph engineering is the broader architectural practice. Are knowledge graphs required? No. Workflow graphs can operate without a knowledge graph. A knowledge graph is useful when the system needs to represent and traverse relationships between entities.<\/p>\n<\/div>\n<div id=\"faq-question-1785228660418\" class=\"schema-faq-section\"><strong class=\"schema-faq-question\">Can a graph contain loops?<\/strong><\/p>\n<p class=\"schema-faq-answer\">Yes. Revision cycles, tool-calling agents, retries, and evaluator-optimizer patterns are loops inside a larger graph.<\/p>\n<\/div>\n<div id=\"faq-question-1785228660555\" class=\"schema-faq-section\"><strong class=\"schema-faq-question\">Does every node need an LLM?<\/strong><\/p>\n<p class=\"schema-faq-answer\">No. Most production graphs should combine deterministic functions, tools, policies, and selected LLM-powered nodes.<\/p>\n<\/div>\n<div id=\"faq-question-1785228660692\" class=\"schema-faq-section\"><strong class=\"schema-faq-question\">Can one agent be enough?<\/strong><\/p>\n<p class=\"schema-faq-answer\">Yes. A single agent is often preferable for low-risk, open-ended tasks with a limited toolset and simple recovery requirements.<\/p>\n<\/div>\n<\/div>\n<div class=\"border-top py-3 author-info my-4\">\n<div class=\"author-card d-flex align-items-center\">\n<div class=\"flex-shrink-0 overflow-hidden\">\n                                    <a href=\"https:\/\/www.analyticsvidhya.com\/blog\/author\/harsh9480979\/\" class=\"text-decoration-none active-avatar\"><br \/>\n                                                                       <img decoding=\"async\" src=\"https:\/\/av-eks-lekhak.s3.amazonaws.com\/media\/lekhak-profile-images\/converted_image_0fBqNLi.webp\" width=\"48\" height=\"48\" alt=\"Harsh Mishra\" loading=\"lazy\" class=\"rounded-circle\"\/><br \/>\n                                                                <\/a>\n                                <\/div>\n<\/p><\/div>\n<p>Harsh Mishra is an AI\/ML Engineer who spends more time talking to Large Language Models than actual humans. Passionate about GenAI, NLP, and making machines smarter (so they don\u2019t replace him just yet). When not optimizing models, he\u2019s probably optimizing his coffee intake. \ud83d\ude80\u2615<\/p>\n<\/p><\/div>\n<\/p><\/div>\n<p><h4 class=\"fs-24 text-dark\">Login to continue reading and enjoy expert-curated content.<\/h4>\n<p>                        <button class=\"btn btn-primary mx-auto d-table\" data-bs-toggle=\"modal\" data-bs-target=\"#loginModal\" id=\"readMoreBtn\">Keep Reading for Free<\/button>\n                    <\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>AI-agent development has progressed through overlapping phases: prompt engineering, context engineering, tool use, autonomous loops, memory systems, and multi-agent coordination. A newer focus is graph engineering, which treats AI applications as explicitly designed workflows rather than a single autonomous agent. Graph engineering defines how agents, tools, deterministic functions, validators, data sources, and humans coordinate to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7026460,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12033],"tags":[3037,2059,31128],"dealstore":[],"offerexpiration":[],"class_list":["post-7026459","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytics","tag-complete","tag-guide","tag-langgraph"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A Complete Guide in LangGraph - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=7026459\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Complete Guide in LangGraph - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"AI-agent development has progressed through overlapping phases: prompt engineering, context engineering, tool use, autonomous loops, memory systems, and multi-agent coordination. A newer focus is graph engineering, which treats AI applications as explicitly designed workflows rather than a single autonomous agent. Graph engineering defines how agents, tools, deterministic functions, validators, data sources, and humans coordinate to [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=7026459\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-04T07:48:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"872\" \/>\n\t<meta property=\"og:image:height\" content=\"473\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=7026459#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=7026459\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"A Complete Guide in LangGraph\",\"datePublished\":\"2026-08-04T07:48:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=7026459\"},\"wordCount\":1709,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=7026459#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp\",\"keywords\":[\"Complete\",\"Guide\",\"LangGraph\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=7026459#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=7026459\",\"url\":\"https:\/\/fivemor.com\/?p=7026459\",\"name\":\"A Complete Guide in LangGraph - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=7026459#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=7026459#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp\",\"datePublished\":\"2026-08-04T07:48:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=7026459#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=7026459\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=7026459#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp\",\"width\":872,\"height\":473},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=7026459#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Complete Guide in LangGraph\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Complete Guide in LangGraph - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=7026459","og_locale":"en_US","og_type":"article","og_title":"A Complete Guide in LangGraph - Som2ny Network","og_description":"AI-agent development has progressed through overlapping phases: prompt engineering, context engineering, tool use, autonomous loops, memory systems, and multi-agent coordination. A newer focus is graph engineering, which treats AI applications as explicitly designed workflows rather than a single autonomous agent. Graph engineering defines how agents, tools, deterministic functions, validators, data sources, and humans coordinate to [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=7026459","og_site_name":"Som2ny Network","article_published_time":"2026-08-04T07:48:18+00:00","og_image":[{"width":872,"height":473,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp","type":"image\/webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=7026459#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=7026459"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"A Complete Guide in LangGraph","datePublished":"2026-08-04T07:48:18+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=7026459"},"wordCount":1709,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=7026459#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp","keywords":["Complete","Guide","LangGraph"],"articleSection":["Analytics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=7026459#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=7026459","url":"https:\/\/fivemor.com\/?p=7026459","name":"A Complete Guide in LangGraph - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=7026459#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=7026459#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp","datePublished":"2026-08-04T07:48:18+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=7026459#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=7026459"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=7026459#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/Graph-Engineering.webp.webp","width":872,"height":473},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=7026459#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"A Complete Guide in LangGraph"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/7026459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7026459"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/7026459\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/7026460"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7026459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7026459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7026459"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=7026459"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=7026459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}