--- id: wiki-2026-0508-process-automation-with-ai title: Process Automation with AI category: 10_Wiki/Topics status: verified canonical_id: self aliases: [AI RPA, Intelligent Automation, AI Agent Automation] duplicate_of: none source_trust_level: A confidence_score: 0.9 verification_status: applied tags: [automation, ai-agents, rpa, workflow, llm] raw_sources: [] last_reinforced: 2026-05-10 github_commit: pending tech_stack: language: Python/JavaScript framework: n8n/Zapier/LangGraph --- # Process Automation with AI ## 매 한 줄 > **"매 deterministic workflow + LLM reasoning step"**. 2010s RPA (UiPath, Automation Anywhere) 가 매 brittle screen-scraping 이었다면, 매 2026 현재 hybrid AI agent — 매 structured workflow node + LLM decision node — 가 default. n8n + Claude tool-use 의 dominant pattern. ## 매 핵심 ### 매 spectrum - **Pure RPA**: 매 deterministic, 매 scripted UI clicks. UiPath, Power Automate. - **iPaaS**: API-first integration. Zapier, Make, n8n. - **AI-augmented iPaaS**: 매 LLM step 의 추가. Zapier AI Actions, Make AI modules. - **Agent automation**: 매 LLM 의 plans + executes. Claude tool-use, LangGraph, CrewAI. - **Computer-use agent**: 매 LLM 의 screen + mouse 의 직접 control. Anthropic Computer Use, OpenAI Operator. ### 매 architecture - **Trigger** (webhook, schedule, email, file). - **Extract** (LLM parses unstructured → JSON). - **Decide** (LLM chooses branch / tool). - **Act** (API call, DB write, send email). - **Verify** (LLM judges output, human-in-loop on low confidence). ### 매 응용 1. Invoice processing (PDF → ERP). 2. Customer support triage (email → ticket category + draft reply). 3. Lead enrichment (CRM + LinkedIn + LLM summary). 4. Code review automation (PR → AI comments). 5. Compliance monitoring (logs → policy check). ## 💻 패턴 ### n8n + Claude (2026 standard) ```json { "nodes": [ {"type": "webhook", "name": "Email received"}, {"type": "anthropic", "name": "Classify", "params": { "model": "claude-opus-4-7", "system": "Classify email: SUPPORT, SALES, SPAM. Return JSON.", "input": "={{ $json.body }}" }}, {"type": "switch", "rules": [ {"value": "SUPPORT", "output": 0}, {"value": "SALES", "output": 1} ]}, {"type": "zendesk", "name": "Create ticket"} ] } ``` ### LangGraph state machine ```python from langgraph.graph import StateGraph, END from anthropic import Anthropic client = Anthropic() def classify(state): r = client.messages.create( model="claude-opus-4-7", max_tokens=200, messages=[{"role": "user", "content": f"Category? {state['text']}"}] ) return {"category": r.content[0].text.strip()} def route(state): return state["category"].lower() g = StateGraph(dict) g.add_node("classify", classify) g.add_node("support", lambda s: {"reply": "Support team handling"}) g.add_node("sales", lambda s: {"reply": "Sales team handling"}) g.set_entry_point("classify") g.add_conditional_edges("classify", route, {"support": "support", "sales": "sales"}) g.add_edge("support", END) g.add_edge("sales", END) app = g.compile() ``` ### Tool-use agent (Claude) ```python tools = [ {"name": "create_ticket", "description": "Create Zendesk ticket", "input_schema": {"type": "object", "properties": { "subject": {"type": "string"}, "priority": {"type": "string", "enum": ["low","high","urgent"]} }, "required": ["subject"]}}, {"name": "send_slack", "description": "Notify channel", "input_schema": {"type": "object", "properties": {"channel": {"type":"string"}, "msg":{"type":"string"}}}} ] resp = client.messages.create( model="claude-opus-4-7", max_tokens=2000, tools=tools, messages=[{"role":"user", "content": email_text}] ) for block in resp.content: if block.type == "tool_use": result = dispatch(block.name, block.input) ``` ### Computer Use (Anthropic, 2025+) ```python # 매 LLM 의 screenshot 의 보고 click/type. # Brittle UI 의 RPA 의 대체. response = client.beta.messages.create( model="claude-opus-4-7", tools=[{"type": "computer_20250124", "name": "computer", "display_width_px": 1920, "display_height_px": 1080}], messages=[{"role":"user", "content":"Open SAP, navigate to PO #4521, approve."}] ) ``` ### Verification + HITL (human-in-loop) ```python def confidence_gate(decision, threshold=0.85): if decision["confidence"] < threshold: send_to_human_queue(decision) return None return execute(decision["action"]) ``` ### Idempotent retry ```python @retry(stop=stop_after_attempt(3), wait=wait_exponential()) def safe_api_call(idempotency_key, payload): return requests.post(url, json=payload, headers={"Idempotency-Key": idempotency_key}) ``` ## 매 결정 기준 | 상황 | Approach | |---|---| | Simple SaaS-to-SaaS sync | **Zapier / Make** | | Self-host + complex logic | **n8n** (default 2026) | | Stateful multi-step agent | **LangGraph + Claude** | | Legacy desktop GUI 만 | UiPath / Computer Use | | Engineering team automation | Temporal + LLM step | **기본값**: n8n self-hosted + Claude tool-use node. ## 🔗 Graph - 부모: [[Workflow-Automation]] - Adjacent: [[Tool-Use]] · [[LangGraph]] ## 🤖 LLM 활용 **언제**: 매 unstructured input (email, PDF, chat), 매 fuzzy classification, 매 multi-step planning. **언제 X**: 매 high-volume deterministic ETL — 매 SQL/Airflow 가 fast + cheap. 매 LLM call 의 매 step 의 cost overrun. ## ❌ 안티패턴 - **LLM in tight loop**: 매 step 의 매 LLM call — 매 latency + cost. 매 batch / cache. - **No HITL on irreversible**: 매 send email / charge card 의 human approval gate 의 필수. - **Schema-less tool output**: 매 free-text 의 parse error. 매 JSON schema enforce. - **Hidden non-determinism**: 매 prompt 의 minor change 의 production 의 break. 매 eval suite 의 필요. ## 🧪 검증 / 중복 - Verified (Anthropic agent docs, n8n.io, LangGraph docs). - 신뢰도 A. ## 🕓 Changelog | 날짜 | 변경 | |---|---| | 2026-05-08 | Phase 1 | | 2026-05-10 | Manual cleanup — modern AI agent automation 의 full content. |