RT-O2: Agentic AI 자율 예외 처리

🎯 Agentic AI 자율 예외 처리란?ReAct + tool use · Autonomous Exception Resolution

기존 OMS는 예외 상황(재고 부족·주소 오류·EDD 미충족·결제 실패 등)이 발생하면 운영 인력의 수기 개입이 필요해 평균 30분~수시간이 지연됐다. RT-O2는 이를 해결하기 위해 LLM 기반 Agentic AI(ReAct 패턴 + tool use)를 도입한다. 예외 이벤트가 워크플로우에서 감지되면 Agent가 유형을 분류하고, tool 후보를 자율 선정해 1~3 step 자동 chaining으로 실행하며, 처리 결과를 검증한 뒤 회고 로그를 학습 corpus에 저장한다.

처리 가능 범위를 벗어나는 예외는 명확한 사유와 함께 사람에게 에스컬레이션한다. 모델은 Anthropic Claude 3.5 Sonnet 또는 GPT-4o의 function calling 기반으로 구성되며, RT-O1의 단일 레이블 분류 한계를 이어받아 예외 처리 자동화율 90%+·평균 처리시간 4초를 2월 KPI로 설정했다.

🧭 자율 예외 처리 파이프라인5 stages · detect → plan → execute → verify → learn
STEP 1
exception_detect

OMS 워크플로우에서 예외 이벤트 감지(SKU 부족 / 주소 invalid / EDD slip / 결제 실패 / 재고 lock 충돌).

STEP 2
agent_plan

Agent가 예외 유형 분류 + tool 후보 선정(relock_inventory, reroute_carrier, address_correct, partial_ship, refund 등).

STEP 3
tool_execute

선정된 tool 실행(HTTP / DB / messaging) · 1~3 step 자동 chaining. 실패 시 다음 후보 tool로 재시도.

STEP 4
verify

결과 검증(EDD 회복 여부, 고객 영향 측정). 임계값 미달이면 에스컬레이션 분기.

STEP 5
learn_log

자율 처리 ok / 에스컬레이션 / fail 분기 + 회고 로그 저장 (RAG corpus) → 다음 예외 plan 단계에서 retrieval.

🐍 예외 처리 Agent System Prompt (Python)
# 예외 처리 에이전트 시스템 메시지
EXCEPTION_AGENT_PROMPT = """
당신은 물류 예외 처리 전문 AI입니다.
발생한 예외 유형을 파악하고 정해진 대응 절차에 따라
자율적으로 처리하되, 고객 영향을 최소화하세요.
처리 불가 시 담당자에게 에스컬레이션하세요."""

# tool 정의 (function calling schema)
TOOLS = [
    tool("swap_node", "다른 거점으로 swap"),
    tool("partial_ship", "가용 SKU 부분 출하"),
    tool("reroute_carrier", "운송사 재라우팅"),
    tool("address_correct", "gmaps_geocode 보정"),
    tool("notify_customer", "SMS/이메일 사전 알림"),
    tool("manual_escalate", "관리자 큐 등록"),
]

def handle_exception(event):
    plan = agent.plan(event, TOOLS)   # ReAct: Reason → Act
    result = chain_execute(plan)
    if verify(result):
        corpus.append(event, plan, result)
        return "ok"
    return agent.escalate(event, reason=result.fail_reason)
➗ 자동화율 & 고객 영향 지표automation_rate ↑ · customer_impact ↓
automation_rate = handled_by_agent / total_exceptions
customer_impact = w₁·EDD_slip_hr + w₂·notify_delay_min + w₃·partial_ship_pctw₄·proactive_compensation
# detect/plan/execute 가중치 0.9 + escalate 0.1 → 자율 처리가 주, 에스컬레이션은 안전망
detect 0.3exception_detect() · 워크플로우 hook에서 예외 분류 · 유형 신뢰도가 0.7 이상이어야 plan으로 진입
plan 0.3agent.plan(event, TOOLS) · ReAct로 tool chain 후보 산출 · RAG corpus에서 유사 사례 retrieval로 정확도 보강
execute 0.3chain_execute(plan) · 1~3 step tool 자동 호출 · 실패 시 다음 후보로 재시도(최대 3회)
escalate 0.1agent.escalate() · 처리 불가 시 사유와 함께 관리자 큐로 라우팅 · SLA 30분 이내 응답

예) NODE-A 재고 0인 SKU 주문이 들어오면 detect 1.0(SKU_SHORTAGE) → plan 1.0(swap_node→partial_ship→notify) → execute 1.0(NODE-B에서 부분 출하) → verify 통과 → escalate 0 → automation_rate에 1건 가산.

📦 예외 유형별 Agent 대응 매트릭스2월 사례 기준 · N=1,827건
예외 유형빈도Agent tool자동화율평균 처리시간
SKU 부족높음swap_node + partial_ship96%3.2s
주소 오류gmaps_geocode + ask_user(SMS)88%18s
EDD slipreroute_carrier + notify92%5.4s
결제 실패retry + manual_escalate71%42s
HAZMAT 라우팅 충돌낮음route_to_certified_node94%6.8s

SKU 부족·EDD slip·HAZMAT은 deterministic tool chain으로 90%+ 자동화가 가능하지만, 결제 실패는 외부 게이트웨이 의존성 때문에 71% 수준에 머문다. 주소 오류는 gmaps_geocode로 보정 가능한 케이스가 많아 88%, 단 고객 응답 대기 때문에 평균 처리시간(18s)이 길다.

참고문헌
[1] 김지훈, "Agentic AI 자율 예외 처리 2차 보고서", IntraLogis 사내 보고서, 2026.02
[2] Yao, S. et al. "ReAct: Synergizing Reasoning and Acting in Language Models", ICLR 2023 (arXiv 2210.03629), 2022
[3] Anthropic, "Building Effective Agents" 가이드, 2024
[4] OpenAI, Function Calling Guide, 2024
[5] LangGraph 공식 문서, Stateful Agent Workflows, 2025
[6] McKinsey & Company, "Agentic AI in Operations: From Automation to Autonomy", 2025
[7] 박소연 · 김지훈, WMS-OMS 통합 협력 보고서, IntraLogis 사내, 2025.12