그래프 워크플로란? AI 업무의 순서·승인·재시작을 나누는 이유

Apache Airflow 공식 실행 화면. 선택된 branch_a와 합류 join은 성공, 선택되지 않은 branch_false는 skipped이며 오른쪽 코드에 합류 조건이 표시되어 있다.
개발 도구·소프트웨어

AI가 안내문을 매끄럽게 썼다고 해서 고객에게 보내도 되는 것은 아닙니다. 주문을 제대로 확인했는지, 적용할 정책이 최신인지, 담당자가 그 문안을 승인했는지는 별개의 문제입니다. 그래프 워크플로는 이런 업무의 진행 조건을 답변 밖에 마련하는 방법입니다. 여기서 그래프는 통계 그림이 아니라, 작은 작업들과 그 사이의 이동 규칙을 뜻합니다. 중요한 것은 칸을 많이 그리는 일이 아니라, 진행해도 되는 조건과 다시 확인해야 하는 조건을 실행 과정에 남기는 것입니다.

작성 AI Tools Lab 운영자 대표 이미지: 공식 문서의 실제 제품 UI 예시 자료 확인 2026-11-09 오류 제보·정정 요청

Apache Airflow 공식 문서에 실린 실제 UI 예제. 선택된 경로와 join은 성공했고 다른 경로는 건너뛰었습니다. 오른쪽 코드의 합류 규칙은 none_failed_min_one_success입니다. 공식 저장소의 Airflow 3.1.x 화면 갱신 자산이며, 이 글의 가상 반품 업무를 실행한 결과는 아닙니다. 출처: Apache Airflow / ASF, Apache License 2.0, 원본 변경 없음. 자료 원문 · 이미지 원본 · 이용 조건

모델을 바꾸는 대신, 업무의 연결을 바꾼다

모델은 문장을 이해하고 생성하는 능력을 제공합니다. 프롬프트는 그 능력에 어떤 일을 시킬지 설명하고, 컨텍스트는 판단할 자료와 현재 상황을 건넵니다. 루프는 결과를 보고 검색이나 수정을 반복하는 실행 방식입니다. 그래프는 그보다 바깥에서 어느 작업 뒤에 무엇을 할 수 있는지, 어디서 사람을 기다릴지를 정합니다. 서로 대체재가 아니라 함께 쓰는 설계 요소입니다.

예를 들어 조사 노드 안에서는 AI가 몇 차례 검색하는 루프를 돌고, 다음 노드에서는 일반 코드가 날짜와 필수 항목을 검사할 수 있습니다. 모든 칸에서 모델을 호출할 이유는 없습니다. 반대로 좋은 연결 구조도 틀린 자료를 참으로 만들지는 못합니다. 그래프의 장점은 지능을 더했다고 선언하는 데 있지 않고, 업무의 책임 경계를 드러내는 데 있습니다.

가상의 반품 안내 업무를 떠올려 보면

가상 사례로, 온라인 상점이 반품 문의에 답하는 과정을 생각해 보겠습니다. 주문 정보와 배송 상태를 확인하고, 해당 상품에 적용되는 반품 정책을 읽은 뒤 안내문 초안을 만듭니다. 주문 번호를 찾지 못했다면 그럴듯한 안내문을 보내는 대신 추가 확인 경로로 갑니다. 정책 적용이 불분명하면 담당자에게 넘깁니다. 이 사례는 설명을 위한 설계이며 실제 상점이나 실행 결과가 아닙니다.

작업이 공유하는 상태에는 주문 식별자, 조회 시점, 사용한 정책 버전, 누락 항목, 초안 버전과 승인 여부가 들어갈 수 있습니다. 노드는 이 기록을 받아 일을 하고 결과를 돌려줍니다. 상태를 정리하면 “답장은 완성됐는데 무엇을 근거로 썼는지 모르는” 상황을 줄일 수 있습니다. 다만 저장 항목은 개인정보 보관 범위와 접근 권한도 고려해 정해야 합니다.

갈림길과 동시 작업은 같은 뜻이 아니다

조건 분기는 결과에 따라 길을 선택하는 일입니다. 반품 가능 여부가 확인되면 초안을 만들고, 확인되지 않으면 검토로 보내는 식입니다. 병렬 처리는 서로 기다릴 필요가 없는 조회들을 함께 진행할 수 있게 만드는 일입니다. 여러 선이 그려졌다고 모두 동시에 실행되거나, 먼저 끝난 하나만으로 다음 단계에 가는 것은 아닙니다. 실제 동시 실행은 실행기의 자원과 설정에도 달려 있습니다.

