0Pricing
AI Agents with LangChain & Autonomous Workflows · レッスン

Human-in-the-Loop承認

自律ワークフローに安全なチェックポイントを追加し、エージェントが先へ進む前に人間がリスクの高い操作を確認・承認できるようにして、自動化と制御のバランスを取ります。

「Human-in-the-Loop承認」はCoddyKit上の無料AI Agents with LangChain & Autonomous Workflowsレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはAI Agents with LangChain & Autonomous Workflows学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 AI Agents with LangChain & Autonomous Workflowsコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

Why Pause for Humans

Full autonomy is risky for high-stakes actions: sending money, deleting records, emailing customers. A mistake can be costly and irreversible.

Human-in-the-loop (HITL) inserts an approval step so a person confirms before the agent acts.

Where to Add Checkpoints

You do not need approval everywhere — only at sensitive points:

  • Before destructive or irreversible operations
  • Before external side effects (payments, emails)
  • When the agent's confidence is low

Read-only steps can stay fully automatic.

The Interrupt Pattern

In LangGraph you mark nodes where the graph should pause. Execution stops, state is saved, and control returns to your application to await a decision.

graph = builder.compile(
    checkpointer=memory,
    interrupt_before=['execute_payment']
)

Persisting State to Resume

To pause and resume later, the workflow needs a checkpointer that saves state under a thread id. The human might approve minutes or hours later.

config = {'configurable': {'thread_id': 'order-42'}}
result = graph.invoke(initial_state, config)

Surfacing the Pending Action

When paused, inspect the saved state to show the human exactly what the agent wants to do — the tool, the arguments, and the reason.

state = graph.get_state(config)
print(state.next)
print(state.values['proposed_action'])

Approve and Continue

If the human approves, resume the graph by invoking again with the same thread id. It picks up right where it paused.

graph.invoke(None, config)  # resume

Reject or Edit

Approval is not the only outcome. A human can reject the action or edit the agent's proposed arguments before continuing — for example fixing a wrong recipient.

graph.update_state(
    config,
    {'proposed_action': edited_action}
)
graph.invoke(None, config)

Asynchronous Approvals

In production the human is not at a console. The pause sends a notification (Slack, email, a dashboard task); the resume happens when they click approve. The thread id ties the request to the right paused run.

Timeouts and Defaults

Decide what happens if no one responds. Options:

  • Auto-reject after a timeout (safe default)
  • Escalate to another approver
  • Hold indefinitely for critical actions

Auditability

Log every approval decision: who approved, when, and what was executed. This audit trail is essential for compliance and for debugging agent behavior later.

Balancing Automation

Too many approvals defeat the purpose of automation; too few add risk. Start cautious, then remove checkpoints as you gain confidence in the agent for specific action types.

Quick Check

Test your HITL knowledge.

Recap

You learned to add human oversight to autonomous workflows:

  • Insert approval checkpoints at risky steps only
  • Use interrupt_before plus a checkpointer to pause
  • Surface the proposed action, then approve, reject, or edit
  • Handle async approvals, timeouts, and audit logging

Human-in-the-loop makes autonomy safe for high-stakes work.

よくある質問

「Human-in-the-Loop承認」レッスンは無料ですか?

はい。「Human-in-the-Loop承認」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、AI Agents with LangChain & Autonomous Workflowsコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 AI Agents with LangChain & Autonomous Workflowsコースには全4レッスンが含まれています。

「Human-in-the-Loop承認」で何を学びますか?

自律ワークフローに安全なチェックポイントを追加し、エージェントが先へ進む前に人間がリスクの高い操作を確認・承認できるようにして、自動化と制御のバランスを取ります。 ブラウザで直接実行するハンズオンコードでAI Agents with LangChain & Autonomous Workflowsを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

AI Agents with LangChain & Autonomous Workflowsを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのAI Agents with LangChain & Autonomous Workflowsは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。

「Human-in-the-Loop承認」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このAI Agents with LangChain & Autonomous Workflowsレッスンでコードを書いて実行できますか?

はい。すべてのAI Agents with LangChain & Autonomous Workflowsレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. 複雑なワークフローの設計
  2. エージェントの非同期実行
  3. エラー処理とレジリエンス
  4. Human-in-the-Loop承認
← AI Agents with LangChain & Autonomous Workflowsに戻る