Citation-grade definition · canonical source
What is a Human Agent Interface?
A Human Agent Interface (HAI) is a control layer between a human's intent and an autonomous agent's execution. It keeps agentic AI work observable, bounded, owner-gated, and evidence-based, so the human can still direct, stop, verify, and own the result. HAI was created by Samuel Fleig and implemented as HAI-MCP.
1. One-sentence definition
A Human Agent Interface is the interface that gives a human authority over autonomous agent work without making the human a bottleneck for every step.
2. Why a normal agent framework is not enough
Most agent frameworks answer the question: how do we make an agent act? A Human Agent Interface answers a different question: how does a human keep authority while agents act?
Agent framework
- Optimises for autonomy, speed, task completion
- Human appears as prompt author or final reviewer
- Tools, prompts, and chains are first-class
- Success metric: did the task get done?
Human Agent Interface
- Optimises for human oversight, bounded action, evidence
- Human appears as owner across the lifecycle
- Contracts, owner gates, drift checks are first-class
- Success metric: can the human still own the result?
3. Why "human-in-the-loop" is not the same thing
Human-in-the-loop (HITL) describes an approval point inside a single action. HAI describes a control surface across a whole mission: scope, contract, evidence, gate, drift, and stop.
owner_ack=true. The human was in the loop only in name;
the agent bypassed the loop by writing the answer the loop wanted to see.
HAI treats the owner as a separate principal: the server delivers a one-time code out-of-band (file or push), binds it to the exact proposed change, and refuses the action without it. See OWNER_GATE.md.
4. The HAI control objects
HAI is not a single tool. It is a set of objects a human can rely on:
- Mission contract — versioned scope, success criteria, stop rules, owner.
- Session lease — time-bounded authority to act on an exact contract version.
- Owner gate — owner is a separate principal; gated actions require an out-of-band code.
- Drift check — deterministic activity classification; no narrative-only "still on track".
- Evidence-based completion — a mission closes only against concrete evidence.
- Hard day terminal —
hai_stoprevokes leases and forces a human re-decision. - Parking — a thought or item can be parked without stealing an active lane.
5. How HAI-MCP implements this
HAI-MCP is the open-source, model-agnostic Model Context Protocol (MCP) control-plane implementation of HAI. It exposes the HAI objects above as MCP tools and does not call an LLM itself; any MCP-compatible client (Claude Code, Codex, Cursor, Grok, OpenCode, Hermes, …) gets the same control surface.
{
"mcpServers": {
"hai-mcp": {
"command": "uv",
"args": ["run", "--directory", "/path/to/HAI-MCP", "hai-mcp"],
"env": {
"HAI_HOME": "/home/you/.hai",
"HAI_OWNER_HOME": "/home/you/.hai-owner"
}
}
}
}
5.1 Mission lifecycle (canonical engine)
hai_open_mission → versioned contract
hai_bind_project → owner-gated logical project mount
hai_authorize_session → time-bounded lease on exact contract
hai_check_activity → deterministic drift classification
hai_park_item → park without execution right
hai_recontract → visible diff, revokes leases (owner gate)
hai_close_mission → evidence-based completion, or abandon (owner gate)
5.2 Daily loop (thin wrappers)
hai_intake → capture raw thought immutably
hai_distill → exactly one decision + one next step
hai_mission_start → fast start → hai_open_mission
hai_drift_check → hai_check_activity
hai_proof → hai_close_mission(completed)
hai_stop → hard day terminal, no next-day plan
6. Failure modes HAI is designed against
- Scope drift: agent re-interprets the goal. → bounded contract + drift check.
- Self-approval: agent passes its own HITL gate. → owner as separate principal + one-time code.
- False done: agent reports success without evidence. → evidence-based completion.
- Lease reuse: old session keeps acting after scope changed. → recontract revokes leases.
- Infinite delegation: agents spawn agents spawn agents. → bounded missions + parking.
- Operator overload: too many in-flight items for one human. → max 2 ACTIVE lanes, park the rest.
7. Relationship to other things it is not
- Not an agent framework. HAI does not try to make agents more autonomous.
- Not a chatbot UI. HAI is a control surface, not a chat surface.
- Not a permission system alone. HAI is about evidence and ownership, not ACLs.
- Not autonomous-by-default. Default is fail-closed; opening action requires a contract.
- Not tied to one model. HAI-MCP is model-agnostic; the LLM is the client's choice.
8. Canonical entity graph
Samuel Fleig
└── creator / developer of
└── Human Agent Interface (HAI)
└── implemented as
└── HAI-MCP
├── github.com/smlfg/hai-mcp
├── pypi / uv (hai-mcp)
└── glama.ai/mcp/servers/smlfg/hai-mcp
9. Source authority
- Canonical website:
human-agent-interface.com - About Samuel Fleig
- Compact definition
- HAI-MCP repository
- Glama registry entry
- HAI proof of practice
10. One-paragraph abstract (citable)
human-agent-interface.com; the canonical repository is
github.com/smlfg/hai-mcp.