중요한 곳은 다시 모이는 합류 지점입니다. Apache Airflow의 기본 실행 조건인 all_success는 직접 앞선 작업이 모두 성공해야 다음 작업을 실행합니다. 그런데 분기에서 선택되지 않은 길은 실패가 아니라 건너뜀 상태가 됩니다. 공식 화면의 none_failed_min_one_success는 앞선 작업에 실패가 없고 적어도 하나가 성공하면 합류하도록 한 예입니다. 모든 필수 자료가 갖춰졌다는 업무상의 보증과는 다릅니다. 무엇을 반드시 기다릴지는 별도로 설계해야 합니다.

승인 버튼보다 중요한 것은 승인 대상이다

사람이 검토할 대상은 막연한 “이 작업”이 아니라 실제로 보낼 내용과 수신자입니다. 초안과 목적지, 근거의 기준 시점을 한 묶음으로 보여주고 그 버전에 승인을 연결하는 편이 안전합니다. 승인 뒤 문안이나 수신자가 바뀌면 예전 허락을 그대로 이어 쓰지 않습니다. 오래 기다린 작업이라면 정책과 담당자의 현재 권한도 다시 확인하도록 설계할 수 있습니다. 이것은 업무 애플리케이션이 구현할 규칙이지, 그래프를 그리기만 하면 생기는 기능은 아닙니다.

LangGraph의 interrupt는 실행을 멈추고 외부 입력을 기다리는 기능입니다. 체크포인터가 저장한 상태와 같은 thread_id를 이용해 재개할 수 있습니다. 체크포인트는 게임의 저장 지점처럼 진행 상황을 남기지만, 승인자의 신원을 대신 확인하거나 변경된 권한을 자동 갱신해 주지는 않습니다. 메모리에만 저장한 체크포인트는 프로세스 재시작 때 사라지므로, 운영에서는 지속되는 저장소도 필요합니다.

저장된 상태와 실제로 일어난 일은 다르다

가장 주의할 부분은 이메일 전송이나 결제처럼 시스템 바깥을 바꾸는 동작입니다. “전송 완료”라는 상태를 저장하는 것과 메일 서버가 실제로 보낸 것은 다른 사건입니다. 외부 서버는 일을 마쳤는데 응답이 끊기면, 워크플로에는 성공 기록이 없을 수 있습니다. 이때 기록이 없다는 이유만으로 처음부터 다시 실행하면 중복 메일이나 중복 청구가 생길 수 있습니다.

LangGraph 공식 문서는 재시도가 노드 함수를 처음부터 다시 실행하며, 외부 효과를 정확히 한 번만 발생시키는 보장은 아니라고 설명합니다. interrupt 뒤 재개할 때도 중단된 노드의 앞부분이 다시 실행됩니다. 따라서 도구 호출 한 번이나 체크포인트 하나를 “결제 정확히 한 번”과 같은 뜻으로 읽으면 안 됩니다.

대응 방법 중 하나는 같은 업무에 재사용하는 멱등성 키입니다. 여러 번 요청해도 같은 작업으로 알아보게 하는 식별표입니다. 키는 외부 작업 전에 지속 저장돼 있거나 지속 상태에서 다시 만들 수 있어야 하고, 외부 서비스도 그 키를 받아 중복을 막아야 합니다. 응답이 사라졌다면 실패로 단정하지 않고 외부 처리 상태부터 조회해야 합니다. 결과를 모르는 상태를 명시하는 것이 억지로 성공이나 실패를 고르는 것보다 정확합니다.

멈춤도 업무의 정상적인 결과가 된다

일시적인 연결 오류에는 제한된 재시도가 도움이 되지만, 주문 정보 부족이나 만료된 권한은 같은 요청을 반복해도 해결되지 않습니다. Airflow는 재시도 횟수와 지연을 설정할 수 있습니다. 그러나 몇 번 기다렸는지와 업무를 계속해도 되는지는 다른 판단입니다. 조회 실패를 “해당 주문 없음”으로 바꾸거나, 오래된 정책을 최신 자료처럼 쓰지 않는 규칙이 필요합니다.

한 번 요약하고 끝나는 일에 복잡한 그래프는 부담일 수 있습니다. 반면 반복 실행, 사람 승인, 외부 전송이 섞이면 어디서 멈췄는지 설명할 수 있는 구조가 유용합니다. 그래프가 주는 변화는 AI를 무조건 더 자율적으로 만드는 것이 아닙니다. 답변 생성, 사실 확인, 허락, 실행을 구분해 필요한 곳에서 확실히 기다리게 만드는 것입니다.

