Metronisys Human Approval Tool/Skill

Article text.

Home



What it is

human_approval is a built-in tool (not a .skill file). It acts as a human-in-the-loop gate: the agent can “call” it when a step needs human sign-off before continuing. In practice, the real approval flow is driven by policy (soul + profile), not by the model choosing to call human_approval; the tool is the stub that returns a “pending” result when the system has already decided approval is required.

What it does

As a callable tool (stub)

When the agent (or capability resolver) selects human_approval, the handler runs and returns a pending result. It does not wait for a real human or UI; it just returns structured data so the rest of the stack can pause the run and record that approval was requested.

Two approval types

Stub behaviour

The implementation returns:

For approval_type == "compliance_officer", it also includes:

In short: it declares that this step is a human-approval gate and returns a pending result. The decision itself is made earlier by the policy engine.


How it works (end-to-end)

1. When is approval required?

Approval is required when the policy engine returns:

AuthorizationResult(allowed=True, requires_human_approval=True)

This happens in two ways:

Profile-level

If the policy profile has require_human_approval: true, then all allowed tools (except exempt ones like unit_conversion, current_datetime, system_health_check) require approval.

Soul-level

Defined in soul.yaml using human_approval_required rules. These match:

Each rule sets approval_type as either client or compliance_officer.

So the same tool (e.g. write_file) may or may not require approval depending on configuration.


2. When a tool requires approval

The tool executor:

Instead, it returns:

This effectively pauses execution.


3. Handling approval metadata

When _approval_metadata is returned:

Later, a user or UI resumes the process via:

resume_after_approval(approval_id, approved=True|False)

4. Resume after approval

If approved:

If rejected:

All decisions are logged for audit.


5. Workflow skip logic

If approval has already been granted in a workflow:



Where it sits in the solution

Layer Role of human_approval
Tool registry Registered as a built-in tool with metadata (tags: approval, governance, human)
Policy / soul Defines which actions require approval
Capability resolver Uses human_approval only when necessary
ReAct / guardrails Treats its output specially; avoids retries
Tool executor Returns approval metadata instead of executing tools
Main app / API Saves checkpoints, logs events, resumes workflows
Audit system Tracks full lifecycle (request → decision → resume)

Summary

human_approval represents a human gate in the workflow. The real logic—blocking execution, saving state, resuming, and auditing, is handled by:

The tool itself is a lightweight stub that simply returns a structured “pending” response and approval metadata.



Return To Previous Page