human-in-loop-agents

human-in-loop-agents is a skill for Claude Code from latestaiagents/agent-skills. It costs 69 tokens per session (2,275 once invoked), scanned A, original, MIT.

A guide for building AI agents that stop and wait for a person to approve, review, or change a planned action. Human-in-the-loop means a person remains involved at important decision points.

In plain words
What is it for?
Use it to design approval workflows, review-before-publish processes, agent interruptions, and oversight for actions such as sending messages or deleting data.
Why use it?
It helps prevent agents from carrying out high-risk, compliance-sensitive, or uncertain actions without human judgment.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agent-architect plugin — 13 skills, 1 command, 5 MCP servers shipped together

Good fit Use it to design approval workflows, review-before-publish processes, agent interruptions, and oversight for actions such as sending messages or deleting data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/human-in-loop-agents
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add latestaiagents/agent-skills --skill human-in-loop-agents
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install agent-architect, the plugin that ships this one along with the rest of its 13 skills, 1 command, 5 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for human-in-loop-agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/human-in-loop-agents/github.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/human-in-loop-agents)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/human-in-loop-agents"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/human-in-loop-agents/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for human-in-loop-agents

Your own site · 80×15
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/human-in-loop-agents"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/human-in-loop-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,275 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.02275
Opus 5 $0.00034 $0.01137
Sonnet 5 $0.00014 $0.00455
Haiku 4.5 $0.00007 $0.00228

Measured 10d ago against content hash 756de5d96fe0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

human-in-loop-agents scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/agent-architect/skills/patterns/human-in-loop-agents/SKILL.md · 346 lines

How it starts

The opening of the file, as written. The whole thing — 346 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Human-in-the-Loop Agents

Build agents that know when to stop and ask for human judgment.

Why Human-in-the-Loop?

Critical for:

  • High-stakes actions: Financial transactions, data deletion
  • Compliance: Audit requirements, approval workflows
  • Quality control: Review before publishing, sending
  • Edge cases: When agent confidence is low
  • Trust building: Users control what agents do

Core Patterns

Pattern 1: Interrupt Before Action

from langgraph.graph import StateGraph, END
from langgraph.checkpoint.memory import MemorySaver
from langgraph.types import interrupt

class AgentState(TypedDict):
    messages: list
    pending_action: dict | None
    approved: bool

def plan_action(state: AgentState) -> dict:
    """Agent plans what to do."""
    # Determine action based on messages
    action = {
        "type": "send_email",
        "to": "[email protected]",
        "subject": "Important Update",
        "body": "..."
    }
    return {"pending_action": action, "approved": False}

def request_approval(state: AgentState) -> dict:
    """Interrupt and wait for human approval."""
    action = state["pending_action"]

    # This pauses execution and waits for human input
    approved = interrupt({
        "message": f"Approve this action?",
        "action": action,
        "options": ["approve", "reject", "modify"]
    })

    return {"approved": approved == "approve"}

def execute_action(state: AgentState) -> dict:
    """Execute the approved action."""
    if state["approved"]:
        result = execute(state["pending_action"])
        return {"messages": [{"role": "system", "content": f"Executed: {result}"}]}
    else:
        return {"messages": [{"role": "system", "content": "Action rejected"}]}

def should_execute(state: AgentState) -> str:
    return "execute" if state["approved"] else "end"

# Build graph
workflow = StateGraph(AgentState)
workflow.add_node("plan", plan_action)
workflow.add_node("approve", request_approval)
workflow.add_node("execute", execute_action)

workflow.set_entry_point("plan")
workflow.add_edge("plan", "approve")
workflow.add_conditional_edges("approve", should_execute, {
    "execute": "execute",
    "end": END
})
workflow.add_edge("execute", END)

# Compile with checkpointer (required for interrupts)
app = workflow.compile(checkpointer=MemorySaver())

Read the full file on GitHub · 346 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 346 lines · 69 tokens per session scan A 756de5d96fe0

Subscribe to this mod's changes

human-in-loop-agents is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 69 tokens to every session and 2,275 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.