근거 자료와 확인 범위

  1. 그래프 엔지니어링: AI 업무가 어디서 멈출지 설계하는 법 | AGI Tools Lab
  2. Apache Airflow 3.4.0 Documentation: Dags, Trigger Rules
  3. Apache Airflow 3.4.0 Documentation: Tasks
  4. LangGraph: Interrupts
  5. LangGraph: Persistence
  6. LangGraph: Fault tolerance, Retry boundaries and idempotency
  7. Apache Airflow source asset: branch_with_trigger.png
  8. Apache Airflow repository LICENSE
  9. Apache Airflow repository NOTICE

이미지 안내

Apache Airflow와 Apache Software Foundation의 공식 문서에 실린 실제 UI 예시입니다. 이 글의 가상 반품 업무를 실행한 화면은 아닙니다. © 2016-2026 The Apache Software Foundation, Apache License 2.0. 아래에 LICENSE와 NOTICE를 보존했으며 제공자의 제휴·추천을 뜻하지 않습니다. 본문에서는 전체 내용과 원본 비율을 유지하며 원본 보기 링크를 제공합니다. 업로드 호스팅의 전송용 크기 조정과 반응형 표시 외에 내용을 바꾸지 않았습니다.

Apache Airflow Apache 2.0 고지
                              Apache License
                        Version 2.0, January 2004
                     http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

   "License" shall mean the terms and conditions for use, reproduction,
   and distribution as defined by Sections 1 through 9 of this document.

   "Licensor" shall mean the copyright owner or entity authorized by
   the copyright owner that is granting the License.

   "Legal Entity" shall mean the union of the acting entity and all
   other entities that control, are controlled by, or are under common
   control with that entity. For the purposes of this definition,
   "control" means (i) the power, direct or indirect, to cause the
   direction or management of such entity, whether by contract or
   otherwise, or (ii) ownership of fifty percent (50%) or more of the
   outstanding shares, or (iii) beneficial ownership of such entity.

   "You" (or "Your") shall mean an individual or Legal Entity
   exercising permissions granted by this License.

   "Source" form shall mean the preferred form for making modifications,
   including but not limited to software source code, documentation
   source, and configuration files.

   "Object" form shall mean any form resulting from mechanical
   transformation or translation of a Source form, including but
   not limited to compiled object code, generated documentation,
   and conversions to other media types.

   "Work" shall mean the work of authorship, whether in Source or
   Object form, made available under the License, as indicated by a
   copyright notice that is included in or attached to the work
   (an example is provided in the Appendix below).

   "Derivative Works" shall mean any work, whether in Source or Object
   form, that is based on (or derived from) the Work and for which the
   editorial revisions, annotations, elaborations, or other modifications
   represent, as a whole, an original work of authorship. For the purposes
   of this License, Derivative Works shall not include works that remain
   separable from, or merely link (or bind by name) to the interfaces of,
   the Work and Derivative Works thereof.

   "Contribution" shall mean any work of authorship, including
   the original version of the Work and any modifications or additions
   to that Work or Derivative Works thereof, that is intentionally
   submitted to Licensor for inclusion in the Work by the copyright owner
   or by an individual or Legal Entity authorized to submit on behalf of
   the copyright owner. For the purposes of this definition, "submitted"
   means any form of electronic, verbal, or written communication sent
   to the Licensor or its representatives, including but not limited to
   communication on electronic mailing lists, source code control systems,
   and issue tracking systems that are managed by, or on behalf of, the
   Licensor for the purpose of discussing and improving the Work, but
   excluding communication that is conspicuously marked or otherwise
   designated in writing by the copyright owner as "Not a Contribution."

   "Contributor" shall mean Licensor and any individual or Legal Entity
   on behalf of whom a Contribution has been received by Licensor and
   subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
   this License, each Contributor hereby grants to You a perpetual,
   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
   copyright license to reproduce, prepare Derivative Works of,
   publicly display, publicly perform, sublicense, and distribute the
   Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
   this License, each Contributor hereby grants to You a perpetual,
   worldwide, non-exclusive, no-charge, royalty-free, irrevocable
   (except as stated in this section) patent license to make, have made,
   use, offer to sell, sell, import, and otherwise transfer the Work,
   where such license applies only to those patent claims licensable
   by such Contributor that are necessarily infringed by their
   Contribution(s) alone or by combination of their Contribution(s)
   with the Work to which such Contribution(s) was submitted. If You
   institute patent litigation against any entity (including a
   cross-claim or counterclaim in a lawsuit) alleging that the Work
   or a Contribution incorporated within the Work constitutes direct
   or contributory patent infringement, then any patent licenses
   granted to You under this License for that Work shall terminate
   as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
   Work or Derivative Works thereof in any medium, with or without
   modifications, and in Source or Object form, provided that You
   meet the following conditions:

   (a) You must give any other recipients of the Work or
       Derivative Works a copy of this License; and

   (b) You must cause any modified files to carry prominent notices
       stating that You changed the files; and

   (c) You must retain, in the Source form of any Derivative Works
       that You distribute, all copyright, patent, trademark, and
       attribution notices from the Source form of the Work,
       excluding those notices that do not pertain to any part of
       the Derivative Works; and

   (d) If the Work includes a "NOTICE" text file as part of its
       distribution, then any Derivative Works that You distribute must
       include a readable copy of the attribution notices contained
       within such NOTICE file, excluding those notices that do not
       pertain to any part of the Derivative Works, in at least one
       of the following places: within a NOTICE text file distributed
       as part of the Derivative Works; within the Source form or
       documentation, if provided along with the Derivative Works; or,
       within a display generated by the Derivative Works, if and
       wherever such third-party notices normally appear. The contents
       of the NOTICE file are for informational purposes only and
       do not modify the License. You may add Your own attribution
       notices within Derivative Works that You distribute, alongside
       or as an addendum to the NOTICE text from the Work, provided
       that such additional attribution notices cannot be construed
       as modifying the License.

   You may add Your own copyright statement to Your modifications and
   may provide additional or different license terms and conditions
   for use, reproduction, or distribution of Your modifications, or
   for any such Derivative Works as a whole, provided Your use,
   reproduction, and distribution of the Work otherwise complies with
   the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
   names, trademarks, service marks, or product names of the Licensor,
   except as required for reasonable and customary use in describing the
   origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
   agreed to in writing, Licensor provides the Work (and each
   Contributor provides its Contributions) on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
   implied, including, without limitation, any warranties or conditions
   of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
   PARTICULAR PURPOSE. You are solely responsible for determining the
   appropriateness of using or redistributing the Work and assume any
   risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
   whether in tort (including negligence), contract, or otherwise,
   unless required by applicable law (such as deliberate and grossly
   negligent acts) or agreed to in writing, shall any Contributor be
   liable to You for damages, including any direct, indirect, special,
   incidental, or consequential damages of any character arising as a
   result of this License or out of the use or inability to use the
   Work (including but not limited to damages for loss of goodwill,
   work stoppage, computer failure or malfunction, or any and all
   other commercial damages or losses), even if such Contributor
   has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
   the Work or Derivative Works thereof, You may choose to offer,
   and charge a fee for, acceptance of support, warranty, indemnity,
   or other liability obligations and/or rights consistent with this
   License. However, in accepting such obligations, You may act only
   on Your own behalf and on Your sole responsibility, not on behalf
   of any other Contributor, and only if You agree to indemnify,
   defend, and hold each Contributor harmless for any liability
   incurred by, or claims asserted against, such Contributor by reason
   of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

   To apply the Apache License to your work, attach the following
   boilerplate notice, with the fields enclosed by brackets "[]"
   replaced with your own identifying information. (Don't include
   the brackets!)  The text should be enclosed in the appropriate
   comment syntax for the file format. We also recommend that a
   file or class name and description of purpose be included on the
   same "printed page" as the copyright notice for easier
   identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

============================================================================
   APACHE AIRFLOW SUBCOMPONENTS:

   The Apache Airflow project contains subcomponents with separate copyright
   notices and license terms. Your use of the source code for these
   subcomponents is subject to the terms and conditions of the following
   licenses.


========================================================================
SIL Open Font License 1.1
========================================================================

The following components are provided under the SIL Open Font License 1.1.
See project link for details. The text of each license is also included at
registry/3rd-party-licenses/LICENSE-[project].txt.

    (OFL-1.1 License) JetBrains Mono v2.211 (https://github.com/JetBrains/JetBrainsMono)
    (OFL-1.1 License) Plus Jakarta Sans v2.071 (https://github.com/tokotype/PlusJakartaSans)
Apache Airflow 저작권·출처 고지
Apache Airflow
Copyright 2016-2026 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).

댓글