Back to Homepage
Human Oversight

Human-in-the-Loop Gateway

Secure approval gates and interactive web forms that hold execution plans until manual sign-off is completed โ€” keeping operators in control of high-impact decisions.

Concept & Purpose

Full autonomy is not always safe or legally permissible in regulated industrial environments. The Human-in-the-Loop (HITL) architecture ensures that agents can operate autonomously for low-risk tasks but are blocked from executing high-impact decisions (such as launching physical motors or signing off on compliance reports) without explicit human confirmation.

YAIFA transforms automation from a monolithic process into an interactive process. Through the forced simulation phase before rollout and the defined escalation logic (HITL) within the BDI structure, the system remains controllable, verifiable, and secure for the user at all times. The human shifts from the role of pure monitor to the strategic decision-maker (Supervisor), who sets the direction at high complexity or unpredictable states.

BDI Structure as Basis for Traceability

The BDI structure in the YAIFA framework is not only a functional architecture but also the foundation for transparency:

  • Beliefs (Knowledge): All assumptions of the agent about the world are documented and visible to humans.
  • Desires (Goals): Clear definition of what the agent is supposed to achieve.
  • Intentions (Actions): The chosen path to goal achievement is traceable through continuous logging.

Every solution method within YAIFA is accompanied by the following elements to ensure seamless auditability:

  1. Code commenting: Every agent decision is linked to a semantic justification.
  2. Structured logging: Logs capture not only the "what" but also the "why" through the BDI structure (e.g., "Based on Belief X and Desire Y, Intention Z was chosen").
  3. Human-Interface log: Escalations and human interventions are recorded as their own events in the system log.

Practical Value

YAIFA provides a dedicated HITL gateway that handles two main communication paths:

  • Semantic Channel: Chat-based inputs allowing operators to query agent beliefs, review action histories, or command tasks in natural language.
  • Web Channel: Form-based portals serving HTML dialogs and commands (e.g. recipe approvals) mapped directly to agent BDI inputs.

Integrating HITL ensures secure, traceable human-machine collaboration:

  • Staging & Release Gateways: When a plan reaches a release point, the agent halts its BDI loop, posts a publish.requests token on the blackboard, and notifies the supervisor. Only after a human clicks "Approve" is the payload moved to productive execution.
  • Safety Interlock: In degraded modes (e.g., if a sensor fails), the agent defaults to a safe-mode state, alerts the manager, and waits for manual commands.
  • Audit-ready Logs: Track which operator approved which action and keep logs for regulatory compliance.

Technical Realization

The gateway coordinates tasking using the MAS Blackboard. When an agent demands human input, it publishes a request payload:

// Example of a planned HITL publish.requests blackboard payload
{
  "request_id": "req-90812-auth",
  "agent_id": 14,
  "page_slug": "batch_release_authorization",
  "content_type": "text/html",
  "staging_path": "MAS/Web/staging/14/batch_release.html",
  "meta": {
    "title": "Authorize Batch Release #8921",
    "required_role": "quality_manager",
    "timeout_seconds": 600
  }
}

The Web-Gateway displays this form in the user portal. Once approved, the dashboard writes a publish.acks acknowledgement containing signature data. The agent's BDI engine updates its beliefs and resumes plan execution.

For implementation, the use of standardized JSON-Schema formats for communication between agents and the Human-Interface is recommended to ensure a consistent data basis for logging.