arXiv:2607.19297cs.AIcs.SE2026-07

用图结构设计可复现的智能流程,让复杂业务自动化更可控。

Graph-Based Agentic AI with LangGraph: Workflow Pathways for Long-Running Stateful Business Processes

  • 基于图结构构建带状态的智能工作流,明确路由与暂停逻辑。
  • 三类实战方案验证:修复查询、带证据筛选的生成、人机协同审批。
  • 适合需要审计追踪与容错恢复的长周期企业级AI应用。

本文面向业务流程中的长期运行、有状态、多步骤生成式AI系统,提供基于图的工作流路径实践指南。不将LangGraph(一种有状态代理的低层编排框架)作为模型质量评估目标,而是呈现三个可执行的解决方案:带修复循环的SQL分析、带证据门控的代理检索增强生成,以及支持中断与断点恢复的人机协同策略审查。通过类型化状态、条件路由、确定性工具、重试机制、中断处理、检查点和追踪日志,展示这些组件如何协同工作。强调根据工作流复杂度选择技术:简单工具调用可用ReAct风格或纯SDK循环;结构化提取推荐使用schema-first工具;若优化提示或程序才是核心,则适用DSPy。每种方案说明何时值得采用LangGraph的额外结构,并确保路径、暂停与审计轨迹成为显式产品行为,而非隐藏在提示逻辑中。

原文摘要 · Abstract (English)

This paper is a practitioner guide to graph-based workflow pathways for long-running, stateful, multi-step generative AI systems in business processes. Rather than treating LangGraph, a low-level orchestration framework for stateful agents, as a model-quality benchmark target, we present three executable recipes -- SQL analytics with repair loops, agentic retrieval-augmented generation with evidence gating, and human-in-the-loop policy review with interrupt and checkpoint recovery -- to show how typed state, conditional routing, deterministic tools, retries, interrupts, checkpoints, and traces fit together. LangGraph is positioned by workflow-complexity fit, not as a universal default: simpler ReAct-style or plain SDK loops may be better for basic tool use, schema-first tools for structured extraction and validation, and DSPy when prompt or program optimization is the main goal. Each recipe explains when LangGraph is worth the extra structure and which implementation patterns make routes, pauses, and audit trails explicit product behavior rather than hidden prompt logic.

Agent系统工作流状态管理企业应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。